diff --git a/res/values/strings.xml b/res/values/strings.xml index 4b30dc19abe..99e3313f7bc 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -8184,10 +8184,10 @@ other {{effect_1}, {effect_2}, and # more} } - - Limit what can notify you - - No interruptions are filtered + + Allow all notifications + + People, apps, and sounds can interrupt Display options for filtered diff --git a/res/xml/modes_rule_settings.xml b/res/xml/modes_rule_settings.xml index d2f573c56cf..4f9b685592e 100644 --- a/res/xml/modes_rule_settings.xml +++ b/res/xml/modes_rule_settings.xml @@ -59,8 +59,8 @@ android:key="modes_filters"> + android:key="allow_all" + android:title="@string/zen_mode_allow_all_notifications"/> { - zenMode.getRule().setInterruptionFilter(filterNotifications - ? INTERRUPTION_FILTER_PRIORITY - : INTERRUPTION_FILTER_ALL); + zenMode.getRule().setInterruptionFilter(allowAll + ? INTERRUPTION_FILTER_ALL + : INTERRUPTION_FILTER_PRIORITY); return zenMode; }); } diff --git a/src/com/android/settings/notification/modes/ZenModeFragment.java b/src/com/android/settings/notification/modes/ZenModeFragment.java index 37772990152..057f1c363c9 100644 --- a/src/com/android/settings/notification/modes/ZenModeFragment.java +++ b/src/com/android/settings/notification/modes/ZenModeFragment.java @@ -77,7 +77,7 @@ public class ZenModeFragment extends ZenModeFragmentBase { new ZenModeTriggerAddPreferenceController(context, "zen_add_automatic_trigger", this, mBackend)); prefControllers.add(new InterruptionFilterPreferenceController( - context, "allow_filtering", mBackend)); + context, "allow_all", mBackend)); prefControllers.add(new ManualDurationPreferenceController( context, "mode_manual_duration", this, mBackend)); return prefControllers; diff --git a/tests/robotests/src/com/android/settings/notification/modes/InterruptionFilterPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/notification/modes/InterruptionFilterPreferenceControllerTest.java index 0c3f8e1815d..777d213142f 100644 --- a/tests/robotests/src/com/android/settings/notification/modes/InterruptionFilterPreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/notification/modes/InterruptionFilterPreferenceControllerTest.java @@ -87,7 +87,7 @@ public final class InterruptionFilterPreferenceControllerTest { .build(); mController.updateZenMode(preference, zenMode); - verify(preference).setChecked(false); + verify(preference).setChecked(true); } @Test @@ -99,7 +99,7 @@ public final class InterruptionFilterPreferenceControllerTest { mController.updateZenMode(preference, zenMode); - mController.onPreferenceChange(preference, true); + mController.onPreferenceChange(preference, false); ArgumentCaptor captor = ArgumentCaptor.forClass(ZenMode.class); verify(mBackend).updateMode(captor.capture()); @@ -118,7 +118,7 @@ public final class InterruptionFilterPreferenceControllerTest { .build(); mController.updateZenMode(preference, zenMode); - verify(preference).setChecked(true); + verify(preference).setChecked(false); } @Test @@ -131,7 +131,7 @@ public final class InterruptionFilterPreferenceControllerTest { mController.updateZenMode(preference, zenMode); - mController.onPreferenceChange(preference, false); + mController.onPreferenceChange(preference, true); ArgumentCaptor captor = ArgumentCaptor.forClass(ZenMode.class); verify(mBackend).updateMode(captor.capture());