If an app cancels an experimental bubble, update the dot to hide

We don't honour app cancels for experimental bubbles, but we should
hide the dot on the bubble when the app cancels a notification for
an experimental bubble. Typically if an app cancels a notification
it means that content is "read" (at least for bubbles) so the dot
shouldn't be necessary.

Test: - get an experimental bubble from some conversation
      - navigate to that conversation in the app, not the bubble
      => Note that the notification is gone from the shade and the
         bubble no longer has a dot
Fixes: 147232318

Change-Id: If2a89896c7ee0c2264385c6fb501569abdc02b22
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
index e954163..70eec8a 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
@@ -971,7 +971,7 @@
      * The cancellation of summaries with children associated with bubbles are also handled in this
      * method. User-cancelled summaries are tracked by {@link BubbleData#addSummaryToSuppress}.
      *
-     * @return true if we want to intercept the dismissal of the entry, else false
+     * @return true if we want to intercept the dismissal of the entry, else false.
      */
     public boolean shouldInterceptDismissal(NotificationEntry entry, int dismissReason) {
         if (entry == null) {
@@ -1011,7 +1011,8 @@
         // The bubble notification sticks around in the data as long as the bubble is
         // not dismissed and the app hasn't cancelled the notification.
         Bubble bubble = mBubbleData.getBubbleWithKey(key);
-        boolean bubbleExtended = entry != null && entry.isBubble() && userRemovedNotif;
+        boolean bubbleExtended = entry != null && entry.isBubble()
+                && (userRemovedNotif || isUserCreatedBubble(bubble.getKey()));
         if (bubbleExtended) {
             bubble.setSuppressNotification(true);
             bubble.setShowDot(false /* show */, true /* animate */);
@@ -1020,8 +1021,7 @@
                         + ".shouldInterceptDismissal");
             }
             return true;
-        } else if (!userRemovedNotif && entry != null
-                && !isUserCreatedBubble(bubble.getKey())) {
+        } else if (!userRemovedNotif && entry != null) {
             // This wasn't a user removal so we should remove the bubble as well
             mBubbleData.notificationEntryRemoved(entry, DISMISS_NOTIF_CANCEL);
             return false;