Created attachment 607519 [details] [diff] [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.
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.