Add settings for notification bubbling
And a new api to consolidate that information for notification
listeners
Test: atest
Bug: 123543052
Change-Id: I61d1718ef5b5bb8ab824d4c3efff511669266313
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
index 404f2e5..b3a52f9 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
@@ -441,20 +441,9 @@
@VisibleForTesting
protected boolean shouldBubble(NotificationEntry entry) {
StatusBarNotification n = entry.notification;
- boolean canAppOverlay = false;
- try {
- canAppOverlay = mNotificationManagerService.areBubblesAllowedForPackage(
- n.getPackageName(), n.getUid());
- } catch (RemoteException e) {
- Log.w(TAG, "Error calling NoMan to determine if app can overlay", e);
- }
-
- NotificationChannel channel = mNotificationEntryManager.getNotificationData().getChannel(
- entry.key);
- boolean canChannelOverlay = channel != null && channel.canBubble();
boolean hasOverlayIntent = n.getNotification().getBubbleMetadata() != null
&& n.getNotification().getBubbleMetadata().getIntent() != null;
- return hasOverlayIntent && canChannelOverlay && canAppOverlay;
+ return hasOverlayIntent && entry.canBubble;
}
/**