Remove some blocking calls in BubbleManager
- When shell thread is enabled, there's a deadlock that can happen from
having blocking calls from both Shell -> SysUI and vice versa.
Specifically if you have a scenario like:
Shell SysUI
A ----------------> f() (shell blocking call, posts onto thread & awaits)
|
g() <-------------- B (sysui blocking call while f() is posted)
| |
| V
V f() runs
g() runs
The call f() will never actually run since B came in which is blocked
on g() which can't finish because f() has not returned.
- Instead, replace some blocking calls with preloaded info (ie. can send
bubble entry and whether the the entry should bubble up to
onRankingUpdated since it just calls back to query it), and make
getShouldRestoredEntries() and getPendingOrActiveEntry() async with
a callback.
- Can remove isNotificationShadeExpand() since it's not actually used
anymore in bubble code
Bug: 161979899
Test: atest WMShellUnitTests
Test: atest SystemUITests
Change-Id: Iba834172c17c3f4b03c23448fef346c71c16c1bb
Signed-off-by: Winson Chung <winsonc@google.com>
Loading
Please register or sign in to comment