Check bubble count for initial state animation
With optional overflow, we need to check for actual bubble count
before animating the bubble bar to its initial state.
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 359403793
Test: manual
- create first bubble on home
- observe bubble bar animates correctly to initial state
- add second bubble
- observe bubble bar bounces correctly and does not slide
in from the bottom of the screen
Change-Id: I53a34bc00b24e8a6504bcca0532054755554b9ac
This commit is contained in:
@@ -579,9 +579,8 @@ public class BubbleBarViewController {
|
||||
public void animateBubbleNotification(BubbleBarBubble bubble, boolean isExpanding,
|
||||
boolean isUpdate) {
|
||||
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 && !isUpdate) {
|
||||
// if this is the first bubble, animate to the initial state.
|
||||
if (mBarView.getBubbleChildCount() == 1 && !isUpdate) {
|
||||
mBubbleBarViewAnimator.animateToInitialState(bubble, isInApp, isExpanding);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user