summaryrefslogtreecommitdiff
path: root/com/android/server/notification/ZenModeFiltering.java
diff options
context:
space:
mode:
Diffstat (limited to 'com/android/server/notification/ZenModeFiltering.java')
-rw-r--r--com/android/server/notification/ZenModeFiltering.java21
1 files changed, 4 insertions, 17 deletions
diff --git a/com/android/server/notification/ZenModeFiltering.java b/com/android/server/notification/ZenModeFiltering.java
index abf29006..a7a2743d 100644
--- a/com/android/server/notification/ZenModeFiltering.java
+++ b/com/android/server/notification/ZenModeFiltering.java
@@ -117,19 +117,15 @@ public class ZenModeFiltering {
ZenLog.traceIntercepted(record, "alarmsOnly");
return true;
case Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS:
+ if (isAlarm(record)) {
+ // Alarms are always priority
+ return false;
+ }
// allow user-prioritized packages through in priority mode
if (record.getPackagePriority() == Notification.PRIORITY_MAX) {
ZenLog.traceNotIntercepted(record, "priorityApp");
return false;
}
-
- if (isAlarm(record)) {
- if (!config.allowAlarms) {
- ZenLog.traceIntercepted(record, "!allowAlarms");
- return true;
- }
- return false;
- }
if (isCall(record)) {
if (config.allowRepeatCallers
&& REPEAT_CALLERS.isRepeat(mContext, extras(record))) {
@@ -163,15 +159,6 @@ public class ZenModeFiltering {
}
return false;
}
- AudioAttributes aa = record.getAudioAttributes();
- if (aa != null && AudioAttributes.SUPPRESSIBLE_USAGES.get(aa.getUsage()) ==
- AudioAttributes.SUPPRESSIBLE_MEDIA_SYSTEM_OTHER) {
- if (!config.allowMediaSystemOther) {
- ZenLog.traceIntercepted(record, "!allowMediaSystemOther");
- return true;
- }
- return false;
- }
ZenLog.traceIntercepted(record, "!priority");
return true;
default: