Call onBeforeUserSwitching event in callbacks' executor.
In SystemUI.UserTrackerImpl, onBeforeUserSwitching is called in the current thread, not in the callback's executor. This causes a FATAL exception in SystemUI process in this flow: 1. UserTrackerImpl.onBeforeUserSwitching 2. UserTrackerImpl.handleBeforeUserSwitching Assert.isNotMainThread() 3. NotificationShadeWindowControllerImpl.onBeforeUserSwitching 4. NotificationShadeWindowControllerImpl.setIsSwitchingUsers 5. NotificationShadeWindowControllerImpl.apply 6. NotificationShadeWindowControllerImpl.notifyStateChangedCallbacks 7. SystemActions.onStateChanged 8. SystemActions.registerOrUnregisterDismissNotificationShadeAction Assert.isMainThread(); This two asserts contradict with each other since the callback is called on the same thread, but it should be in the given executor. This CL fixes this issue. Bug: 326068767 Test: None Flag: None Change-Id: I7a494f741218bebdd52f19feafdf8f9f30ada920
Loading
Please register or sign in to comment