If we're adding / removing a bubble, don't forget to add the overflow

One case I missed was a bubble being added/removed AND the overflow
showing... this isn't the nicest, but when the add/remove animation
is done, animate the overflow in.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 358304168
Test: manual - don't have the overflow showing, add a 6th bubble,
               observe that the overflow appears
Change-Id: I1a9cec3970f5535e935f3404fa6dbd6de2f69fa5
This commit is contained in:
Mady Mellor
2024-08-14 16:23:07 -07:00
parent fee62395a2
commit a7f2d83b61
3 changed files with 15 additions and 6 deletions
@@ -286,9 +286,10 @@ public class BubbleBarController extends IBubblesListener.Stub {
RemovedBubble removedBubble = update.removedBubbles.get(0);
BubbleBarBubble bubbleToRemove = mBubbles.remove(removedBubble.getKey());
mBubbles.put(update.addedBubble.getKey(), update.addedBubble);
boolean showOverflow = update.showOverflowChanged && update.showOverflow;
if (bubbleToRemove != null) {
mBubbleBarViewController.addBubbleAndRemoveBubble(update.addedBubble,
bubbleToRemove, isExpanding, suppressAnimation);
bubbleToRemove, isExpanding, suppressAnimation, showOverflow);
} else {
mBubbleBarViewController.addBubble(update.addedBubble, isExpanding,
suppressAnimation);