Skip to content
Commit 6d4d8ed1 authored by Winson Chung's avatar Winson Chung
Browse files

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: default avatarWinson Chung <winsonc@google.com>
parent 573555ff
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