diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java index 66be2a0cebea9..b292e1b99d9ff 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java @@ -2466,11 +2466,10 @@ public class BubbleStackView extends FrameLayout private void animateSwitchBubbles() { // If we're no longer expanded, this is meaningless. if (!mIsExpanded) { + mIsBubbleSwitchAnimating = false; return; } - mIsBubbleSwitchAnimating = true; - // The surface contains a screenshot of the animating out bubble, so we just need to animate // it out (and then release the GraphicBuffer). PhysicsAnimator.getInstance(mAnimatingOutSurfaceContainer).cancel(); @@ -3151,6 +3150,7 @@ public class BubbleStackView extends FrameLayout }, 0); if (!mIsExpansionAnimating) { + mIsBubbleSwitchAnimating = true; mSurfaceSynchronizer.syncSurfaceAndRun(() -> { post(this::animateSwitchBubbles); });