Home
last modified time | relevance | path

Searched refs:zenMode (Results 1 – 25 of 29) sorted by relevance

12

/frameworks/base/packages/SystemUI/plugin/src/com/android/systemui/plugins/clocks/
DZenData.kt9 val zenMode: ZenMode, constant in com.android.systemui.plugins.clocks.ZenData
12 enum class ZenMode(val zenMode: Int) { constant in com.android.systemui.plugins.clocks.ZenData.ZenMode
19 fun fromInt(zenMode: Int) = values().firstOrNull { it.zenMode == zenMode } in <lambda>()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/domain/interactor/
DZenModeInteractorTest.kt64 repository.zenMode.value = Settings.Global.ZEN_MODE_OFF in create()
75 repository.zenMode.value = Settings.Global.ZEN_MODE_ALARMS in testIsZenModeEnabled_alarms()
86 repository.zenMode.value = Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS in testIsZenModeEnabled_importantInterruptions()
97 repository.zenMode.value = Settings.Global.ZEN_MODE_NO_INTERRUPTIONS in testIsZenModeEnabled_noInterruptions()
108 repository.zenMode.value = 4 // this should fail if we ever add another zen mode type in testIsZenModeEnabled_unknown()
120 repository.zenMode.value = Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS in testAreNotificationsHiddenInShade_noPolicy()
132 repository.zenMode.value = Settings.Global.ZEN_MODE_OFF in testAreNotificationsHiddenInShade_zenOffShadeSuppressed()
144 repository.zenMode.value = Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS in testAreNotificationsHiddenInShade_zenOnShadeNotSuppressed()
156 repository.zenMode.value = Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS in testAreNotificationsHiddenInShade_zenOnShadeSuppressed()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/statusbar/notification/domain/interactor/
DNotificationsSoundPolicyInteractor.kt42 val zenMode: StateFlow<ZenMode?> in <lambda>() constant in com.android.settingslib.statusbar.notification.domain.interactor.NotificationsSoundPolicyInteractor
43 get() = repository.zenMode in <lambda>()
64 zenMode.filterNotNull(), in <lambda>()
69 ) { zenMode, areAlarmsAllowed, isMediaAllowed, isRingerAllowed, isSystemAllowed -> in <lambda>() method
70 when (zenMode.zenMode) { in <lambda>()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/data/repository/
DZenModeRepositoryImplTest.kt59 val zenMode by collectLastValue(underTest.zenMode) in <lambda>() constant
60 assertThat(zenMode).isEqualTo(Settings.Global.ZEN_MODE_NO_INTERRUPTIONS) in <lambda>()
65 val zenMode by collectLastValue(underTest.zenMode) in <lambda>() constant
70 assertThat(zenMode).isEqualTo(Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS) in <lambda>()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/statusbar/notification/data/model/
DZenMode.kt23 value class ZenMode(val zenMode: Int) {
26 require(zenMode in supportedModes) { "Unsupported zenMode=$zenMode" } in <lambda>()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/statusbar/notification/data/repository/
DNotificationsSoundPolicyRepository.kt46 val zenMode: StateFlow<ZenMode?> in <lambda>() constant
88 override val zenMode: StateFlow<ZenMode?> = constant
91 .map { ZenMode(notificationManager.zenMode) } in <lambda>()
92 .onStart { emit(ZenMode(notificationManager.zenMode)) } in <lambda>()
DFakeNotificationsSoundPolicyRepository.kt33 override val zenMode: StateFlow<ZenMode?> constant in com.android.settingslib.statusbar.notification.data.repository.FakeNotificationsSoundPolicyRepository
44 fun updateZenMode(zenMode: ZenMode?) { in updateZenMode()
45 mutableZenMode.value = zenMode in updateZenMode()
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/
DEvents.java327 static ZenModeEvent fromZenMode(int zenMode) { in fromZenMode() argument
328 switch (zenMode) { in fromZenMode()
469 final Integer zenMode = (Integer) list[0]; in logEvent() local
470 sb.append(zenModeToString(zenMode)); in logEvent()
471 sUiEventLogger.log(ZenModeEvent.fromZenMode(zenMode)); in logEvent()
540 private static String zenModeToString(int zenMode) { in zenModeToString() argument
541 switch (zenMode) { in zenModeToString()
DVolumeDialogImpl.java1765 boolean isZenMuted = mState.zenMode == Global.ZEN_MODE_ALARMS
1766 || mState.zenMode == Global.ZEN_MODE_NO_INTERRUPTIONS
1767 || (mState.zenMode == Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS
1923 final boolean isZenPriorityOnly = mState.zenMode == Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS;
1924 final boolean isZenAlarms = mState.zenMode == Global.ZEN_MODE_ALARMS;
1925 final boolean isZenNone = mState.zenMode == Global.ZEN_MODE_NO_INTERRUPTIONS;
DVolumeDialogControllerImpl.java657 if (mState.zenMode == zen) return false; in updateZenModeW()
658 mState.zenMode = zen; in updateZenModeW()
744 mNoMan.setZenMode(mState.zenMode, condition != null ? condition.id : null, TAG); in onSetExitConditionW()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/data/repository/
DZenModeRepository.kt33 val zenMode: Flow<Int> constant
46 override val zenMode: Flow<Int> = conflatedCallbackFlow { in <lambda>() constant in com.android.systemui.statusbar.policy.data.repository.ZenModeRepositoryImpl
/frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/statusbar/notification/data/repository/
DNotificationsSoundPolicyRepositoryTest.kt93 `when`(notificationManager.zenMode).thenReturn(Global.ZEN_MODE_OFF) in zenModeChanges_repositoryEmits()
94 underTest.zenMode.onEach { values.add(it) }.launchIn(backgroundScope) in zenModeChanges_repositoryEmits()
97 `when`(notificationManager.zenMode).thenReturn(Global.ZEN_MODE_ALARMS) in zenModeChanges_repositoryEmits()
/frameworks/base/packages/SystemUI/plugin/src/com/android/systemui/plugins/
DVolumeDialogController.java122 public int zenMode; field in VolumeDialogController.State
138 rt.zenMode = zenMode; in copy()
173 sep(sb, indent); sb.append("zenMode:").append(zenMode); in toString()
/frameworks/base/services/core/java/com/android/server/notification/
DZenLog.java95 public static void traceSetZenMode(int zenMode, String reason) { in traceSetZenMode() argument
96 append(TYPE_SET_ZEN_MODE, zenModeToString(zenMode) + "," + reason); in traceSetZenMode()
212 private static String zenModeToString(int zenMode) { in zenModeToString() argument
213 switch (zenMode) { in zenModeToString()
DZenModeHelper.java605 void applyGlobalZenModeAsImplicitZenRule(String callingPkg, int callingUid, int zenMode) { in applyGlobalZenModeAsImplicitZenRule() argument
616 if (zenMode == Global.ZEN_MODE_OFF) { in applyGlobalZenModeAsImplicitZenRule()
642 rule.zenMode = zenMode; in applyGlobalZenModeAsImplicitZenRule()
682 rule.zenMode = Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS; in applyGlobalPolicyAsImplicitZenRule()
1214 if (rule.zenMode != newZenMode) { in populateZenRule()
1215 rule.zenMode = newZenMode; in populateZenRule()
1251 rule.zenMode = NotificationManager.zenModeFromInterruptionFilter( in populateZenRule()
1477 NotificationManager.zenModeToInterruptionFilter(rule.zenMode)) in zenRuleToAutomaticZenRule()
1486 NotificationManager.zenModeToInterruptionFilter(rule.zenMode), in zenRuleToAutomaticZenRule()
1514 void setManualZenMode(int zenMode, Uri conditionId, @ConfigChangeOrigin int origin, in setManualZenMode() argument
[all …]
DZenModeEventLogger.java218 ZenModeInfo(int zenMode, ZenModeConfig config, NotificationManager.Policy policy) { in ZenModeInfo() argument
219 mZenMode = zenMode; in ZenModeInfo()
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DZenModeConfigTest.java499 rule.zenMode = INTERRUPTION_FILTER; in testWriteToParcel()
531 assertEquals(rule.zenMode, parceled.zenMode); in testWriteToParcel()
558 rule.zenMode = Settings.Global.ZEN_MODE_ALARMS; in testRuleXml_classic()
582 assertEquals(rule.zenMode, fromXml.zenMode); in testRuleXml_classic()
594 rule.zenMode = INTERRUPTION_FILTER; in testRuleXml()
642 assertEquals(rule.zenMode, fromXml.zenMode); in testRuleXml()
739 rule.zenMode = Settings.Global.ZEN_MODE_ALARMS; in testRuleXml_customInterruptionFilter()
748 assertEquals(rule.zenMode, fromXml.zenMode); in testRuleXml_customInterruptionFilter()
891 config.manualRule.zenMode = ZEN_MODE_IMPORTANT_INTERRUPTIONS; in testisManualActive_stateTrue()
908 config.manualRule.zenMode = ZEN_MODE_OFF; in testisManualActive_stateFalse()
[all …]
DZenModeHelperTest.java432 private ArrayMap<String, ZenModeConfig.ZenRule> getCustomAutomaticRules(int zenMode) { in getCustomAutomaticRules() argument
434 ZenModeConfig.ZenRule rule = createCustomAutomaticRule(zenMode, CUSTOM_RULE_ID); in getCustomAutomaticRules()
439 private ZenModeConfig.ZenRule createCustomAutomaticRule(int zenMode, String id) { in createCustomAutomaticRule() argument
446 customRule.zenMode = zenMode; in createCustomAutomaticRule()
1488 customRule.zenMode = ZEN_MODE_IMPORTANT_INTERRUPTIONS; in testWriteXmlWithZenPolicy()
1539 customRule.zenMode = ZEN_MODE_IMPORTANT_INTERRUPTIONS; in testReadXmlRestoreWithZenPolicy_forSystemUser()
1581 customRule.zenMode = ZEN_MODE_IMPORTANT_INTERRUPTIONS; in testReadXmlRulesNotOverridden()
1763 customRule.zenMode = ZEN_MODE_IMPORTANT_INTERRUPTIONS; in testReadXmlAllDisabledRulesResetDefaultRules()
1800 customRule.zenMode = ZEN_MODE_IMPORTANT_INTERRUPTIONS; in testReadXmlOnlyOneDefaultRuleExists()
1813 defaultScheduleRule.zenMode = ZEN_MODE_IMPORTANT_INTERRUPTIONS; in testReadXmlOnlyOneDefaultRuleExists()
[all …]
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/data/repository/
DFakeZenModeRepository.kt29 override val zenMode: MutableStateFlow<Int> = MutableStateFlow(Settings.Global.ZEN_MODE_OFF) constant in com.android.systemui.statusbar.policy.data.repository.FakeZenModeRepository
/frameworks/base/packages/EasterEgg/src/com/android/egg/paint/
DPainting.kt75 var zenMode = true variable in com.android.egg.paint.Painting
149 if (zenMode) { in onAttachedToWindow()
160 if (zenMode) { in onDetachedFromWindow()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/domain/interactor/
DZenModeInteractor.kt33 repository.zenMode in <lambda>()
/frameworks/base/core/java/android/service/notification/
DZenModeDiff.java515 if (from.zenMode != to.zenMode) { in RuleDiff()
516 addField(FIELD_ZEN_MODE, new FieldDiff<>(from.zenMode, to.zenMode)); in RuleDiff()
DZenModeConfig.java410 events.zenMode = ZEN_MODE_IMPORTANT_INTERRUPTIONS; in getDefaultConfig()
425 sleeping.zenMode = ZEN_MODE_IMPORTANT_INTERRUPTIONS; in getDefaultConfig()
784 return rule == null || Global.isValidZenMode(rule.zenMode) && sameCondition(rule); in isValidManualRule()
788 return rule != null && !TextUtils.isEmpty(rule.name) && Global.isValidZenMode(rule.zenMode) in isValidAutomaticRule()
1133 rt.zenMode = tryParseZenMode(zen, -1); in readRuleXml()
1134 if (rt.zenMode == -1) { in readRuleXml()
1150 if (!Flags.modesApi() && rt.zenMode != ZEN_MODE_IMPORTANT_INTERRUPTIONS in readRuleXml()
1154 rt.zenMode = ZEN_MODE_IMPORTANT_INTERRUPTIONS; in readRuleXml()
1182 out.attributeInt(null, RULE_ATT_ZEN, rule.zenMode); in writeRuleXml()
2465 public int zenMode; // ie: Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS field in ZenModeConfig.ZenRule
[all …]
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/
DNotificationListViewModelTest.kt262 zenModeRepository.zenMode.value = Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS in areNotificationsHiddenInShade_true()
274 zenModeRepository.zenMode.value = Settings.Global.ZEN_MODE_OFF in areNotificationsHiddenInShade_false()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/volume/
DVolumeDialogImplTest.java760 state.zenMode = Settings.Global.ZEN_MODE_NO_INTERRUPTIONS; in turnOnDnD_volumeSliderIconChangesToDnd()
772 state.zenMode = Settings.Global.ZEN_MODE_OFF; in turnOffDnD_volumeSliderIconIsNotDnd()

12