/packages/apps/Settings/src/com/android/settings/notification/app/ |
D | AppNotificationSettings.java | 84 mControllers.add(new BlockPreferenceController(context, mDependentFieldListener, mBackend)); in createPreferenceControllers() 85 mControllers.add(new FullScreenIntentPermissionPreferenceController(context, mBackend)); in createPreferenceControllers() 86 mControllers.add(new BadgePreferenceController(context, mBackend)); in createPreferenceControllers() 88 context, mDependentFieldListener, mBackend)); in createPreferenceControllers() 90 context, mDependentFieldListener, mBackend)); in createPreferenceControllers() 92 context, mDependentFieldListener, mBackend)); in createPreferenceControllers() 94 context, mDependentFieldListener, mBackend)); in createPreferenceControllers() 96 mDependentFieldListener, mBackend)); in createPreferenceControllers() 97 mControllers.add(new LightsPreferenceController(context, mBackend)); in createPreferenceControllers() 98 mControllers.add(new VibrationPreferenceController(context, mBackend)); in createPreferenceControllers() [all …]
|
D | ConversationNotificationSettings.java | 86 mControllers.add(new BlockPreferenceController(context, mDependentFieldListener, mBackend)); in createPreferenceControllers() 88 context, mBackend, mDependentFieldListener)); in createPreferenceControllers() 90 context, mDependentFieldListener, mBackend)); in createPreferenceControllers() 92 mDependentFieldListener, mBackend)); in createPreferenceControllers() 93 mControllers.add(new VibrationPreferenceController(context, mBackend)); in createPreferenceControllers() 95 mBackend)); in createPreferenceControllers() 96 mControllers.add(new LightsPreferenceController(context, mBackend)); in createPreferenceControllers() 97 mControllers.add(new BadgePreferenceController(context, mBackend)); in createPreferenceControllers() 100 mBackend, false /* isAppPage */, null /* dependentFieldListener */)); in createPreferenceControllers() 101 mControllers.add(new ConversationDemotePreferenceController(context, this, mBackend)); in createPreferenceControllers() [all …]
|
D | ChannelNotificationSettings.java | 119 mControllers.add(new BlockPreferenceController(context, mDependentFieldListener, mBackend)); in createPreferenceControllers() 121 context, mDependentFieldListener, mBackend)); in createPreferenceControllers() 123 context, mDependentFieldListener, mBackend)); in createPreferenceControllers() 125 context, mDependentFieldListener, mBackend)); in createPreferenceControllers() 127 context, mDependentFieldListener, mBackend)); in createPreferenceControllers() 129 mDependentFieldListener, mBackend)); in createPreferenceControllers() 130 mControllers.add(new VibrationPreferenceController(context, mBackend)); in createPreferenceControllers() 133 mBackend)); in createPreferenceControllers() 134 mControllers.add(new LightsPreferenceController(context, mBackend)); in createPreferenceControllers() 135 mControllers.add(new BadgePreferenceController(context, mBackend)); in createPreferenceControllers() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/dream/ |
D | DreamHomeControlsPreferenceControllerTest.java | 57 private DreamBackend mBackend; field in DreamHomeControlsPreferenceControllerTest 65 mBackend = new DreamBackend(mContext); in setUp() 66 mController = new DreamHomeControlsPreferenceController(mContext, mBackend); in setUp() 73 mBackend.setSupportedComplications( in setUp() 85 mBackend.setHomeControlsEnabled(false); in testSetChecked_setTrue_enablesSetting() 86 assertThat(mBackend.getEnabledComplications()) in testSetChecked_setTrue_enablesSetting() 90 assertThat(mBackend.getEnabledComplications()) in testSetChecked_setTrue_enablesSetting() 97 mBackend.setHomeControlsEnabled(true); in testSetChecked_setFalse_disablesSetting() 98 assertThat(mBackend.getEnabledComplications()) in testSetChecked_setFalse_disablesSetting() 102 assertThat(mBackend.getEnabledComplications()) in testSetChecked_setFalse_disablesSetting() [all …]
|
D | DreamMainSwitchPreferenceControllerTest.java | 54 private DreamBackend mBackend; field in DreamMainSwitchPreferenceControllerTest 62 mBackend = DreamBackend.getInstance(mContext); in setUp() 78 mBackend.setEnabled(false); in testIsChecked_returnsFalse() 84 mBackend.setEnabled(true); in testIsChecked_returnsTrue() 90 mBackend.setEnabled(true); in testSetChecked_setFalse_disablesSetting() 92 assertThat(mBackend.isEnabled()).isFalse(); in testSetChecked_setFalse_disablesSetting() 97 mBackend.setEnabled(false); in testSetChecked_setTrue_enablesSetting() 99 assertThat(mBackend.isEnabled()).isTrue(); in testSetChecked_setTrue_enablesSetting() 122 mBackend.setEnabled(true); in testUpdateState() 126 mBackend.setEnabled(false); in testUpdateState() [all …]
|
D | WhenToDreamPickerTest.java | 50 private DreamBackend mBackend; field in WhenToDreamPickerTest 70 ReflectionHelpers.setField(mPicker, "mBackend", mBackend); in setup() 75 when(mBackend.getWhenToDreamSetting()).thenReturn(DreamBackend.WHILE_CHARGING); in getDefaultKeyReturnsCurrentWhenToDreamSetting() 79 when(mBackend.getWhenToDreamSetting()).thenReturn(DreamBackend.WHILE_DOCKED); in getDefaultKeyReturnsCurrentWhenToDreamSetting() 83 when(mBackend.getWhenToDreamSetting()).thenReturn(DreamBackend.EITHER); in getDefaultKeyReturnsCurrentWhenToDreamSetting() 87 when(mBackend.getWhenToDreamSetting()).thenReturn(DreamBackend.NEVER); in getDefaultKeyReturnsCurrentWhenToDreamSetting() 96 verify(mBackend).setWhenToDream(DreamBackend.WHILE_CHARGING); in setDreamWhileCharging() 103 verify(mBackend).setWhenToDream(DreamBackend.WHILE_DOCKED); in setDreamWhileDocked() 110 verify(mBackend).setWhenToDream(DreamBackend.EITHER); in setDreamWhileChargingOrDocked() 117 verify(mBackend).setWhenToDream(DreamBackend.NEVER); in setDreamNever()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/zen/ |
D | ZenModeVisEffectPreferenceControllerTest.java | 61 private ZenModeBackend mBackend; field in ZenModeVisEffectPreferenceControllerTest 87 ReflectionHelpers.setField(mController, "mBackend", mBackend); in setup() 116 when(mBackend.isVisualEffectSuppressed(SUPPRESSED_EFFECT_PEEK)).thenReturn(false); in updateState_notChecked() 125 when(mBackend.isVisualEffectSuppressed(SUPPRESSED_EFFECT_PEEK)).thenReturn(true); in updateState_checked() 137 ReflectionHelpers.setField(mController, "mBackend", mBackend); in updateState_checkedFalse_parentChecked() 138 when(mBackend.isVisualEffectSuppressed(SUPPRESSED_EFFECT_PEEK)).thenReturn(false); in updateState_checkedFalse_parentChecked() 139 when(mBackend.isVisualEffectSuppressed(PARENT_EFFECT1)).thenReturn(false); in updateState_checkedFalse_parentChecked() 140 when(mBackend.isVisualEffectSuppressed(PARENT_EFFECT2)).thenReturn(true); in updateState_checkedFalse_parentChecked() 145 verify(mBackend, times(1)).saveVisualEffectsPolicy(SUPPRESSED_EFFECT_PEEK, true); in updateState_checkedFalse_parentChecked() 153 ReflectionHelpers.setField(mController, "mBackend", mBackend); in updateState_checkedFalse_parentNotChecked() [all …]
|
D | ZenModeVisEffectsCustomPreferenceControllerTest.java | 60 private ZenModeBackend mBackend; field in ZenModeVisEffectsCustomPreferenceControllerTest 82 ReflectionHelpers.setField(mController, "mBackend", mBackend); in setup() 90 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, 0); in isAvailable_noVisEffects() 96 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, 1); in isAvailable_visEffects() 102 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, 0); in updateState_notChecked_noVisEffects() 119 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, allSuppressed); in updateState_notChecked_allVisEffects() 127 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, 2); in updateState_checked() 135 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, 2); in updateState_listeners()
|
D | ZenModeRepeatCallersPreferenceControllerTest.java | 58 private ZenModeBackend mBackend; field in ZenModeRepeatCallersPreferenceControllerTest 82 ReflectionHelpers.setField(mController, "mBackend", mBackend); in setup() 113 when(mBackend.isPriorityCategoryEnabled( in updateState_Priority() 126 when(mBackend.isPriorityCategoryEnabled(NotificationManager.Policy.PRIORITY_CATEGORY_CALLS)) in updateState_Priority_anyCallers() 128 when(mBackend.getPriorityCallSenders()).thenReturn( in updateState_Priority_anyCallers() 130 when(mBackend.isPriorityCategoryEnabled( in updateState_Priority_anyCallers() 145 verify(mBackend) in onPreferenceChanged_EnableRepeatCallers() 155 verify(mBackend) in onPreferenceChanged_DisableRepeatCallers()
|
D | ZenFooterPreferenceControllerTest.java | 61 private ZenModeBackend mBackend; field in ZenFooterPreferenceControllerTest 82 ReflectionHelpers.setField(mController, "mBackend", mBackend); in setup() 89 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, 0); in isAvailable_noVisEffects() 95 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, 2); in isAvailable_someVisEffects() 110 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, allSuppressed); in isAvailable_allVisEffects() 116 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, 0); in updateSummary_noVisEffects() 123 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, 2); in getSummary_someVisEffects() 139 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, allSuppressed); in getSummary_allVisEffects()
|
D | ZenModeAddBypassingAppsPreferenceControllerTest.java | 56 private NotificationBackend mBackend; field in ZenModeAddBypassingAppsPreferenceControllerTest 70 mContext, null, mock(Fragment.class), mBackend); in setup() 90 when(mBackend.getNotificationChannelsBypassingDnd( in testUpdateAppList() 95 when(mBackend.getChannelCount( in testUpdateAppList() 104 when(mBackend.getChannelCount( in testUpdateAppList() 108 when(mBackend.getNotificationChannelsBypassingDnd( in testUpdateAppList() 118 when(mBackend.getChannelCount( in testUpdateAppList() 122 when(mBackend.getNotificationChannelsBypassingDnd( in testUpdateAppList()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/ |
D | NotificationAssistantPreferenceControllerTest.java | 72 private NotificationBackend mBackend; field in NotificationAssistantPreferenceControllerTest 85 when(mBackend.getDefaultNotificationAssistant()).thenReturn(mNASComponent); in setUp() 87 mPreferenceController.setBackend(mBackend); in setUp() 100 when(mBackend.getAllowedNotificationAssistant()).thenReturn(mNASComponent); in testIsChecked() 103 when(mBackend.getAllowedNotificationAssistant()).thenReturn(null); in testIsChecked() 113 verify(mBackend, times(0)).setNotificationAssistantGranted(any()); in testSetChecked() 117 verify(mBackend, times(1)).setNotificationAssistantGranted(null); in testSetChecked() 130 verify(mBackend, times(1)) in testMigrationFromSetting_userEnable_multiProfile() 132 verify(mBackend, never()) in testMigrationFromSetting_userEnable_multiProfile() 146 verify(mBackend, times(1)) in testMigrationFromSetting_userEnable_multiUser() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/modes/ |
D | ZenModesBackendTest.java | 89 private ZenModesBackend mBackend; field in ZenModesBackendTest 136 mBackend = new ZenModesBackend(mContext); in setup() 159 List<ZenMode> modes = mBackend.getModes(); in getModes_containsManualDndAndZenRules() 185 ZenMode mode = mBackend.getMode(ZenMode.MANUAL_DND_MODE_ID); in getMode_manualDnd_returnsMode() 202 ZenMode mode = mBackend.getMode(ZEN_RULE_ID); in getMode_zenRule_returnsMode() 211 ZenMode mode = mBackend.getMode(ZEN_RULE_ID); in getMode_missingRule_returnsNull() 228 ZenMode mode = mBackend.getMode(ZenMode.MANUAL_DND_MODE_ID); in getMode_manualDnd_returnsCorrectActiveState() 235 ZenMode activeMode = mBackend.getMode(ZenMode.MANUAL_DND_MODE_ID); in getMode_manualDnd_returnsCorrectActiveState() 252 ZenMode mode = mBackend.getMode(ZEN_RULE_ID); in getMode_zenRule_returnsCorrectActiveState() 257 ZenMode activeMode = mBackend.getMode(ZEN_RULE_ID); in getMode_zenRule_returnsCorrectActiveState() [all …]
|
D | ZenModeOtherPreferenceControllerTest.java | 50 private ZenModesBackend mBackend; field in ZenModeOtherPreferenceControllerTest 72 new ZenModeOtherPreferenceController(mContext, "modes_category_alarm", mBackend); in testUpdateState_alarms() 90 new ZenModeOtherPreferenceController(mContext, "modes_category_alarm", mBackend); in testOnPreferenceChange_alarms() 97 verify(mBackend).updateMode(captor.capture()); in testOnPreferenceChange_alarms() 115 new ZenModeOtherPreferenceController(mContext, "modes_category_media", mBackend); in testUpdateState_media() 133 new ZenModeOtherPreferenceController(mContext, "modes_category_media", mBackend); in testOnPreferenceChange_media() 140 verify(mBackend).updateMode(captor.capture()); in testOnPreferenceChange_media() 158 new ZenModeOtherPreferenceController(mContext, "modes_category_system", mBackend); in testUpdateState_system() 176 new ZenModeOtherPreferenceController(mContext, "modes_category_system", mBackend); in testOnPreferenceChange_system() 183 verify(mBackend).updateMode(captor.capture()); in testOnPreferenceChange_system() [all …]
|
D | ZenModeDisplayEffectPreferenceControllerTest.java | 51 private ZenModesBackend mBackend; field in ZenModeDisplayEffectPreferenceControllerTest 77 mContext, "effect_greyscale", mBackend); in testUpdateState_grayscale() 98 … new ZenModeDisplayEffectPreferenceController(mContext, "effect_greyscale", mBackend); in testOnPreferenceChange_grayscale() 105 verify(mBackend).updateMode(captor.capture()); in testOnPreferenceChange_grayscale() 124 new ZenModeDisplayEffectPreferenceController(mContext, "effect_aod", mBackend); in testUpdateState_aod() 145 new ZenModeDisplayEffectPreferenceController(mContext, "effect_aod", mBackend); in testOnPreferenceChange_aod() 152 verify(mBackend).updateMode(captor.capture()); in testOnPreferenceChange_aod() 172 mContext, "effect_wallpaper", mBackend); in testUpdateState_wallpaper() 194 mContext, "effect_wallpaper", mBackend); in testOnPreferenceChange_wallpaper() 201 verify(mBackend).updateMode(captor.capture()); in testOnPreferenceChange_wallpaper() [all …]
|
D | ZenModeAddBypassingAppsPreferenceControllerTest.java | 56 private NotificationBackend mBackend; field in ZenModeAddBypassingAppsPreferenceControllerTest 70 mContext, null, mock(Fragment.class), mBackend); in setup() 90 when(mBackend.getNotificationChannelsBypassingDnd( in testUpdateAppList() 95 when(mBackend.getChannelCount( in testUpdateAppList() 104 when(mBackend.getChannelCount( in testUpdateAppList() 108 when(mBackend.getNotificationChannelsBypassingDnd( in testUpdateAppList() 118 when(mBackend.getChannelCount( in testUpdateAppList() 122 when(mBackend.getNotificationChannelsBypassingDnd( in testUpdateAppList()
|
/packages/apps/StorageManager/src/com/android/storagemanager/deletionhelper/ |
D | AppDeletionPreferenceGroup.java | 38 private AppDeletionType mBackend; field in AppDeletionPreferenceGroup 73 preference.setChecked(mBackend.isChecked(packageName)); in onAppRebuild() 91 return mBackend.getDeletionThreshold() == 0; in isNoThreshold() 107 if (mBackend == null) { in onPreferenceChange() 116 mBackend.setChecked(p.getPackageName(), isChecked); in onPreferenceChange() 127 mBackend.setChecked(p.getPackageName(), isChecked); in onPreferenceChange() 146 mBackend = type; in setDeletionType() 152 if (mBackend != null) { in updateText() 154 mBackend.getTotalAppsFreeableSpace(DeletionHelperSettings.COUNT_UNCHECKED); in updateText() 155 deletionThreshold = mBackend.getDeletionThreshold(); in updateText() [all …]
|
/packages/apps/Settings/src/com/android/settings/notification/modes/ |
D | ZenModeFragment.java | 41 prefControllers.add(new ZenModeHeaderController(context, "header", this, mBackend)); in createPreferenceControllers() 42 prefControllers.add(new ZenModeButtonPreferenceController(context, "activate", mBackend)); in createPreferenceControllers() 43 prefControllers.add(new ZenModeActionsPreferenceController(context, "actions", mBackend)); in createPreferenceControllers() 45 context, "zen_mode_people", mBackend)); in createPreferenceControllers() 49 mBackend)); in createPreferenceControllers() 51 context, "zen_other_settings", mBackend)); in createPreferenceControllers() 53 context, "mode_display_settings", mBackend)); in createPreferenceControllers() 55 "zen_automatic_trigger_category", mBackend)); in createPreferenceControllers()
|
D | ZenModeNotifVisFragment.java | 36 "zen_effect_intent", ZenPolicy.VISUAL_EFFECT_FULL_SCREEN_INTENT, null, mBackend)); in createPreferenceControllers() 38 "zen_effect_light", ZenPolicy.VISUAL_EFFECT_LIGHTS, null, mBackend)); in createPreferenceControllers() 40 "zen_effect_peek", ZenPolicy.VISUAL_EFFECT_PEEK, null, mBackend)); in createPreferenceControllers() 43 new int[] {ZenPolicy.VISUAL_EFFECT_NOTIFICATION_LIST}, mBackend)); in createPreferenceControllers() 45 "zen_effect_badge", ZenPolicy.VISUAL_EFFECT_BADGE, null, mBackend)); in createPreferenceControllers() 47 "zen_effect_ambient", ZenPolicy.VISUAL_EFFECT_AMBIENT, null, mBackend)); in createPreferenceControllers() 49 "zen_effect_list", ZenPolicy.VISUAL_EFFECT_NOTIFICATION_LIST, null, mBackend)); in createPreferenceControllers()
|
D | ZenModeDisplayFragment.java | 37 context, "notification_visibility", mBackend)); in createPreferenceControllers() 39 context, "effect_greyscale", mBackend)); in createPreferenceControllers() 41 context, "effect_aod", mBackend)); in createPreferenceControllers() 43 context, "effect_wallpaper", mBackend)); in createPreferenceControllers() 45 context, "effect_dark_theme", mBackend)); in createPreferenceControllers()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/display/daydream/ |
D | DaydreamFragment.java | 77 private DreamBackend mBackend; field in DaydreamFragment 89 mBackend = new DreamBackend(getActivity()); in onCreate() 149 dreamNowPref.setEnabled(mBackend.isEnabled()); in onCreatePreferences() 159 final List<DreamBackend.DreamInfo> infos = mBackend.getDreamInfos(); in refreshActiveDreamPref() 163 final ComponentName currentDreamComponent = mBackend.getActiveDream(); in refreshActiveDreamPref() 168 activeDreamPref.setValue(mBackend.isEnabled() && currentDreamComponent != null in refreshActiveDreamPref() 212 if (!mBackend.isEnabled()) { in setActiveDream() 213 mBackend.setEnabled(true); in setActiveDream() 215 if (!Objects.equals(mBackend.getActiveDream(), dreamInfo.componentName)) { in setActiveDream() 216 mBackend.setActiveDream(dreamInfo.componentName); in setActiveDream() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/app/ |
D | InvalidConversationPreferenceControllerTest.java | 66 private NotificationBackend mBackend; field in InvalidConversationPreferenceControllerTest 83 mController = spy(new InvalidConversationPreferenceController(mContext, mBackend)); in setUp() 100 when(mBackend.isInInvalidMsgState(anyString(), anyInt())).thenReturn(true); in testIsAvailable_notIfAppBlocked() 111 when(mBackend.isInInvalidMsgState(anyString(), anyInt())).thenReturn(false); in testIsAvailable_notIfInValidMsgState() 121 when(mBackend.isInInvalidMsgState(anyString(), anyInt())).thenReturn(true); in testIsAvailable() 131 when(mBackend.isInInvalidMsgState(anyString(), anyInt())).thenReturn(true); in testIsAvailable_filteredIn() 142 when(mBackend.isInInvalidMsgState(anyString(), anyInt())).thenReturn(true); in testIsAvailable_filteredOut() 170 when(mBackend.hasUserDemotedInvalidMsgApp(anyString(), anyInt())).thenReturn(false); in testUpdateState_notChecked() 183 when(mBackend.hasUserDemotedInvalidMsgApp(anyString(), anyInt())).thenReturn(true); in testUpdateState_checked() 196 when(mBackend.hasUserDemotedInvalidMsgApp(anyString(), anyInt())).thenReturn(true); in testOnPreferenceChange_toggleEnabled() [all …]
|
/packages/apps/Settings/src/com/android/settings/dream/ |
D | DreamComplicationPreferenceController.java | 30 private final DreamBackend mBackend; field in DreamComplicationPreferenceController 36 mBackend = DreamBackend.getInstance(context); in DreamComplicationPreferenceController() 41 return mBackend.getSupportedComplications().isEmpty() ? CONDITIONALLY_UNAVAILABLE in getAvailabilityStatus() 47 return mBackend.getComplicationsEnabled(); in isChecked() 52 mBackend.setComplicationsEnabled(isChecked); in setChecked()
|
/packages/apps/Settings/src/com/android/settings/notification/ |
D | SilentStatusBarPreferenceController.java | 30 private NotificationBackend mBackend; field in SilentStatusBarPreferenceController 34 mBackend = new NotificationBackend(); in SilentStatusBarPreferenceController() 39 mBackend = backend; in setBackend() 44 return mBackend.shouldHideSilentStatusBarIcons(mContext); in isChecked() 49 mBackend.setHideSilentStatusIcons(isChecked); in setChecked()
|
/packages/apps/Settings/src/com/android/settings/notification/zen/ |
D | ZenModeRepeatCallersPreferenceController.java | 37 private final ZenModeBackend mBackend; field in ZenModeRepeatCallersPreferenceController 45 mBackend = ZenModeBackend.getInstance(context); in ZenModeRepeatCallersPreferenceController() 76 boolean anyCallersCanBypassDnd = (mBackend.isPriorityCategoryEnabled( in updateState() 78 && mBackend.getPriorityCallSenders() == Policy.PRIORITY_SENDERS_ANY); in updateState() 85 pref.setChecked(mBackend.isPriorityCategoryEnabled( in updateState() 99 mBackend.saveSoundPolicy(Policy.PRIORITY_CATEGORY_REPEAT_CALLERS, allowRepeatCallers); in onPreferenceChange()
|