From 0b114ebd46ec9e8a6509c09b80d5bb8cb9bd2b06 Mon Sep 17 00:00:00 2001 From: Liran Binyamin Date: Wed, 17 Apr 2024 11:22:04 -0400 Subject: [PATCH] Suppress bubble animation when bar is hidden This change suppresses the new bubble animation when the notification shade is open and when the device is locked. Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT Fixes: 332912942 Test: manual - Use test app to trigger a bubble with delay - Lock the device/pull down the notification shade - Observe the bubble is not animating - Unlock/collapse the shade - Observe new bubble was added to the bubble bar Change-Id: I0b1d42a9d57b29807f113ae45ff60349341272ef --- .../launcher3/taskbar/bubbles/BubbleBarController.java | 7 +++++-- .../launcher3/taskbar/bubbles/BubbleBarViewController.java | 5 +++++ 2 files changed, 10 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 a2c1b07112..981c9f929c 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java @@ -313,8 +313,11 @@ public class BubbleBarController extends IBubblesListener.Stub { || (!update.expandedChanged && !mBubbleBarViewController.isExpanded()); final boolean isExpanding = update.expandedChanged && update.expanded; // don't animate bubbles if this is the initial state because we may be unfolding or - // enabling gesture nav - final boolean suppressAnimation = update.initialState; + // enabling gesture nav. also suppress animation if the bubble bar is hidden for sysui e.g. + // the shade is open, or we're locked. + final boolean suppressAnimation = + update.initialState || mBubbleBarViewController.isHiddenForSysui(); + BubbleBarItem previouslySelectedBubble = mSelectedBubble; BubbleBarBubble bubbleToSelect = null; if (!update.removedBubbles.isEmpty()) { diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java index aa1b4dfb40..86d8a9bfc2 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java @@ -266,6 +266,11 @@ public class BubbleBarViewController { mBarView.setUpdateSelectedBubbleAfterCollapse(updateSelectedBubbleAfterCollapse); } + /** Returns whether the bubble bar should be hidden because of the current sysui state. */ + boolean isHiddenForSysui() { + return mHiddenForSysui; + } + /** * Sets whether the bubble bar should be hidden due to SysUI state (e.g. on lockscreen). */