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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user