Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java +4 −0 Original line number Diff line number Diff line Loading @@ -2177,6 +2177,9 @@ public class BubbleStackView extends FrameLayout // bubble window so do that at the end of the animation so we see the scrim animate). BadgedImageView iconView = bubble.getIconView(); final BubbleViewProvider expandedBubbleBeforeScrim = mExpandedBubble; // Notify the stack anim controller before running the scrim animation. In case // another bubble gets added during it. mStackAnimationController.onLastBubbleRemoved(); showScrim(false, () -> { mRemovingLastBubbleWhileExpanded = false; bubble.cleanupExpandedView(); Loading @@ -2201,6 +2204,7 @@ public class BubbleStackView extends FrameLayout return; } else if (getBubbleCount() == 1) { mExpandedBubble = null; mStackAnimationController.onLastBubbleRemoved(); } // Remove it from the views for (int i = 0; i < getBubbleCount(); i++) { Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java +7 −4 Original line number Diff line number Diff line Loading @@ -425,6 +425,13 @@ public class StackAnimationController extends return stackPos; } /** * Clean up state when all bubbles have been removed */ public void onLastBubbleRemoved() { mFloatingContentCoordinator.onContentRemoved(mStackFloatingContent); } /** Description of current animation controller state. */ public void dump(PrintWriter pw) { pw.println("StackAnimationController state:"); Loading Loading @@ -749,10 +756,6 @@ public class StackAnimationController extends } else { // When all children are removed ensure stack position is sane mPositioner.setRestingPosition(mPositioner.getRestingPosition()); // Remove the stack from the coordinator since we don't have any bubbles and aren't // visible. mFloatingContentCoordinator.onContentRemoved(mStackFloatingContent); } } Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/animation/StackAnimationControllerTest.java +4 −0 Original line number Diff line number Diff line Loading @@ -261,6 +261,10 @@ public class StackAnimationControllerTest extends PhysicsAnimationLayoutTestCase mLayout.removeView(mLayout.getChildAt(0)); } // FloatingContentCoordinator only reacts to onLastBubbleRemoved verify(mFloatingContentCoordinator, never()).onContentRemoved(any()); mStackController.onLastBubbleRemoved(); verify(mFloatingContentCoordinator, times(1)).onContentRemoved(any()); } Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java +4 −0 Original line number Diff line number Diff line Loading @@ -2177,6 +2177,9 @@ public class BubbleStackView extends FrameLayout // bubble window so do that at the end of the animation so we see the scrim animate). BadgedImageView iconView = bubble.getIconView(); final BubbleViewProvider expandedBubbleBeforeScrim = mExpandedBubble; // Notify the stack anim controller before running the scrim animation. In case // another bubble gets added during it. mStackAnimationController.onLastBubbleRemoved(); showScrim(false, () -> { mRemovingLastBubbleWhileExpanded = false; bubble.cleanupExpandedView(); Loading @@ -2201,6 +2204,7 @@ public class BubbleStackView extends FrameLayout return; } else if (getBubbleCount() == 1) { mExpandedBubble = null; mStackAnimationController.onLastBubbleRemoved(); } // Remove it from the views for (int i = 0; i < getBubbleCount(); i++) { Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java +7 −4 Original line number Diff line number Diff line Loading @@ -425,6 +425,13 @@ public class StackAnimationController extends return stackPos; } /** * Clean up state when all bubbles have been removed */ public void onLastBubbleRemoved() { mFloatingContentCoordinator.onContentRemoved(mStackFloatingContent); } /** Description of current animation controller state. */ public void dump(PrintWriter pw) { pw.println("StackAnimationController state:"); Loading Loading @@ -749,10 +756,6 @@ public class StackAnimationController extends } else { // When all children are removed ensure stack position is sane mPositioner.setRestingPosition(mPositioner.getRestingPosition()); // Remove the stack from the coordinator since we don't have any bubbles and aren't // visible. mFloatingContentCoordinator.onContentRemoved(mStackFloatingContent); } } Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/animation/StackAnimationControllerTest.java +4 −0 Original line number Diff line number Diff line Loading @@ -261,6 +261,10 @@ public class StackAnimationControllerTest extends PhysicsAnimationLayoutTestCase mLayout.removeView(mLayout.getChildAt(0)); } // FloatingContentCoordinator only reacts to onLastBubbleRemoved verify(mFloatingContentCoordinator, never()).onContentRemoved(any()); mStackController.onLastBubbleRemoved(); verify(mFloatingContentCoordinator, times(1)).onContentRemoved(any()); } Loading