diff options
| author | 2024-02-20 17:12:21 +0000 | |
|---|---|---|
| committer | 2024-02-22 16:39:31 +0000 | |
| commit | 6b45c74183d65b933aa6e62e99a6aa5d56bf3c59 (patch) | |
| tree | 0553c1097a5ac2a008acaa96e1f5a35613ee739c /api/api.go | |
| parent | e8dbefd4d60e51106881725500200c6392424c83 (diff) | |
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
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions