From 2c480f88e2a25cfd9a84c7781001f70e0e440714 Mon Sep 17 00:00:00 2001 From: Sergey Serokurov Date: Mon, 11 Apr 2022 15:54:28 -0700 Subject: [PATCH] Do stack collapse after stack reorder Bug: 223912200 Test: atest SystemUITests Change-Id: I10818e9c38c48c60686c16b492f4d0792474037b --- .../android/wm/shell/bubbles/BubbleController.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java index 1a1cd5b27c53b..b6fb82852c2f8 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java @@ -1225,12 +1225,6 @@ public class BubbleController { mOverflowListener.applyUpdate(update); } - // Collapsing? Do this first before remaining steps. - if (update.expandedChanged && !update.expanded) { - mStackView.setExpanded(false); - mSysuiProxy.requestNotificationShadeTopUi(false, TAG); - } - // Do removals, if any. ArrayList> removedBubbles = new ArrayList<>(update.removedBubbles); @@ -1307,6 +1301,11 @@ public class BubbleController { mStackView.updateBubbleOrder(update.bubbles); } + if (update.expandedChanged && !update.expanded) { + mStackView.setExpanded(false); + mSysuiProxy.requestNotificationShadeTopUi(false, TAG); + } + if (update.selectionChanged && mStackView != null) { mStackView.setSelectedBubble(update.selectedBubble); if (update.selectedBubble != null) {