Only bubble music / call notifications, not all ongoing
Test: manual
Bug: 111236845
Change-Id: I98d775b7a47f9a10e983f036af24bb814e56cd62
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
index c64f3da..5c259d5 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
@@ -342,12 +342,16 @@
}
}
}
+ boolean isCall = Notification.CATEGORY_CALL.equals(n.getNotification().category)
+ && n.isOngoing();
+ boolean isMusic = n.getNotification().hasMediaSession();
+ boolean isImportantOngoing = isMusic || isCall;
Class<? extends Notification.Style> style = n.getNotification().getNotificationStyle();
boolean isMessageType = Notification.CATEGORY_MESSAGE.equals(n.getNotification().category);
boolean isMessageStyle = Notification.MessagingStyle.class.equals(style);
return (((isMessageType && hasRemoteInput) || isMessageStyle) && autoBubbleMessages)
- || (n.isOngoing() && autoBubbleOngoing)
+ || (isImportantOngoing && autoBubbleOngoing)
|| autoBubbleAll;
}