/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/modes/ |
D | ZenModeTest.java | 48 ZenMode zenMode = new ZenMode("id", ZEN_RULE, true); in testBasicMethods() local 50 assertThat(zenMode.getId()).isEqualTo("id"); in testBasicMethods() 51 assertThat(zenMode.getRule()).isEqualTo(ZEN_RULE); in testBasicMethods() 52 assertThat(zenMode.isManualDnd()).isFalse(); in testBasicMethods() 53 assertThat(zenMode.canBeDeleted()).isTrue(); in testBasicMethods() 54 assertThat(zenMode.isActive()).isTrue(); in testBasicMethods() 65 ZenMode zenMode = new ZenMode("id", new AutomaticZenRule.Builder("Rule", Uri.EMPTY) in getPolicy_interruptionFilterPriority_returnsZenPolicy() local 70 assertThat(zenMode.getPolicy()).isEqualTo(ZEN_POLICY); in getPolicy_interruptionFilterPriority_returnsZenPolicy() 75 ZenMode zenMode = new ZenMode("id", new AutomaticZenRule.Builder("Rule", Uri.EMPTY) in getPolicy_interruptionFilterAll_returnsPolicyAllowingAll() local 80 assertThat(zenMode.getPolicy()).isEqualTo( in getPolicy_interruptionFilterAll_returnsPolicyAllowingAll() [all …]
|
D | ZenModesSummaryHelperTest.java | 66 ZenMode zenMode = new ZenMode("id", rule, true); in getPeopleSummary_noOne() local 68 assertThat(mSummaryHelper.getPeopleSummary(zenMode)).isEqualTo("No one can interrupt"); in getPeopleSummary_noOne() 78 ZenMode zenMode = new ZenMode("id", rule, true); in getPeopleSummary_some() local 80 assertThat(mSummaryHelper.getPeopleSummary(zenMode)).isEqualTo("Some people can interrupt"); in getPeopleSummary_some() 92 ZenMode zenMode = new ZenMode("id", rule, true); in getPeopleSummary_all() local 94 assertThat(mSummaryHelper.getPeopleSummary(zenMode)).isEqualTo("All people can interrupt"); in getPeopleSummary_all() 104 ZenMode zenMode = new ZenMode("id", rule, true); in getOtherSoundCategoriesSummary_single() local 106 assertThat(mSummaryHelper.getOtherSoundCategoriesSummary(zenMode)).isEqualTo( in getOtherSoundCategoriesSummary_single() 117 ZenMode zenMode = new ZenMode("id", rule, true); in getOtherSoundCategoriesSummary_duo() local 119 assertThat(mSummaryHelper.getOtherSoundCategoriesSummary(zenMode)).isEqualTo( in getOtherSoundCategoriesSummary_duo() [all …]
|
D | ZenModeAppsPreferenceControllerTest.java | 117 ZenMode zenMode = new ZenMode("id", in testUpdateState_All() local 124 mAllController.updateZenMode(preference, zenMode); in testUpdateState_All() 132 ZenMode zenMode = new ZenMode("id", in testUpdateState_All_Unchecked() local 139 mAllController.updateZenMode(preference, zenMode); in testUpdateState_All_Unchecked() 147 ZenMode zenMode = new ZenMode("id", in testUpdateState_None() local 154 mNoneController.updateZenMode(preference, zenMode); in testUpdateState_None() 162 ZenMode zenMode = new ZenMode("id", in testUpdateState_None_Unchecked() local 169 mNoneController.updateZenMode(preference, zenMode); in testUpdateState_None_Unchecked() 177 ZenMode zenMode = new ZenMode("id", in testUpdateState_Priority() local 184 mPriorityController.updateZenMode(preference, zenMode); in testUpdateState_Priority() [all …]
|
D | ZenModeOtherPreferenceControllerTest.java | 64 ZenMode zenMode = new ZenMode("id", in testUpdateState_alarms() local 74 controller.updateZenMode(preference, zenMode); in testUpdateState_alarms() 82 ZenMode zenMode = new ZenMode("id", in testOnPreferenceChange_alarms() local 92 controller.updateZenMode(preference, zenMode); in testOnPreferenceChange_alarms() 107 ZenMode zenMode = new ZenMode("id", in testUpdateState_media() local 117 controller.updateZenMode(preference, zenMode); in testUpdateState_media() 125 ZenMode zenMode = new ZenMode("id", in testOnPreferenceChange_media() local 135 controller.updateZenMode(preference, zenMode); in testOnPreferenceChange_media() 150 ZenMode zenMode = new ZenMode("id", in testUpdateState_system() local 160 controller.updateZenMode(preference, zenMode); in testUpdateState_system() [all …]
|
D | ZenModeButtonPreferenceControllerTest.java | 74 ZenMode zenMode = new ZenMode("id", in isAvailable_notIfAppOptsOut() local 82 mController.setZenMode(zenMode); in isAvailable_notIfAppOptsOut() 88 ZenMode zenMode = new ZenMode("id", in isAvailable_notIfModeDisabled() local 96 mController.setZenMode(zenMode); in isAvailable_notIfModeDisabled() 102 ZenMode zenMode = new ZenMode("id", in isAvailable_appOptedIn_modeEnabled() local 110 mController.setZenMode(zenMode); in isAvailable_appOptedIn_modeEnabled() 119 ZenMode zenMode = new ZenMode("id", in updateState_ruleActive() local 127 mController.updateZenMode(pref, zenMode); in updateState_ruleActive() 137 ZenMode zenMode = new ZenMode("id", in updateState_ruleNotActive() local 145 mController.updateZenMode(pref, zenMode); in updateState_ruleNotActive() [all …]
|
D | ZenModeDisplayEffectPreferenceControllerTest.java | 65 ZenMode zenMode = new ZenMode("id", in testUpdateState_grayscale() local 79 controller.updateZenMode(preference, zenMode); in testUpdateState_grayscale() 87 ZenMode zenMode = new ZenMode("id", in testOnPreferenceChange_grayscale() local 100 controller.updateZenMode(preference, zenMode); in testOnPreferenceChange_grayscale() 113 ZenMode zenMode = new ZenMode("id", in testUpdateState_aod() local 126 controller.updateZenMode(preference, zenMode); in testUpdateState_aod() 134 ZenMode zenMode = new ZenMode("id", in testOnPreferenceChange_aod() local 147 controller.updateZenMode(preference, zenMode); in testOnPreferenceChange_aod() 160 ZenMode zenMode = new ZenMode("id", in testUpdateState_wallpaper() local 174 controller.updateZenMode(preference, zenMode); in testUpdateState_wallpaper() [all …]
|
D | ZenModeNotifVisPreferenceControllerTest.java | 99 ZenMode zenMode = new ZenMode("id", in updateState_notChecked() local 109 mController.updateZenMode(preference, zenMode); in updateState_notChecked() 118 ZenMode zenMode = new ZenMode("id", in updateState_checked() local 128 mController.updateZenMode(preference, zenMode); in updateState_checked() 141 ZenMode zenMode = new ZenMode("id", in updateState_checkedFalse_parentChecked() local 152 mController.updateZenMode(preference, zenMode); in updateState_checkedFalse_parentChecked() 171 ZenMode zenMode = new ZenMode("id", in updateState_checkedFalse_parentNotChecked() local 181 mController.updateZenMode(preference, zenMode); in updateState_checkedFalse_parentNotChecked() 191 ZenMode zenMode = new ZenMode("id", in onPreferenceChanged_checkedFalse() local 201 mController.updateZenMode(preference, zenMode); in onPreferenceChanged_checkedFalse() [all …]
|
D | ZenModeSetTriggerLinkPreferenceControllerTest.java | 97 ZenMode zenMode = new ZenMode("id", in testIsAvailable() local 104 mPrefController.updateZenMode(mPrefCategory, zenMode); in testIsAvailable() 110 ZenMode zenMode = new ZenMode("id", in testUpdateState() local 119 mPrefController.updateZenMode(mPrefCategory, zenMode); in testUpdateState() 123 zenMode.getRule().setEnabled(true); in testUpdateState() 124 mPrefController.updateZenMode(mPrefCategory, zenMode); in testUpdateState() 130 ZenMode zenMode = new ZenMode("id", in testOnPreferenceChange() local 139 mPrefController.updateZenMode(mPrefCategory, zenMode); in testOnPreferenceChange()
|
D | ZenModeRepeatCallersPreferenceControllerTest.java | 67 ZenMode zenMode = new ZenMode("id", in testUpdateState_allCalls() local 79 controller.updateZenMode(preference, zenMode); in testUpdateState_allCalls() 88 ZenMode zenMode = new ZenMode("id", in testUpdateState_someCalls() local 101 controller.updateZenMode(preference, zenMode); in testUpdateState_someCalls() 110 ZenMode zenMode = new ZenMode("id", in testOnPreferenceChange() local 120 controller.updateZenMode(preference, zenMode); in testOnPreferenceChange()
|
/packages/apps/Settings/src/com/android/settings/notification/modes/ |
D | ZenModeSetTriggerLinkPreferenceController.java | 48 public boolean isAvailable(@NonNull ZenMode zenMode) { in isAvailable() argument 49 return !zenMode.isManualDnd(); in isAvailable() 53 public void updateState(Preference preference, @NonNull ZenMode zenMode) { in updateState() argument 62 ((PrimarySwitchPreference) switchPref).setChecked(zenMode.getRule().isEnabled()); in updateState() 66 bundle.putString(MODE_ID, zenMode.getId()); in updateState() 69 switch (zenMode.getRule().getType()) { in updateState() 72 switchPref.setSummary(zenMode.getRule().getTriggerDescription()); in updateState() 82 switchPref.setSummary(zenMode.getRule().getTriggerDescription()); in updateState() 100 return saveMode((zenMode) -> { 101 if (newEnabled != zenMode.getRule().isEnabled()) { [all …]
|
D | ZenModeButtonPreferenceController.java | 37 public boolean isAvailable(ZenMode zenMode) { in isAvailable() argument 38 return zenMode.getRule().isManualInvocationAllowed() && zenMode.getRule().isEnabled(); in isAvailable() 42 public void updateState(Preference preference, @NonNull ZenMode zenMode) { in updateState() argument 47 if (zenMode.isActive()) { in updateState() 48 mBackend.deactivateMode(zenMode); in updateState() 50 mBackend.activateMode(zenMode, null); in updateState() 53 if (zenMode.isActive()) { in updateState()
|
D | ZenModeSummaryHelper.java | 82 String getOtherSoundCategoriesSummary(ZenMode zenMode) { in getOtherSoundCategoriesSummary() argument 84 zenMode.getPolicy(), in getOtherSoundCategoriesSummary() 109 String getCallsSettingSummary(ZenMode zenMode) { in getCallsSettingSummary() argument 110 List<String> enabledCategories = getEnabledCategories(zenMode.getPolicy(), in getCallsSettingSummary() 144 String getBlockedEffectsSummary(ZenMode zenMode) { in getBlockedEffectsSummary() argument 157 if (shouldShowAllVisualEffects(zenMode.getPolicy(), relevantVisualEffects)) { in getBlockedEffectsSummary() 160 } else if (shouldHideAllVisualEffects(zenMode.getPolicy(), relevantVisualEffects)) { in getBlockedEffectsSummary() 187 String getDisplayEffectsSummary(ZenMode zenMode) { in getDisplayEffectsSummary() argument 190 if (!zenMode.getPolicy().shouldShowAllVisualEffects()) { in getDisplayEffectsSummary() 191 enabledEffects.add(getBlockedEffectsSummary(zenMode)); in getDisplayEffectsSummary() [all …]
|
D | ZenModeDisplayEffectPreferenceController.java | 35 public void updateState(Preference preference, @NonNull ZenMode zenMode) { in updateState() argument 37 ZenDeviceEffects effects = zenMode.getRule().getDeviceEffects(); in updateState() 61 return saveMode(zenMode -> { in onPreferenceChange() 63 zenMode.getDeviceEffects()); in onPreferenceChange() 78 zenMode.getRule().setDeviceEffects(updatedEffects.build()); in onPreferenceChange() 79 return zenMode; in onPreferenceChange()
|
D | AbstractZenModePreferenceController.java | 75 public boolean isAvailable(@NonNull ZenMode zenMode) { in isAvailable() argument 82 protected final void setZenMode(@NonNull ZenMode zenMode) { in setZenMode() argument 83 mZenMode = zenMode; in setZenMode() 87 public void updateZenMode(@NonNull Preference preference, @NonNull ZenMode zenMode) { in updateZenMode() argument 88 mZenMode = zenMode; in updateZenMode() 100 abstract void updateState(Preference preference, @NonNull ZenMode zenMode); in updateState() argument 112 protected CharSequence getSummary(@NonNull ZenMode zenMode) { in getSummary() argument
|
D | ZenModesListItemPreference.java | 30 ZenModesListItemPreference(Context context, ZenMode zenMode) { in ZenModesListItemPreference() argument 33 setZenMode(zenMode); in ZenModesListItemPreference() 34 setKey(zenMode.getId()); in ZenModesListItemPreference() 42 public void setZenMode(ZenMode zenMode) { in setZenMode() argument 43 mZenMode = zenMode; in setZenMode()
|
D | ZenModeDisplayLinkPreferenceController.java | 40 void updateState(Preference preference, @NonNull ZenMode zenMode) { in updateState() argument 42 bundle.putString(MODE_ID, zenMode.getId()); in updateState() 52 public CharSequence getSummary(@NonNull ZenMode zenMode) { in getSummary() argument 53 return mSummaryHelper.getDisplayEffectsSummary(zenMode); in getSummary()
|
D | ZenModeNotifVisLinkPreferenceController.java | 40 public void updateState(Preference preference, @NonNull ZenMode zenMode) { in updateState() argument 42 bundle.putString(MODE_ID, zenMode.getId()); in updateState() 52 public CharSequence getSummary(@NonNull ZenMode zenMode) { in getSummary() argument 53 return mSummaryBuilder.getBlockedEffectsSummary(zenMode); in getSummary()
|
D | ZenModeAppsPreferenceController.java | 68 public void updateState(Preference preference, @NonNull ZenMode zenMode) { in updateState() argument 69 mModeId = zenMode.getId(); in updateState() 73 boolean policy_priority = zenMode.getPolicy().getAllowedChannels() in updateState() 78 boolean policy_none = zenMode.getPolicy().getAllowedChannels() in updateState() 85 boolean policy_all = zenMode.getPolicy().getAllowedChannels() in updateState()
|
D | ZenModeRepeatCallersPreferenceController.java | 43 public void updateState(Preference preference, @NonNull ZenMode zenMode) { in updateState() argument 47 zenMode.getPolicy().getPriorityCategoryCalls() == STATE_ALLOW in updateState() 48 && zenMode.getPolicy().getPriorityCallSenders() == PEOPLE_TYPE_ANYONE; in updateState() 56 zenMode.getPolicy().getPriorityCategoryRepeatCallers() == STATE_ALLOW); in updateState()
|
D | ZenModePeopleLinkPreferenceController.java | 43 public void updateState(Preference preference, @NonNull ZenMode zenMode) { in updateState() argument 45 bundle.putString(MODE_ID, zenMode.getId()); in updateState() 52 preference.setSummary(mSummaryHelper.getPeopleSummary(zenMode)); in updateState()
|
D | ZenModeCallsLinkPreferenceController.java | 40 public void updateState(Preference preference, @NonNull ZenMode zenMode) { in updateState() argument 42 bundle.putString(MODE_ID, zenMode.getId()); in updateState() 49 preference.setSummary(mSummaryHelper.getCallsSettingSummary(zenMode)); in updateState()
|
D | ZenModeOtherLinkPreferenceController.java | 43 public void updateState(Preference preference, @NonNull ZenMode zenMode) { in updateState() argument 45 bundle.putString(MODE_ID, zenMode.getId()); in updateState() 51 preference.setSummary(mSummaryHelper.getOtherSoundCategoriesSummary(zenMode)); in updateState()
|
D | ZenModeMessagesLinkPreferenceController.java | 39 public void updateState(Preference preference, @NonNull ZenMode zenMode) { in updateState() argument 41 bundle.putString(MODE_ID, zenMode.getId()); in updateState() 50 preference.setSummary(mSummaryHelper.getMessagesSettingSummary(zenMode.getPolicy())); in updateState()
|
/packages/apps/Settings/src/com/android/settings/notification/zen/ |
D | ZenModeSliceBuilder.java | 114 final int zenMode; in handleUriChange() local 116 zenMode = Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS; in handleUriChange() 118 zenMode = Settings.Global.ZEN_MODE_OFF; in handleUriChange() 121 NotificationManager.from(context).setZenMode(zenMode, /* conditionId= */ null, TAG, in handleUriChange() 124 NotificationManager.from(context).setZenMode(zenMode, null /* conditionId */, TAG); in handleUriChange() 143 final int zenMode = manager.getZenMode(); in isZenModeEnabled() local 145 switch (zenMode) { in isZenModeEnabled()
|
D | ZenModeBehaviorFooterPreferenceController.java | 63 isDeprecatedZenMode(config.manualRule.zenMode)) { in getFooterText() 80 automaticRule.zenMode)) { in getFooterText() 95 private boolean isDeprecatedZenMode(int zenMode) { in isDeprecatedZenMode() argument 96 switch (zenMode) { in isDeprecatedZenMode()
|