From 9e8e682477b277c56f80f8924f3c2f894a8087eb Mon Sep 17 00:00:00 2001 From: Mady Mellor Date: Thu, 11 May 2023 09:57:17 -0700 Subject: Make sure we log the last bubble removal ag/22792413 changed the logic here & returns early so it'd miss the log statement about the bubble removal. Update the code to log when the last bubble is dismissed as well. Additionally we're missing this in the code path for a dismissed suppressed bubble (pretty edge case), but add the log event in there as well... Test: manual - remove last bubble Bug: 282017959 Change-Id: I6e6e176823651d0bc8efe9e20bd573d02694a44f --- .../Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java | 2 ++ 1 file changed, 2 insertions(+) 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 e7ec7aa164e9..a50d357c157e 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 @@ -1791,6 +1791,7 @@ public class BubbleStackView extends FrameLayout bubble.cleanupViews(); // cleans up the icon view updateExpandedView(); // resets state for no expanded bubble }); + logBubbleEvent(bubble, FrameworkStatsLog.BUBBLE_UICHANGED__ACTION__DISMISSED); return; } // Remove it from the views @@ -1816,6 +1817,7 @@ public class BubbleStackView extends FrameLayout // If a bubble is suppressed, it is not attached to the container. Clean it up. if (bubble.isSuppressed()) { bubble.cleanupViews(); + logBubbleEvent(bubble, FrameworkStatsLog.BUBBLE_UICHANGED__ACTION__DISMISSED); } else { Log.d(TAG, "was asked to remove Bubble, but didn't find the view! " + bubble); } -- cgit v1.2.3-59-g8ed1b