Suppress the bubble animation on updates
When a bubble is updated, we now suppress the animation when needed.
This prevents the animation from playing on the lock screen, when
the shade is open, when the IME is visible, etc.
Note that for new bubbles we were already suppressing the animation.
The issue fixed by this change is only observed for updated bubbles.
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 377618253
Fixes: 377624611
Test: manual
- tap qsb or launch any app and show the keyboard
- send an update to a bubble
- observe the flyout is not appearing
- repeat with shade open and on lock screen
Change-Id: Id78e0cfbc413bcebaf6445cecacaaf34b36ed411
diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java
index 30e4e47..d564a19 100644
--- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java
@@ -420,8 +420,13 @@
// Updates mean the dot state may have changed; any other changes were updated in
// the populateBubble step.
BubbleBarBubble bb = mBubbles.get(update.updatedBubble.getKey());
- mBubbleBarViewController.animateBubbleNotification(
- bb, /* isExpanding= */ false, /* isUpdate= */ true);
+ if (suppressAnimation) {
+ // since we're not animating this update, we should update the dot visibility here.
+ bb.getView().updateDotVisibility(/* animate= */ false);
+ } else {
+ mBubbleBarViewController.animateBubbleNotification(
+ bb, /* isExpanding= */ false, /* isUpdate= */ true);
+ }
}
if (update.bubbleKeysInOrder != null && !update.bubbleKeysInOrder.isEmpty()) {
// Create the new list