/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/ |
D | AssistantCapabilityPreferenceControllerTest.java | 53 private NotificationBackend mBackend; field in AssistantCapabilityPreferenceControllerTest 69 mPrioritizerController.setBackend(mBackend); in setUp() 75 mChipController.setBackend(mBackend); in setUp() 84 when(mBackend.getAllowedNotificationAssistant()).thenReturn(mock(ComponentName.class)); in getAvailabilityStatus_NAS() 93 when(mBackend.getAllowedNotificationAssistant()).thenReturn(null); in getAvailabilityStatus_noNAS() 104 when(mBackend.getAssistantAdjustments(anyString())).thenReturn(capabilities); in isChecked_prioritizerSettingIsOff_false() 112 when(mBackend.getAssistantAdjustments(anyString())).thenReturn(capabilities); in isChecked_prioritizerSettingIsOn_true() 120 when(mBackend.getAssistantAdjustments(anyString())).thenReturn(capabilities); in isChecked_chipSettingIsOff_false() 125 when(mBackend.getAssistantAdjustments(anyString())).thenReturn(capabilities); in isChecked_chipSettingIsOff_false() 130 when(mBackend.getAssistantAdjustments(anyString())).thenReturn(capabilities); in isChecked_chipSettingIsOff_false() [all …]
|
D | ZenModeVisEffectPreferenceControllerTest.java | 59 private ZenModeBackend mBackend; field in ZenModeVisEffectPreferenceControllerTest 85 ReflectionHelpers.setField(mController, "mBackend", mBackend); in setup() 114 when(mBackend.isVisualEffectSuppressed(SUPPRESSED_EFFECT_PEEK)).thenReturn(false); in updateState_notChecked() 123 when(mBackend.isVisualEffectSuppressed(SUPPRESSED_EFFECT_PEEK)).thenReturn(true); in updateState_checked() 135 ReflectionHelpers.setField(mController, "mBackend", mBackend); in updateState_checkedFalse_parentChecked() 136 when(mBackend.isVisualEffectSuppressed(SUPPRESSED_EFFECT_PEEK)).thenReturn(false); in updateState_checkedFalse_parentChecked() 137 when(mBackend.isVisualEffectSuppressed(PARENT_EFFECT1)).thenReturn(false); in updateState_checkedFalse_parentChecked() 138 when(mBackend.isVisualEffectSuppressed(PARENT_EFFECT2)).thenReturn(true); in updateState_checkedFalse_parentChecked() 143 verify(mBackend, times(1)).saveVisualEffectsPolicy(SUPPRESSED_EFFECT_PEEK, true); in updateState_checkedFalse_parentChecked() 151 ReflectionHelpers.setField(mController, "mBackend", mBackend); in updateState_checkedFalse_parentNotChecked() [all …]
|
D | ZenModeStarredContactsPreferenceControllerTest.java | 59 private ZenModeBackend mBackend; field in ZenModeStarredContactsPreferenceControllerTest 87 ReflectionHelpers.setField(mCallsController, "mBackend", mBackend); in setup() 96 ReflectionHelpers.setField(mMessagesController, "mBackend", mBackend); in setup() 105 when(mBackend.isPriorityCategoryEnabled(NotificationManager.Policy.PRIORITY_CATEGORY_CALLS)) in isAvailable_noCallers() 112 when(mBackend.isPriorityCategoryEnabled(NotificationManager.Policy.PRIORITY_CATEGORY_CALLS)) in isAvailable_anyCallers() 114 when(mBackend.getPriorityCallSenders()) in isAvailable_anyCallers() 122 when(mBackend.isPriorityCategoryEnabled(NotificationManager.Policy.PRIORITY_CATEGORY_CALLS)) in isAvailable_starredCallers() 124 when(mBackend.getPriorityCallSenders()) in isAvailable_starredCallers() 132 when(mBackend.isPriorityCategoryEnabled( in isAvailable_noMessages() 139 when(mBackend.isPriorityCategoryEnabled( in isAvailable_anyMessages() [all …]
|
D | ZenModePriorityMessagesPreferenceControllerTest.java | 58 private ZenModeBackend mBackend; field in ZenModePriorityMessagesPreferenceControllerTest 90 when(mBackend.getPriorityMessageSenders()) in setup() 92 when(mBackend.getAlarmsTotalSilenceCallsMessagesSummary( in setup() 94 when(mBackend.getContactsSummary(NotificationManager.Policy.PRIORITY_CATEGORY_MESSAGES)) in setup() 98 ReflectionHelpers.setField(mController, "mBackend", mBackend); in setup() 108 when(mBackend.isPriorityCategoryEnabled( in updateState_TotalSilence() 133 when(mBackend.isPriorityCategoryEnabled( in updateState_Priority() 146 when(mBackend.getPriorityMessageSenders()).thenReturn( in onPreferenceChange_setSelectedContacts_any() 156 when(mBackend.getPriorityMessageSenders()).thenReturn(ZenModeBackend.SOURCE_NONE); in onPreferenceChange_setSelectedContacts_none() 165 when(mBackend.getPriorityMessageSenders()).thenReturn( in onPreferenceChange_setSelectedContacts_starred() [all …]
|
D | ZenModePriorityCallsPreferenceControllerTest.java | 58 private ZenModeBackend mBackend; field in ZenModePriorityCallsPreferenceControllerTest 90 when(mBackend.getPriorityCallSenders()) in setup() 92 when(mBackend.getAlarmsTotalSilenceCallsMessagesSummary( in setup() 94 when(mBackend.getContactsSummary(NotificationManager.Policy.PRIORITY_CATEGORY_CALLS)) in setup() 98 ReflectionHelpers.setField(mController, "mBackend", mBackend); in setup() 108 when(mBackend.isPriorityCategoryEnabled( in updateState_TotalSilence() 133 when(mBackend.isPriorityCategoryEnabled( in updateState_Priority() 146 when(mBackend.getPriorityCallSenders()).thenReturn( in onPreferenceChange_setSelectedContacts_any() 156 when(mBackend.getPriorityCallSenders()).thenReturn(ZenModeBackend.SOURCE_NONE); in onPreferenceChange_setSelectedContacts_none() 165 when(mBackend.getPriorityCallSenders()).thenReturn( in onPreferenceChange_setSelectedContacts_starred() [all …]
|
D | ZenFooterPreferenceControllerTest.java | 59 private ZenModeBackend mBackend; field in ZenFooterPreferenceControllerTest 80 ReflectionHelpers.setField(mController, "mBackend", mBackend); in setup() 87 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, 0); in isAvailable_noVisEffects() 93 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, 2); in isAvailable_someVisEffects() 108 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, allSuppressed); in isAvailable_allVisEffects() 114 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, 0); in updateSummary_noVisEffects() 121 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, 2); in getSummary_someVisEffects() 137 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, allSuppressed); in getSummary_allVisEffects()
|
D | ZenModeVisEffectsCustomPreferenceControllerTest.java | 59 private ZenModeBackend mBackend; field in ZenModeVisEffectsCustomPreferenceControllerTest 81 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, 1); in isAvailable_visEffects() 101 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, 0); in updateState_notChecked_noVisEffects() 118 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, allSuppressed); in updateState_notChecked_allVisEffects() 126 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, 2); in updateState_checked() 134 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, 2); in updateState_listeners()
|
D | ZenModeRepeatCallersPreferenceControllerTest.java | 56 private ZenModeBackend mBackend; field in ZenModeRepeatCallersPreferenceControllerTest 80 ReflectionHelpers.setField(mController, "mBackend", mBackend); in setup() 111 when(mBackend.isPriorityCategoryEnabled( in updateState_Priority() 124 when(mBackend.isPriorityCategoryEnabled(NotificationManager.Policy.PRIORITY_CATEGORY_CALLS)) in updateState_Priority_anyCallers() 126 when(mBackend.getPriorityCallSenders()).thenReturn( in updateState_Priority_anyCallers() 128 when(mBackend.isPriorityCategoryEnabled( in updateState_Priority_anyCallers() 143 verify(mBackend) in onPreferenceChanged_EnableRepeatCallers() 153 verify(mBackend) in onPreferenceChanged_DisableRepeatCallers()
|
/packages/apps/Settings/src/com/android/settings/notification/ |
D | AppNotificationSettings.java | 103 mControllers.add(new BlockPreferenceController(context, mImportanceListener, mBackend)); in createPreferenceControllers() 104 mControllers.add(new BadgePreferenceController(context, mBackend)); in createPreferenceControllers() 106 context, mImportanceListener, mBackend)); in createPreferenceControllers() 108 context, mImportanceListener, mBackend)); in createPreferenceControllers() 110 context, mImportanceListener, mBackend)); in createPreferenceControllers() 112 context, mImportanceListener, mBackend)); in createPreferenceControllers() 114 mImportanceListener, mBackend)); in createPreferenceControllers() 115 mControllers.add(new LightsPreferenceController(context, mBackend)); in createPreferenceControllers() 116 mControllers.add(new VibrationPreferenceController(context, mBackend)); in createPreferenceControllers() 118 mBackend)); in createPreferenceControllers() [all …]
|
D | ChannelNotificationSettings.java | 99 mControllers.add(new BlockPreferenceController(context, mImportanceListener, mBackend)); in createPreferenceControllers() 101 context, mImportanceListener, mBackend)); in createPreferenceControllers() 103 context, mImportanceListener, mBackend)); in createPreferenceControllers() 105 context, mImportanceListener, mBackend)); in createPreferenceControllers() 107 context, mImportanceListener, mBackend)); in createPreferenceControllers() 109 mImportanceListener, mBackend)); in createPreferenceControllers() 110 mControllers.add(new VibrationPreferenceController(context, mBackend)); in createPreferenceControllers() 114 mBackend)); in createPreferenceControllers() 115 mControllers.add(new LightsPreferenceController(context, mBackend)); in createPreferenceControllers() 116 mControllers.add(new BadgePreferenceController(context, mBackend)); in createPreferenceControllers() [all …]
|
D | AssistantCapabilityPreferenceController.java | 32 private NotificationBackend mBackend; field in AssistantCapabilityPreferenceController 36 mBackend = new NotificationBackend(); in AssistantCapabilityPreferenceController() 41 mBackend = backend; in setBackend() 46 List<String> capabilities = mBackend.getAssistantAdjustments(mContext.getPackageName()); in isChecked() 59 mBackend.allowAssistantAdjustment(Adjustment.KEY_IMPORTANCE, isChecked); in setChecked() 61 mBackend.allowAssistantAdjustment(Adjustment.KEY_CONTEXTUAL_ACTIONS, isChecked); in setChecked() 62 mBackend.allowAssistantAdjustment(Adjustment.KEY_TEXT_REPLIES, isChecked); in setChecked() 69 return mBackend.getAllowedNotificationAssistant() != null in getAvailabilityStatus()
|
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()
|
D | ZenModePriorityCallsPreferenceController.java | 36 private final ZenModeBackend mBackend; field in ZenModePriorityCallsPreferenceController 42 mBackend = ZenModeBackend.getInstance(context); in ZenModePriorityCallsPreferenceController() 70 mBackend.saveSenders(NotificationManager.Policy.PRIORITY_CATEGORY_CALLS, in onPreferenceChange() 83 mPreference.setSummary(mBackend.getAlarmsTotalSilenceCallsMessagesSummary( in updateFromContactsValue() 88 preference.setSummary(mBackend.getContactsSummary( in updateFromContactsValue() 92 mBackend.getPriorityCallSenders()); in updateFromContactsValue()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/display/daydream/ |
D | DaydreamFragment.java | 68 private DreamBackend mBackend; field in DaydreamFragment 77 mBackend = new DreamBackend(getActivity()); in onCreate() 120 dreamNowPref.setEnabled(mBackend.isEnabled()); in onCreatePreferences() 124 final List<DreamBackend.DreamInfo> infos = mBackend.getDreamInfos(); in refreshActiveDreamPref() 130 final ComponentName currentDreamComponent = mBackend.getActiveDream(); in refreshActiveDreamPref() 131 activeDreamPref.setValue(mBackend.isEnabled() && currentDreamComponent != null in refreshActiveDreamPref() 172 if (!mBackend.isEnabled()) { in setActiveDream() 173 mBackend.setEnabled(true); in setActiveDream() 175 if (!Objects.equals(mBackend.getActiveDream(), dreamInfo.componentName)) { in setActiveDream() 176 mBackend.setActiveDream(dreamInfo.componentName); in setActiveDream() [all …]
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/notification/ |
D | ChannelNotificationSettings.java | 98 context, mImportanceListener, mBackend)); in createPreferenceControllers() 100 context, mImportanceListener, mBackend)); in createPreferenceControllers() 102 context, mImportanceListener, mBackend)); in createPreferenceControllers() 104 context, mImportanceListener, mBackend)); in createPreferenceControllers() 106 mImportanceListener, mBackend)); in createPreferenceControllers() 107 mControllers.add(new VibrationPreferenceController(context, mBackend)); in createPreferenceControllers() 111 mBackend)); in createPreferenceControllers() 112 mControllers.add(new LightsPreferenceController(context, mBackend)); in createPreferenceControllers() 113 mControllers.add(new BadgePreferenceController(context, mBackend)); in createPreferenceControllers() 114 mControllers.add(new DndPreferenceController(context, mBackend)); in createPreferenceControllers() [all …]
|
D | AppNotificationSettings.java | 98 mChannelGroupList = mBackend.getGroups(mPkg, mUid).getList(); in onResume() 134 mControllers.add(new BlockPreferenceController(context, mImportanceListener, mBackend)); in createPreferenceControllers() 135 mControllers.add(new BadgePreferenceController(context, mBackend)); in createPreferenceControllers() 137 context, mImportanceListener, mBackend)); in createPreferenceControllers() 139 context, mImportanceListener, mBackend)); in createPreferenceControllers() 141 context, mImportanceListener, mBackend)); in createPreferenceControllers() 143 context, mImportanceListener, mBackend)); in createPreferenceControllers() 145 mImportanceListener, mBackend)); in createPreferenceControllers() 146 mControllers.add(new LightsPreferenceController(context, mBackend)); in createPreferenceControllers() 147 mControllers.add(new VibrationPreferenceController(context, mBackend)); in createPreferenceControllers() [all …]
|
D | AssistantCapabilityPreferenceController.java | 32 private NotificationBackend mBackend; field in AssistantCapabilityPreferenceController 36 mBackend = new NotificationBackend(); in AssistantCapabilityPreferenceController() 41 mBackend = backend; in setBackend() 46 List<String> capabilities = mBackend.getAssistantAdjustments(mContext.getPackageName()); in isChecked() 59 mBackend.allowAssistantAdjustment(Adjustment.KEY_IMPORTANCE, isChecked); in setChecked() 61 mBackend.allowAssistantAdjustment(Adjustment.KEY_CONTEXTUAL_ACTIONS, isChecked); in setChecked() 62 mBackend.allowAssistantAdjustment(Adjustment.KEY_TEXT_REPLIES, isChecked); in setChecked() 69 return mBackend.getAllowedNotificationAssistant() != null in getAvailabilityStatus()
|
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()
|
/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/tests/robotests/src/com/android/settings/dream/ |
D | WhenToDreamPickerTest.java | 45 private DreamBackend mBackend; field in WhenToDreamPickerTest 60 ReflectionHelpers.setField(mPicker, "mBackend", mBackend); in setup() 65 when(mBackend.getWhenToDreamSetting()).thenReturn(DreamBackend.WHILE_CHARGING); in getDefaultKeyReturnsCurrentWhenToDreamSetting() 69 when(mBackend.getWhenToDreamSetting()).thenReturn(DreamBackend.WHILE_DOCKED); in getDefaultKeyReturnsCurrentWhenToDreamSetting() 73 when(mBackend.getWhenToDreamSetting()).thenReturn(DreamBackend.EITHER); in getDefaultKeyReturnsCurrentWhenToDreamSetting() 77 when(mBackend.getWhenToDreamSetting()).thenReturn(DreamBackend.NEVER); in getDefaultKeyReturnsCurrentWhenToDreamSetting() 86 verify(mBackend).setWhenToDream(DreamBackend.WHILE_CHARGING); in setDreamWhileCharging() 93 verify(mBackend).setWhenToDream(DreamBackend.WHILE_DOCKED); in setDreamWhileDocked() 100 verify(mBackend).setWhenToDream(DreamBackend.EITHER); in setDreamWhileChargingOrDocked() 107 verify(mBackend).setWhenToDream(DreamBackend.NEVER); in setDreamNever()
|
/packages/apps/Settings/src/com/android/settings/dream/ |
D | CurrentDreamPreferenceController.java | 32 private final DreamBackend mBackend; field in CurrentDreamPreferenceController 36 mBackend = DreamBackend.getInstance(context); in CurrentDreamPreferenceController() 41 return mBackend.getDreamInfos().size() > 0 ? AVAILABLE : CONDITIONALLY_UNAVAILABLE; in getAvailabilityStatus() 52 return mBackend.getActiveDreamName(); in getSummary() 72 mBackend.launchSettings(mContext, info.get()); in launchScreenSaverSettings() 76 return mBackend.getDreamInfos() in getActiveDreamInfo()
|
D | CurrentDreamPicker.java | 37 private DreamBackend mBackend; field in CurrentDreamPicker 43 mBackend = DreamBackend.getInstance(context); in onAttach() 60 mBackend.setActiveDream(componentNameMap.get(key)); in setDefaultKey() 68 return mBackend.getActiveDream().flattenToString(); in getDefaultKey() 74 candidates = mBackend.getDreamInfos().stream() in getCandidates() 90 mBackend.getDreamInfos() in getDreamComponentsMap()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/dream/ |
D | CurrentDreamPreferenceController.java | 32 private final DreamBackend mBackend; field in CurrentDreamPreferenceController 36 mBackend = DreamBackend.getInstance(context); in CurrentDreamPreferenceController() 41 return mBackend.getDreamInfos().size() > 0 ? AVAILABLE : CONDITIONALLY_UNAVAILABLE; in getAvailabilityStatus() 52 return mBackend.getActiveDreamName(); in getSummary() 72 mBackend.launchSettings(mContext, info.get()); in launchScreenSaverSettings() 76 return mBackend.getDreamInfos() in getActiveDreamInfo()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/ |
D | HighPowerDetail.java | 49 PowerWhitelistBackend mBackend; field in HighPowerDetail 73 mBackend = PowerWhitelistBackend.getInstance(context); in onCreate() 84 mIsEnabled = mDefaultOn || mBackend.isWhitelisted(mPackageName); in onCreate() 94 if (!on && mBackend.isSysWhitelisted(mPackageName)) { in setup() 106 if (!mBackend.isSysWhitelisted(mPackageName)) { in onCreateDialog() 140 boolean oldValue = mBackend.isWhitelisted(mPackageName); in onClick() 146 mBackend.addApp(mPackageName); in onClick() 148 mBackend.removeApp(mPackageName); in onClick()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/ |
D | HighPowerDetail.java | 49 PowerWhitelistBackend mBackend; field in HighPowerDetail 73 mBackend = PowerWhitelistBackend.getInstance(context); in onCreate() 84 mIsEnabled = mDefaultOn || mBackend.isWhitelisted(mPackageName); in onCreate() 94 if (!on && mBackend.isSysWhitelisted(mPackageName)) { in setup() 106 if (!mBackend.isSysWhitelisted(mPackageName)) { in onCreateDialog() 140 boolean oldValue = mBackend.isWhitelisted(mPackageName); in onClick() 146 mBackend.addApp(mPackageName); in onClick() 148 mBackend.removeApp(mPackageName); in onClick()
|