Closed Bug 737392 Opened 9 years ago Closed 9 years ago

Start onResume() observers in a Runnable

Categories

(Core :: Widget: Android, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: mounir, Assigned: mounir)

References

Details

Attachments

(1 file)

Attached patch Patch v1Splinter Review
Bug 720795 is adding a third observer that is started when onResume() is called which creates a startup regression. I believe we could fix that by starting all observers in a runnable. We don't really care if the event comes a few ms later.
Actually, I believe this patch might improve our startup time of a few milliseconds.
Attachment #607519 - Flags: review?(doug.turner)
Actually, if onPause() is called just after onResume() and before the Runnable is executed, we might end up in unknown state. Though, both are callbacks called by the system. Can we safely assume the runnable will be always called between those? Even more given that onPause() is called when the app is put in background which means that it requires a user interaction.
OS: Linux → All
Hardware: x86_64 → All
Whiteboard: [needs review]
Attachment #607519 - Flags: review?(doug.turner) → review+
Whiteboard: [needs review]
https://hg.mozilla.org/mozilla-central/rev/bde5f8aaa7e4
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
You need to log in before you can comment on or make changes to this bug.