summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
index 416cc594051b..5c259d5c4093 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
@@ -342,13 +342,16 @@ public class BubbleController {
}
}
}
+ 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.MessagingStyle.class.equals(style)
- || Notification.CATEGORY_MESSAGE.equals(n.getNotification().category)
- || hasRemoteInput;
- return (isMessageType && autoBubbleMessages)
- || (n.isOngoing() && autoBubbleOngoing)
+ boolean isMessageType = Notification.CATEGORY_MESSAGE.equals(n.getNotification().category);
+ boolean isMessageStyle = Notification.MessagingStyle.class.equals(style);
+ return (((isMessageType && hasRemoteInput) || isMessageStyle) && autoBubbleMessages)
+ || (isImportantOngoing && autoBubbleOngoing)
|| autoBubbleAll;
}