Open Bug 2062560 Opened 3 months ago Updated 3 months ago

Remove hard dependency on NotificationManager in privacy report notification code once the feature is permanent

Categories

(Firefox for Android :: Experimentation and Telemetry, enhancement)

All
Android
enhancement

Tracking

()

People

(Reporter: towhite, Unassigned)

References

Details

(Whiteboard: [android-activation-trust] [blocked] [fxdroid])

ensurePrivacyReportNotificationChannelExists in mobile/android/fenix/app/src/main/java/org/mozilla/fenix/privacyreport/PrivacyReportNotificationHelper.kt looks up NotificationManager directly via context.getSystemService(...) rather than through an injectable abstraction. This was an accepted shortcut while the weekly privacy report notification is still experimental and gated behind a Nimbus flag (bug 2060524).

Per the existing code comment:

If the privacy report becomes a permanent feature, the notification manager will be refactored to be passed in via an abstraction to remove the hard dependency on NotificationManager.

If/when the feature graduates to permanent, this should be refactored so NotificationManager (or a wrapping abstraction) is passed in, for testability and consistency with the rest of the codebase.

You need to log in before you can comment on or make changes to this bug.