summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Liran Binyamin <liranb@google.com> 2023-11-07 17:28:13 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-11-07 17:28:13 +0000
commitd0bd4a1a687ae322e90a6d251ac304d6da5c353e (patch)
tree18e3a9de17e25d2dec2eb5221459bcddc94bdfac
parent6d222434376291851287c26b9f9a528587880987 (diff)
parent74d9a0b96af01a00add7b7cf6b466b8b4960f51b (diff)
Merge "Reset the expanded bubble after dismissing the stack" into main
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java
index 9402d028ecc4..87461dcb0515 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java
@@ -1829,9 +1829,12 @@ public class BubbleStackView extends FrameLayout
}
bubble.cleanupViews(); // cleans up the icon view
updateExpandedView(); // resets state for no expanded bubble
+ mExpandedBubble = null;
});
logBubbleEvent(bubble, FrameworkStatsLog.BUBBLE_UICHANGED__ACTION__DISMISSED);
return;
+ } else if (getBubbleCount() == 1) {
+ mExpandedBubble = null;
}
// Remove it from the views
for (int i = 0; i < getBubbleCount(); i++) {
@@ -2420,14 +2423,13 @@ public class BubbleStackView extends FrameLayout
mExpandedAnimationController.notifyPreparingToCollapse();
updateOverflowDotVisibility(false /* expanding */);
- final Runnable collapseBackToStack = () -> mExpandedAnimationController.collapseBackToStack(
- mStackAnimationController
- .getStackPositionAlongNearestHorizontalEdge()
- /* collapseTo */,
- () -> {
- mBubbleContainer.setActiveController(mStackAnimationController);
- updateOverflowVisibility();
- });
+ final Runnable collapseBackToStack = () ->
+ mExpandedAnimationController.collapseBackToStack(
+ mStackAnimationController.getStackPositionAlongNearestHorizontalEdge(),
+ () -> {
+ mBubbleContainer.setActiveController(mStackAnimationController);
+ updateOverflowVisibility();
+ });
final Runnable after = () -> {
final BubbleViewProvider previouslySelected = mExpandedBubble;