Loading
Exclude running code for receivers and observers from timing.
Exclude time used by registering/unregistering broadcast receivers and user switch observers from the time measuraments of the tests. In this CL mRunner.resumeTiming(); calls are moved after the broadcastWaiter initialisation. Also UserSwitchWaiter was not unregistering UserSwitchObserver. That is imlemented and the class is refactored to keep registering and unregistering out of the timed portion by putting those logic into the setUp and the tearDown of the test. Bug: 169449457 Test: atest MultiUserPerfTests:android.multiuser.UserLifecycleTests --no-bazel-mode Change-Id: I04fdaf04ba8440889d60d6cf6f7b5554539af13a