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 7b92713268e7d..e5ffe91aebbe5 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 @@ -1497,22 +1497,22 @@ public class BubbleStackView extends FrameLayout mStackAnimationController.setStackPosition(mPositioner.getDefaultStartPosition()); } - if (getBubbleCount() == 0) { - mStackOnLeftOrWillBe = mStackAnimationController.isStackOnLeftSide(); - } - if (bubble.getIconView() == null) { return; } + mBubbleContainer.addView(bubble.getIconView(), 0, + new FrameLayout.LayoutParams(mPositioner.getBubbleSize(), + mPositioner.getBubbleSize())); + + if (getBubbleCount() == 0) { + mStackOnLeftOrWillBe = mStackAnimationController.isStackOnLeftSide(); + } // Set the dot position to the opposite of the side the stack is resting on, since the stack // resting slightly off-screen would result in the dot also being off-screen. bubble.getIconView().setDotBadgeOnLeft(!mStackOnLeftOrWillBe /* onLeft */); bubble.getIconView().setOnClickListener(mBubbleClickListener); bubble.getIconView().setOnTouchListener(mBubbleTouchListener); - mBubbleContainer.addView(bubble.getIconView(), 0, - new FrameLayout.LayoutParams(mPositioner.getBubbleSize(), - mPositioner.getBubbleSize())); updateBubbleShadows(false /* showForAllBubbles */); animateInFlyoutForBubble(bubble); requestUpdate(); diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java index 8043d2b8b2f92..12d55b85fac6a 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java @@ -124,9 +124,6 @@ public class StackAnimationController extends */ private Rect mAnimatingToBounds = new Rect(); - /** Initial starting location for the stack. */ - @Nullable private BubbleStackView.RelativeStackPosition mStackStartPosition; - /** Whether or not the stack's start position has been set. */ private boolean mStackMovedToStartPosition = false;