Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • A android-components
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 20
    • Issues 20
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Applications
  • android-components
  • Issues
  • #40023
Closed
Open
Created Oct 22, 2020 by Matthew Finkel@sysrqbMaintainer

Completely stop the Private Notifcation Service

When the app is closed (destroyed), it currently calls stop on the notification service's observer:

https://gitlab.torproject.org/tpo/applications/fenix/-/blob/tor-browser-82.0.0b4-10.0-1/app/src/main/java/org/mozilla/fenix/HomeActivity.kt#L364

    override fun onDestroy() {
        super.onDestroy()

        // Diagnostic breadcrumb for "Display already aquired" crash:
        // https://github.com/mozilla-mobile/android-components/issues/7960
        breadcrumb(
            message = "onDestroy()",
            data = mapOf(
                "finishing" to isFinishing.toString()
            )
        )

        privateNotificationObserver?.stop()

Unfortunately, that doesn't stop the underlying Service:

https://gitlab.torproject.org/tpo/applications/android-components/-/blob/android-components-60.0.3-10.0-1/components/feature/privatemode/src/main/java/mozilla/components/feature/privatemode/notification/PrivateNotificationFeature.kt#L50

    override fun stop() {
        scope?.cancel()
    }

This causes issues like the one described n fenix!49 (comment 2712256)

Assignee
Assign to
Time tracking