diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java index ffab936d14..1f0851f6f6 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java @@ -1320,7 +1320,7 @@ public class BubbleBarView extends FrameLayout { } /** Returns the child count excluding the overflow if it's present. */ - private int getBubbleChildCount() { + int getBubbleChildCount() { return hasOverflow() ? getChildCount() - 1 : getChildCount(); } diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java index 4fe4ace5d1..cd0bca65e6 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java @@ -583,9 +583,8 @@ public class BubbleBarViewController { public void animateBubbleNotification(BubbleBarBubble bubble, boolean isExpanding, boolean isUpdate) { boolean isInApp = mTaskbarStashController.isInApp(); - // if this is the first bubble, animate to the initial state. one bubble is the overflow - // so check for at most 2 children. - if (mBarView.getChildCount() <= 2 && !isUpdate) { + // if this is the first bubble, animate to the initial state. + if (mBarView.getBubbleChildCount() == 1 && !isUpdate) { mBubbleBarViewAnimator.animateToInitialState(bubble, isInApp, isExpanding); return; }