Open Bug 2081670 Opened 3 days ago Updated 3 days ago

Only read the onboarding completed timestamp when the privacy report notification is available

Categories

(Firefox for Android :: Experimentation and Telemetry, task, P3)

All
Android
task
Points:
1

Tracking

()

ASSIGNED

People

(Reporter: towhite, Assigned: towhite)

References

Details

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

Attachments

(1 file)

In PrivacyReportNotificationScheduler.updatePrivacyReportNotificationWorker, settings.onboardingCompletedTimestamp is read before the notification availability check, even though the value is only used in the AVAILABLE branch.

The read goes through a longPreference delegate, so it is a SharedPreferences lookup that is wasted whenever the notification is unavailable (permission denied, channel blocked, etc.) and the worker is simply cancelled.

Move the read inside the AVAILABLE branch so it only happens when the value is needed. No behavior change.

Points: --- → 1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: