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
This commit is contained in:
Liran Binyamin committed 2024-12-13 20:30:47 -05:00
1 parent 0bcafa66d4
commit 38dc7ef520
1 file changed
+6 -3
@@ -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);