From 38dc7ef520098f83731ea8b3eba76e076f914997 Mon Sep 17 00:00:00 2001 From: Liran Binyamin Date: Fri, 13 Dec 2024 20:30:47 -0500 Subject: [PATCH] Fix bar visibility after dismissing while stashed When updating the bubble bar visibility, allow it to become visible if the only hidden bit is the stashed one and we're animating. This fixes the visibility issue that appears after dismissing the bar while stashed, and then sending an initial bubble, while still stashed. Flag: com.android.wm.shell.enable_bubble_bar Fixes: 383620113 Test: manual - create bubble - launch app - dismiss bubble with adb - create bubble with adb - observe bubble bar is visible during the animation Change-Id: I7a955de068867829b3ccab11b2b0adc8d8e10239 --- .../taskbar/bubbles/BubbleBarViewController.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java index dd1b0ca87e..46ad0f5e39 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java @@ -650,10 +650,12 @@ public class BubbleBarViewController { } private void updateVisibilityForStateChange() { - if (!mHiddenForSysui && !mHiddenForNoBubbles && !mHiddenForStashed) { - mBarView.setVisibility(VISIBLE); - } else { + boolean hiddenForStashedAndNotAnimating = + mHiddenForStashed && !mBubbleBarViewAnimator.isAnimating(); + if (mHiddenForSysui || mHiddenForNoBubbles || hiddenForStashedAndNotAnimating) { mBarView.setVisibility(INVISIBLE); + } else { + mBarView.setVisibility(VISIBLE); } } @@ -1215,6 +1217,7 @@ public class BubbleBarViewController { pw.println("Bubble bar view controller state:"); pw.println(" mHiddenForSysui: " + mHiddenForSysui); pw.println(" mHiddenForNoBubbles: " + mHiddenForNoBubbles); + pw.println(" mHiddenForStashed: " + mHiddenForStashed); pw.println(" mShouldShowEducation: " + mShouldShowEducation); pw.println(" mBubbleBarTranslationY.value: " + mBubbleBarTranslationY.value); pw.println(" mBubbleBarSwipeUpTranslationY: " + mBubbleBarSwipeUpTranslationY);