Closed
Bug 1467840
Opened 6 years ago
Closed 6 years ago
Use JobIntentService for other background work
Categories
(Firefox for Android Graveyard :: General, enhancement)
Tracking
(firefox63 fixed)
RESOLVED
FIXED
Firefox 63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: petru, Assigned: petru)
References
Details
Attachments
(2 files, 2 obsolete files)
GeckoService is a simple Android Service [1] which can be started while in background. After starting to target Oreo a service can be started in background only if [2]: - is started as a foreground service (with a notification visible to the user) - is a JobIntentService Otherwise the app would crash. [1] https://dxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/GeckoService.java#26 [2] https://developer.android.com/about/versions/oreo/background
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → petru.lingurar
Comment hidden (mozreview-request) |
Attachment #8984521 -
Flags: review?(sdaswani) → review?(jh+bugzilla)
Updated•6 years ago
|
Blocks: target-android-o
Comment 2•6 years ago
|
||
mozreview-review |
Comment on attachment 8984521 [details] Bug 1467840 - Migrate GeckoService to JobIntentService; https://reviewboard.mozilla.org/r/250388/#review256918 Looks reasonable, just the jobId issues need resolving like in all the other JobIntentService conversion patches. ::: mobile/android/services/src/main/java/org/mozilla/gecko/background/JobIdsConstants.java:11 (Diff revision 1) > + * To try and mitigate this situations we will use IDs with negative values in our code. > + * > + * @see <a href="https://developer.android.com/reference/android/app/job/JobInfo.Builder#JobInfo.Builder(int, android.content.ComponentName)"> > + * JobId importance</a> > + */ > +public class JobIdsConstants { This needs rebasing onto whatever other patches will land first, but I guess you already know that. Mentioning it just so this doesn't get accidentally landed like this. ::: mobile/android/services/src/main/java/org/mozilla/gecko/background/JobIdsConstants.java:36 (Diff revision 1) > + // Our package is unavailable to org.mozilla.gecko classes. > + // Currently used in org.mozilla.gecko classes.CrashReporterService > + // The id is kept here to ensure unicity between all job ids. > + private static final int JOB_ID_CRASH_REPORTER = -14; > + > + public static final int JOB_ID_GECKO_STARTER = -15; Also as mentioned elsewhere, the ID offset configurable through the build config needs to be done first.
Attachment #8984521 -
Flags: review?(jh+bugzilla) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•6 years ago
|
Summary: Migrate GeckoService to JobIntentService → Use JobIntentService for other background work
Assignee | ||
Comment 5•6 years ago
|
||
- rebased the initial patch with the latest version of `JobIdsConstants` to be ready for landing. - added a new commit for a JobIntentService used for background refresh of the GCM token as suggested in bug 1465323 comment 15. - renamed to ticket accordingly.
Attachment #8987863 -
Flags: review?(sdaswani) → review?(snorp)
Comment 6•6 years ago
|
||
mozreview-review |
Comment on attachment 8987863 [details] Bug 1467840 - Use a JobIntentService for GCM token refresh; https://reviewboard.mozilla.org/r/253138/#review260034
Attachment #8987863 -
Flags: review?(snorp) → review+
Updated•6 years ago
|
Keywords: checkin-needed
Updated•6 years ago
|
Keywords: checkin-needed
Comment hidden (mozreview-request) |
Assignee | ||
Updated•6 years ago
|
Attachment #8987863 -
Attachment is obsolete: true
Comment hidden (mozreview-request) |
Assignee | ||
Updated•6 years ago
|
Attachment #8984521 -
Attachment is obsolete: true
Assignee | ||
Updated•6 years ago
|
Attachment #8992028 -
Attachment is obsolete: true
Attachment #8992028 -
Flags: review?(sdaswani)
Assignee | ||
Updated•6 years ago
|
Attachment #8987863 -
Attachment is obsolete: false
Assignee | ||
Updated•6 years ago
|
Attachment #8984521 -
Attachment is obsolete: false
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•6 years ago
|
Attachment #8987863 -
Attachment is obsolete: true
Assignee | ||
Updated•6 years ago
|
Attachment #8984521 -
Attachment is obsolete: true
Comment 11•6 years ago
|
||
Pushed by archaeopteryx@coole-files.de: https://hg.mozilla.org/integration/mozilla-inbound/rev/90f3740655ea Migrate GeckoService to JobIntentService; r=snorp https://hg.mozilla.org/integration/mozilla-inbound/rev/e16e23725134 Use a JobIntentService for GCM token refresh; r=JanH
Comment 12•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/90f3740655ea https://hg.mozilla.org/mozilla-central/rev/e16e23725134
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Attachment #8992028 -
Flags: review?(sdaswani) → review?(nchen)
Updated•6 years ago
|
Attachment #8992028 -
Flags: review?(nchen)
Updated•3 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•