diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java index f614dc66ea..45a9fa16e3 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java @@ -98,7 +98,6 @@ public class BubbleBarViewController { mBarView = barView; mSystemUiProxy = SystemUiProxy.INSTANCE.get(mActivity); mBubbleBarAlpha = new MultiValueAlpha(mBarView, 1 /* num alpha channels */); - mBubbleBarAlpha.setUpdateVisibility(true); mIconSize = activity.getResources().getDimensionPixelSize( R.dimen.bubblebar_icon_size); } @@ -408,7 +407,19 @@ public class BubbleBarViewController { b.getView().setOnClickListener(mBubbleClickListener); mBubbleDragController.setupBubbleView(b.getView()); + if (b instanceof BubbleBarOverflow) { + return; + } + if (suppressAnimation || !(b instanceof BubbleBarBubble bubble)) { + // the bubble bar and handle are initialized as part of the first bubble animation. + // if the animation is suppressed, immediately stash or show the bubble bar to + // ensure they've been initialized. + if (mTaskbarStashController.isInApp()) { + mBubbleStashController.stashBubbleBarImmediate(); + } else { + mBubbleStashController.showBubbleBarImmediate(); + } return; } animateBubbleNotification(bubble, isExpanding); diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleStashController.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleStashController.java index 5d01b9bd08..74ddf90afc 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleStashController.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleStashController.java @@ -418,6 +418,7 @@ public class BubbleStashController { /** Stashes the bubble bar immediately without animation. */ public void stashBubbleBarImmediate() { mHandleViewController.setTranslationYForSwipe(0); + mBubbleStashedHandleAlpha.setValue(1); mIconAlphaForStash.setValue(0); mIconTranslationYForStash.updateValue(getStashTranslation()); mIconScaleForStash.updateValue(STASHED_BAR_SCALE);