Closed
Bug 863103
Opened 11 years ago
Closed 11 years ago
Add BackgroundService runIntentInService() and WakeLock
Categories
(Firefox for Android Graveyard :: Android Sync, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 23
People
(Reporter: cpeterson, Assigned: cpeterson)
References
Details
After reviewing Google's Cloud Messaging (GCM) implementation, here are two BackgroundService additions that may be useful: 1. Add runIntentInService() utility method to ensure the original Intent's extras are copied to rebroadcast Intent: https://code.google.com/p/gcm/source/browse/gcm-client/src/com/google/android/gcm/GCMBaseIntentService.java?r=3f8285f108caecf9ee040cdadda3a024b81f7e3e#268 2. Add WakeLock to ensure BackgroundService receives the Intent after the BroadcastReceiver returns. GCM releases its WakeLock at the end of onHandleIntent(): https://code.google.com/p/gcm/source/browse/gcm-client/src/com/google/android/gcm/GCMBaseIntentService.java?r=3f8285f108caecf9ee040cdadda3a024b81f7e3e#241 Can we safely assume that Android will always call our onDestroy() method? This change is tricky because it relies on every subclass calling super.onHandleIntent() and super.onDestroy() (if the subclass has overridden those methods). Also, we might be able to remove the ugly EXTRA_RELEASE_WAKE_LOCK extra if we assume BackgroundServices are always launched from runIntentForService() and thus called acquireWakeLock().
Assignee | ||
Comment 1•11 years ago
|
||
https://github.com/mozilla-services/android-sync/pull/307
Comment 2•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/8e57ba27d6dd
Whiteboard: [leave open]
Target Milestone: --- → Firefox 23
Comment 3•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/8e57ba27d6dd
Assignee | ||
Updated•11 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [leave open]
Updated•7 years ago
|
Product: Android Background Services → Firefox for Android
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
•