Current day failure count in data submission does not reset after 24-hour period

RESOLVED FIXED

Status

Android Background Services
Firefox Health Report Service
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mcomella, Assigned: mcomella)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

The code in SubmissionPolicy.tick(...) (https://mxr.mozilla.org/mozilla-central/source/mobile/android/base/background/healthreport/upload/SubmissionPolicy.java#64) stores the current day failure count in the SharedPreferences (https://mxr.mozilla.org/mozilla-central/source/mobile/android/base/background/healthreport/upload/SubmissionPolicy.java#286), persisting the value beyond the process' lifetime, but never checks if the argument localtime is 24 hours past the initial submission time (which can occur if the process is killed or the device is turned off).
^ needinfo is to continue the review on the PR from before.
LGTM.
Flags: needinfo?(rnewman)
Created attachment 783466 [details] [diff] [review]
893910.patch

Moved r+ (see rnewman above), review via github.
Attachment #783466 - Flags: review+

Comment 6

5 years ago
https://hg.mozilla.org/mozilla-central/rev/3d58bd987452
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.