Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6b45c741 authored by Yasin Kilicdere's avatar Yasin Kilicdere
Browse files

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
parent e8dbefd4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment