Animate the bubble bar on dismiss

When the last remaining bubble is dismissed by drag or from the menu
we now fade out the bubble bar.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 347062801
Test: manual
       - create a single bubble in the bar
       - expand
       - dismiss by drag or from menu
       - observe animation
Change-Id: I86fcaf04c6f5949126744b81e0042b0e58318a13
This commit is contained in:
Liran Binyamin
2024-11-26 15:42:14 -05:00
parent c48b4ed025
commit 7e387fa505
5 changed files with 88 additions and 34 deletions
@@ -586,13 +586,17 @@ public class BubbleBarViewController {
public void setHiddenForBubbles(boolean hidden) {
if (mHiddenForNoBubbles != hidden) {
mHiddenForNoBubbles = hidden;
updateVisibilityForStateChange();
if (hidden) {
mBarView.setAlpha(0);
mBarView.setExpanded(false);
adjustTaskbarAndHotseatToBubbleBarState(/* isBubbleBarExpanded = */ false);
mBarView.dismiss(() -> {
updateVisibilityForStateChange();
mBarView.setExpanded(false);
adjustTaskbarAndHotseatToBubbleBarState(/* isBubbleBarExpanded= */ false);
mActivity.bubbleBarVisibilityChanged(/* isVisible= */ false);
});
} else {
updateVisibilityForStateChange();
mActivity.bubbleBarVisibilityChanged(/* isVisible= */ true);
}
mActivity.bubbleBarVisibilityChanged(!hidden);
}
}
@@ -625,7 +629,6 @@ public class BubbleBarViewController {
}
}
// TODO: (b/273592694) animate it
private void updateVisibilityForStateChange() {
if (!mHiddenForSysui && !mHiddenForNoBubbles && !mHiddenForStashed) {
mBarView.setVisibility(VISIBLE);