From 2e09b5d479a60a45e9109c5ad4212c7522399003 Mon Sep 17 00:00:00 2001 From: Mady Mellor Date: Mon, 27 Apr 2020 21:20:27 +0000 Subject: Revert "Remove bubble when PendingIntent is canceled" This reverts commit 4cbc14285f30306b230c1bd52ec4a2106952f673. Reason for revert: unintentional side effects that would impact dogfood Change-Id: I2961d0e67cee52fc49b04d8857d4b8717433cea5 Bug: 151104690 --- .../com/android/systemui/bubbles/BubbleController.java | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java index a1fff9412eb2..e488cf271fdf 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java @@ -54,7 +54,6 @@ import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.content.res.Configuration; import android.graphics.Rect; -import android.os.Handler; import android.os.RemoteException; import android.os.ServiceManager; import android.service.notification.NotificationListenerService; @@ -175,9 +174,6 @@ public class BubbleController implements ConfigurationController.ConfigurationLi private IStatusBarService mBarService; private SysUiState mSysUiState; - // Used to post to main UI thread - private Handler mHandler = new Handler(); - // Used for determining view rect for touch interaction private Rect mTempRect = new Rect(); @@ -803,17 +799,7 @@ public class BubbleController implements ConfigurationController.ConfigurationLi Bubble bubble = mBubbleData.getOrCreateBubble(notif); bubble.setInflateSynchronously(mInflateSynchronously); bubble.inflate( - b -> { - mBubbleData.notificationEntryUpdated(b, suppressFlyout, showInShade); - if (bubble.getBubbleIntent() == null) { - return; - } - bubble.getBubbleIntent().registerCancelListener(pendingIntent -> { - mHandler.post( - () -> removeBubble(bubble.getEntry(), - BubbleController.DISMISS_INVALID_INTENT)); - }); - }, + b -> mBubbleData.notificationEntryUpdated(b, suppressFlyout, showInShade), mContext, mStackView, mBubbleIconFactory); } -- cgit v1.2.3-59-g8ed1b