Last Comment Bug 737392 - Start onResume() observers in a Runnable
: Start onResume() observers in a Runnable
Product: Core
Classification: Components
Component: Widget: Android (show other bugs)
: Trunk
: All All
-- normal (vote)
: mozilla14
Assigned To: Mounir Lamouri (:mounir)
: Jim Chen [:jchen] [:darchons]
Depends on:
Blocks: 720795
  Show dependency treegraph
Reported: 2012-03-20 06:19 PDT by Mounir Lamouri (:mounir)
Modified: 2012-03-21 03:52 PDT (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch v1 (1.17 KB, patch)
2012-03-20 06:19 PDT, Mounir Lamouri (:mounir)
doug.turner: review+
Details | Diff | Splinter Review

Description User image Mounir Lamouri (:mounir) 2012-03-20 06:19:35 PDT
Created attachment 607519 [details] [diff] [review]
Patch v1

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.
Comment 1 User image Mounir Lamouri (:mounir) 2012-03-20 06:22:21 PDT
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.
Comment 2 User image Mounir Lamouri (:mounir) 2012-03-21 03:52:10 PDT

Note You need to log in before you can comment on or make changes to this bug.