Fix summary cancel logic for experimental bubbles

Some apps seems to cancel their summary notification when you open a chat
and interact with it. For experimental bubbles we *don't* remove bubbles
for a cancel because the app doesn't know about them / hasn't adjusted
their notification lifecycle to account for them. I missed the notification
summary path initially, this fixes that.

Test: 1) go/use-bubbles : have experiment running
      2) get a bunch of notifs from app so there's a summary
      3) make one of the children bubble via longpress menu
      4) expand bubble & cause summary to be canceled by the app somehow
      => Note that the bubble remains on screen & is interactive
Bug: 145763712
Bug: 146093179

Change-Id: Idc27a99c87b41a47894a9460bdc56e2389afda28
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
index 1277736..61e00cd 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
@@ -103,7 +103,6 @@
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.List;
 import java.util.function.Consumer;
 
 import javax.inject.Inject;
@@ -720,9 +719,16 @@
             return !isAutogroupSummary;
         } else {
             // If it's not a user dismiss it's a cancel.
+            for (int i = 0; i < bubbleChildren.size(); i++) {
+                // First check if any of these are user-created (i.e. experimental bubbles)
+                if (mUserCreatedBubbles.contains(bubbleChildren.get(i).getKey())) {
+                    // Experimental bubble! Intercept the removal.
+                    return true;
+                }
+            }
+            // Not an experimental bubble, safe to remove.
             mBubbleData.removeSuppressedSummary(groupKey);
-
-            // Remove any associated bubble children.
+            // Remove any associated bubble children with the summary.
             for (int i = 0; i < bubbleChildren.size(); i++) {
                 Bubble bubbleChild = bubbleChildren.get(i);
                 mBubbleData.notificationEntryRemoved(bubbleChild.getEntry(),