Animate the bubble bar for the first bubble
This change animates the bubble bar for the first bubble. When we're in home -- the bubble bar bounces in and stays visible When we're in app -- the bubble bar bounces in, then animates to the stashed handle. When the bubble bar auto expands, we currently animate the bubble bar already expanded. In the future we'll time the expansion until after the bubble bar settles in. Demo: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/hIGwtb3YKyCT9Ke9adZNgY Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT Bug: 339066271 Test: atest BubbleBarViewAnimatorTest Change-Id: I80ce55676b72a50bab23623e0b5c1e602690682f
This commit is contained in:
@@ -406,10 +406,21 @@ public class BubbleBarViewController {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(b instanceof BubbleBarBubble bubble)) {
|
||||
return;
|
||||
}
|
||||
|
||||
boolean isInApp = mTaskbarStashController.isInApp();
|
||||
// if this is the first bubble, animate to the initial state. one bubble is the overflow
|
||||
// so check for at most 2 children.
|
||||
if (mBarView.getChildCount() <= 2) {
|
||||
mBubbleBarViewAnimator.animateToInitialState(bubble, isInApp, isExpanding);
|
||||
return;
|
||||
}
|
||||
|
||||
// only animate the new bubble if we're in an app and not auto expanding
|
||||
if (b instanceof BubbleBarBubble && isInApp && !isExpanding && !isExpanded()) {
|
||||
mBubbleBarViewAnimator.animateBubbleInForStashed((BubbleBarBubble) b);
|
||||
if (isInApp && !isExpanding && !isExpanded()) {
|
||||
mBubbleBarViewAnimator.animateBubbleInForStashed(bubble);
|
||||
}
|
||||
} else {
|
||||
Log.w(TAG, "addBubble, bubble was null!");
|
||||
|
||||
Reference in New Issue
Block a user