summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mady Mellor <madym@google.com> 2018-12-05 14:53:46 -0800
committer Mady Mellor <madym@google.com> 2018-12-05 14:53:46 -0800
commit711f9561e5d733e8711952566ffc5267db4550d9 (patch)
tree80af5800b7633cbae9b45b6069801c9db4e78138
parente3175370f99919dab91d161c80c1c02cfea0a127 (diff)
Only bubble music / call notifications, not all ongoing
Test: manual Bug: 111236845 Change-Id: I98d775b7a47f9a10e983f036af24bb814e56cd62
-rw-r--r--packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
index c64f3da84bec..5c259d5c4093 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 @@ 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.CATEGORY_MESSAGE.equals(n.getNotification().category);
boolean isMessageStyle = Notification.MessagingStyle.class.equals(style);
return (((isMessageType && hasRemoteInput) || isMessageStyle) && autoBubbleMessages)
- || (n.isOngoing() && autoBubbleOngoing)
+ || (isImportantOngoing && autoBubbleOngoing)
|| autoBubbleAll;
}