Merge "Revert "Remove bubble when PendingIntent is canceled"" into rvc-dev am: 7f042aaada am: 55cafb55a0 am: 6de165ea51

Change-Id: I51885cfaa6c60a64ab29aa253ffc36a0a6f7358a
This commit is contained in:
Mady Mellor
2020-04-28 16:57:29 +00:00
committed by Automerger Merge Worker

View File

@@ -54,7 +54,6 @@ import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.graphics.Rect; import android.graphics.Rect;
import android.os.Handler;
import android.os.RemoteException; import android.os.RemoteException;
import android.os.ServiceManager; import android.os.ServiceManager;
import android.service.notification.NotificationListenerService; import android.service.notification.NotificationListenerService;
@@ -177,9 +176,6 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
private IStatusBarService mBarService; private IStatusBarService mBarService;
private SysUiState mSysUiState; private SysUiState mSysUiState;
// Used to post to main UI thread
private Handler mHandler = new Handler();
// Used for determining view rect for touch interaction // Used for determining view rect for touch interaction
private Rect mTempRect = new Rect(); private Rect mTempRect = new Rect();
@@ -812,17 +808,7 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
Bubble bubble = mBubbleData.getOrCreateBubble(notif); Bubble bubble = mBubbleData.getOrCreateBubble(notif);
bubble.setInflateSynchronously(mInflateSynchronously); bubble.setInflateSynchronously(mInflateSynchronously);
bubble.inflate( bubble.inflate(
b -> { b -> mBubbleData.notificationEntryUpdated(b, suppressFlyout, showInShade),
mBubbleData.notificationEntryUpdated(b, suppressFlyout, showInShade);
if (bubble.getBubbleIntent() == null) {
return;
}
bubble.getBubbleIntent().registerCancelListener(pendingIntent -> {
mHandler.post(
() -> removeBubble(bubble.getEntry(),
BubbleController.DISMISS_INVALID_INTENT));
});
},
mContext, mStackView, mBubbleIconFactory); mContext, mStackView, mBubbleIconFactory);
} }