diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java index 5b3c233a8f..e6e40d5731 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java @@ -324,7 +324,8 @@ public class BubbleBarController extends IBubblesListener.Stub { if (Flags.enableOptionalBubbleOverflow() && update.showOverflowChanged && !update.showOverflow && update.addedBubble != null - && update.removedBubbles.isEmpty()) { + && update.removedBubbles.isEmpty() + && !mBubbles.isEmpty()) { // A bubble was added from the overflow (& now it's empty / not showing) mBubbles.put(update.addedBubble.getKey(), update.addedBubble); mBubbleBarViewController.removeOverflowAndAddBubble(update.addedBubble); diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java index 37c619496d..0d0feffb40 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java @@ -729,7 +729,8 @@ public class BubbleBarView extends FrameLayout { Runnable onEndRunnable) { FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams((int) mIconSize, (int) mIconSize, Gravity.LEFT); - boolean isOverflowSelected = mSelectedBubbleView.isOverflow(); + boolean isOverflowSelected = + mSelectedBubbleView != null && mSelectedBubbleView.isOverflow(); boolean removingOverflow = removedBubble.isOverflow(); boolean addingOverflow = addedBubble.isOverflow();