Completely stop the Private Notifcation Service
When the app is closed (destroyed), it currently calls stop on the notification service's observer:
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:
override fun stop() {
scope?.cancel()
}
This causes issues like the one described n fenix!49 (comment 2712256)