From 44048ba0a3a4aea52d1847e5ead636d382ca6b5a Mon Sep 17 00:00:00 2001 From: Liran Binyamin Date: Thu, 7 Nov 2024 16:41:10 -0500 Subject: [PATCH] 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 --- .../launcher3/taskbar/bubbles/BubbleBarController.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java index 30e4e47ff1..d564a19057 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 @@ public class BubbleBarController extends IBubblesListener.Stub { // 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