Do not animate bubbles from initial update [4/N]

Bubbles that are restored with initial update should not be animated in.
If we restore the bubble bar after rotation, we need to show it
immediately. Attempting to animate the bubbles from initial update
causes the UI to flicker.

Bug: 357115534
Test: on home screen, have bubble bar expanded, rotate device, check
  bubble bar bubbles do not flicker after rotation
Test: have no bubbles in bubble bar, trigger a bubble, check it is
  animated
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: I3da2bc22588c0f5d2dd9c7a3adfcd2c19c339809
This commit is contained in:
Ats Jenk
2025-04-25 16:24:43 -07:00
parent 14474695a2
commit 6c7cb1a5f0
4 changed files with 14 additions and 13 deletions
@@ -1110,7 +1110,7 @@ public class BubbleBarViewController {
if (mOverflowAdded == showOverflow) return;
mOverflowAdded = showOverflow;
if (mOverflowAdded) {
mBarView.addBubble(mOverflowBubble.getView());
mBarView.addBubble(mOverflowBubble.getView(), /* suppressAnimation= */ true);
mOverflowBubble.getView().setOnClickListener(mBubbleClickListener);
mOverflowBubble.getView().setController(mBubbleViewController);
} else {
@@ -1157,7 +1157,7 @@ public class BubbleBarViewController {
if (b != null) {
BubbleView bubbleToSelectView =
bubbleToSelect == null ? null : bubbleToSelect.getView();
mBarView.addBubble(b.getView(), bubbleToSelectView);
mBarView.addBubble(b.getView(), bubbleToSelectView, suppressAnimation);
b.getView().setOnClickListener(mBubbleClickListener);
mBubbleDragController.setupBubbleView(b.getView());
b.getView().setController(mBubbleViewController);