This repository was archived by the owner on Nov 8, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
core/java/android/service/notification
services/core/java/com/android/server/notification Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1639,7 +1639,7 @@ public static class ZenRule implements Parcelable {
1639
1639
@ UnsupportedAppUsage
1640
1640
public String name ; // required for automatic
1641
1641
@ UnsupportedAppUsage
1642
- public int zenMode ;
1642
+ public int zenMode ; // ie: Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS
1643
1643
@ UnsupportedAppUsage
1644
1644
public Uri conditionId ; // required for automatic
1645
1645
public Condition condition ; // optional
Original file line number Diff line number Diff line change @@ -179,6 +179,7 @@ private static String typeToString(int type) {
179
179
case TYPE_SUPPRESSOR_CHANGED : return "suppressor_changed" ;
180
180
case TYPE_LISTENER_HINTS_CHANGED : return "listener_hints_changed" ;
181
181
case TYPE_SET_NOTIFICATION_POLICY : return "set_notification_policy" ;
182
+ case TYPE_SET_CONSOLIDATED_ZEN_POLICY : return "set_consolidated_policy" ;
182
183
default : return "unknown" ;
183
184
}
184
185
}
Original file line number Diff line number Diff line change @@ -942,12 +942,11 @@ private int computeZenMode() {
942
942
}
943
943
944
944
private void applyCustomPolicy (ZenPolicy policy , ZenRule rule ) {
945
- if (rule .zenMode == NotificationManager . INTERRUPTION_FILTER_NONE ) {
945
+ if (rule .zenMode == Global . ZEN_MODE_NO_INTERRUPTIONS ) {
946
946
policy .apply (new ZenPolicy .Builder ()
947
947
.disallowAllSounds ()
948
948
.build ());
949
- } else if (rule .zenMode
950
- == NotificationManager .INTERRUPTION_FILTER_ALARMS ) {
949
+ } else if (rule .zenMode == Global .ZEN_MODE_ALARMS ) {
951
950
policy .apply (new ZenPolicy .Builder ()
952
951
.disallowAllSounds ()
953
952
.allowAlarms (true )
You can’t perform that action at this time.
0 commit comments