Fix bubble bar visibility issue

Update the bubble bar visibility for the initial bubble if the animation
is suppressed, e.g. if we're creating the bubble when the shade is open.

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 382693837
Test: manual
       - enable bubbles
       - remove all conversations from the list of allowed to bubble
       - create notification
       - open shade and click on the bubble button to bubble the notification
       - observe bubble bar becomes visible

Change-Id: If771c28998b2b091f4f1ab38001e9485ed1ed849
This commit is contained in:
Liran Binyamin committed 2024-12-12 15:36:29 -08:00
1 parent 1d1bffbf0b
commit 138dd0bc5f
1 file changed
+3 -2
@@ -442,10 +442,11 @@ public class BubbleBarController extends IBubblesListener.Stub {
}
}
// Update the visibility if this is the initial state or if there are no bubbles.
// Update the visibility if this is the initial state, if there are no bubbles, or if the
// animation is suppressed.
// If this is the initial bubble, the bubble bar will become visible as part of the
// animation.
if (update.initialState || mBubbles.isEmpty()) {
if (update.initialState || mBubbles.isEmpty() || suppressAnimation) {
mBubbleBarViewController.setHiddenForBubbles(mBubbles.isEmpty());
}
mBubbleStashedHandleViewController.ifPresent(