From d6edbca4104cd974ece339e60f4a99d2d076ae48 Mon Sep 17 00:00:00 2001 From: Mady Mellor Date: Mon, 18 Nov 2019 15:06:44 -0800 Subject: [PATCH] Reset stack position when all the bubbles are removed Test: manual 1. have stack on right side of screen 2. dismiss the stack 3. get a new bubble => observe flyout animates from correct side of bubble Bug: 145212704 Change-Id: Ia39ead10a8562a550a0eb069613f071ad53cd253 --- .../systemui/bubbles/animation/StackAnimationController.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/animation/StackAnimationController.java b/packages/SystemUI/src/com/android/systemui/bubbles/animation/StackAnimationController.java index 2ec09a9dbea24..793f8b9bc05ba 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/animation/StackAnimationController.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/animation/StackAnimationController.java @@ -686,6 +686,10 @@ public class StackAnimationController extends } else { // If there's no other bubbles, and we were in the dismiss target, reset the flag. mWithinDismissTarget = false; + // When all children are removed ensure stack position is sane + setStackPosition(mRestingStackPosition == null + ? getDefaultStartPosition() + : mRestingStackPosition); } }