/packages/apps/Settings/src/com/android/settings/display/darkmode/ |
D | DarkModeCustomPreferenceController.java | 37 private final UiModeManager mUiModeManager; field in DarkModeCustomPreferenceController 44 mUiModeManager = context.getSystemService(UiModeManager.class); in DarkModeCustomPreferenceController() 64 return mUiModeManager.getNightMode() == MODE_NIGHT_CUSTOM in getAvailabilityStatus() 65 && mUiModeManager.getNightModeCustomType() in getAvailabilityStatus() 73 initialTime = mUiModeManager.getCustomNightModeStart(); in getDialog() 75 initialTime = mUiModeManager.getCustomNightModeEnd(); in getDialog() 80 mUiModeManager.setCustomNightModeStart(time); in getDialog() 82 mUiModeManager.setCustomNightModeEnd(time); in getDialog() 94 time = mUiModeManager.getCustomNightModeStart(); in refreshSummary() 96 time = mUiModeManager.getCustomNightModeEnd(); in refreshSummary()
|
D | DarkModeScheduleSelectorController.java | 38 private final UiModeManager mUiModeManager; field in DarkModeScheduleSelectorController 48 mUiModeManager = context.getSystemService(UiModeManager.class); in DarkModeScheduleSelectorController() 81 switch (mUiModeManager.getNightMode()) { in getCurrentMode() 87 && mUiModeManager.getNightModeCustomType() in getCurrentMode() 111 mUiModeManager.setNightMode(mode); in onPreferenceChange() 118 mUiModeManager.setNightMode(UiModeManager.MODE_NIGHT_AUTO); in onPreferenceChange() 121 mUiModeManager.setNightMode(UiModeManager.MODE_NIGHT_CUSTOM); in onPreferenceChange() 124 mUiModeManager.setNightModeCustomType(UiModeManager.MODE_NIGHT_CUSTOM_TYPE_BEDTIME); in onPreferenceChange()
|
D | DarkModeActivationPreferenceController.java | 41 private final UiModeManager mUiModeManager; field in DarkModeActivationPreferenceController 48 mUiModeManager = context.getSystemService(UiModeManager.class); in DarkModeActivationPreferenceController() 70 final int mode = mUiModeManager.getNightMode(); in getSummary() 76 if (mUiModeManager.getNightModeCustomType() in getSummary() 84 ? mUiModeManager.getCustomNightModeEnd() in getSummary() 85 : mUiModeManager.getCustomNightModeStart(); in getSummary() 103 mUiModeManager.setNightModeActivated(!active); in onCheckedChanged()
|
D | DarkModePreference.java | 33 private UiModeManager mUiModeManager; field in DarkModePreference 43 mUiModeManager = context.getSystemService(UiModeManager.class); in DarkModePreference() 76 final int mode = mUiModeManager.getNightMode(); in updateSummary() 84 if (mUiModeManager.getNightModeCustomType() in updateSummary() 91 ? mUiModeManager.getCustomNightModeEnd() in updateSummary() 92 : mUiModeManager.getCustomNightModeStart(); in updateSummary()
|
D | DarkModeCustomBedtimePreferenceController.java | 34 private final UiModeManager mUiModeManager; field in DarkModeCustomBedtimePreferenceController 40 mUiModeManager = context.getSystemService(UiModeManager.class); in DarkModeCustomBedtimePreferenceController() 68 if (mUiModeManager.getNightModeCustomType() != MODE_NIGHT_CUSTOM_TYPE_BEDTIME) { in updateState()
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/ |
D | CarNightServiceTest.java | 72 private UiModeManager mUiModeManager; field in CarNightServiceTest 92 when(mContext.getSystemService(Context.UI_MODE_SERVICE)).thenReturn(mUiModeManager); in setUp() 109 verify(mUiModeManager).setNightMode(UiModeManager.MODE_NIGHT_YES); in onInit_propertyTimestampMissing_setsDefaultNightMode() 117 verify(mUiModeManager).setNightMode(UiModeManager.MODE_NIGHT_YES); in onInit_propertyMissing_setsDefaultNightMode() 126 when(mUiModeManager.getNightMode()).thenReturn(expectedNewMode); in forceDayNightMode_setsDayMode() 129 verify(mUiModeManager).setNightMode(expectedNewMode); in forceDayNightMode_setsDayMode() 139 when(mUiModeManager.getNightMode()).thenReturn(expectedNewMode); in forceDayNightMode_setsNightMode() 142 verify(mUiModeManager).setNightMode(expectedNewMode); in forceDayNightMode_setsNightMode() 153 verifyNoMoreInteractions(mUiModeManager); in forceDayNightMode_invalidMode() 170 when(mUiModeManager.getNightMode()).thenReturn(expectedNewMode); in forceDayNightMode_withSetting_setsDayMode() [all …]
|
/packages/services/Car/tests/ThemePlayground/src/com/android/car/themeplayground/ |
D | WidgetsSamples.java | 29 private UiModeManager mUiModeManager; field in WidgetsSamples 37 mUiModeManager = (UiModeManager) this.getSystemService(Context.UI_MODE_SERVICE); in onCreate() 40 if (mUiModeManager.getNightMode() == UiModeManager.MODE_NIGHT_YES) { in onCreate() 41 mUiModeManager.setNightMode(UiModeManager.MODE_NIGHT_NO); in onCreate() 43 mUiModeManager.setNightMode(UiModeManager.MODE_NIGHT_YES); in onCreate()
|
D | AbstractSampleActivity.java | 41 private UiModeManager mUiModeManager; field in AbstractSampleActivity 47 mUiModeManager = (UiModeManager) this.getSystemService(Context.UI_MODE_SERVICE); in onCreateOptionsMenu() 134 mUiModeManager.setNightMode( in toggleDayNight() 135 (mUiModeManager.getNightMode() == UiModeManager.MODE_NIGHT_YES) in toggleDayNight()
|
/packages/apps/Settings/tests/componenttests/src/com/android/settings/display/darkmode/ |
D | DarkThemeScheduleComponentTest.java | 65 private UiModeManager mUiModeManager; field in DarkThemeScheduleComponentTest 69 mUiModeManager = mInstrumentation.getTargetContext().getSystemService(UiModeManager.class); in setUp() 70 if (mUiModeManager.getNightMode() != UiModeManager.MODE_NIGHT_NO) { in setUp() 71 mUiModeManager.setNightMode(UiModeManager.MODE_NIGHT_NO); in setUp() 79 mUiModeManager.setNightMode(UiModeManager.MODE_NIGHT_CUSTOM); in test_step_for_custom_time() 140 if (mUiModeManager.getNightMode() != UiModeManager.MODE_NIGHT_NO) { in tearDown() 141 mUiModeManager.setNightMode(UiModeManager.MODE_NIGHT_NO); in tearDown()
|
/packages/services/Car/service/src/com/android/car/ |
D | CarNightService.java | 70 private final UiModeManager mUiModeManager; field in CarNightService 132 if (mUiModeManager != null && (mForcedMode == FORCED_SENSOR_MODE)) { in setNightModeLocked() 133 mUiModeManager.setNightMode(mNightSetting); in setNightModeLocked() 161 if (mUiModeManager == null) { in forceDayNightModeInternal() 182 mUiModeManager.setNightMode(resultMode); in forceDayNightModeInternal() 183 return mUiModeManager.getNightMode(); in forceDayNightModeInternal() 189 mUiModeManager = (UiModeManager) mContext.getSystemService(Context.UI_MODE_SERVICE); in CarNightService() 190 if (mUiModeManager == null) { in CarNightService()
|
/packages/apps/Settings/src/com/android/settings/display/ |
D | ContrastSelectorPreferenceController.java | 55 private final UiModeManager mUiModeManager; field in ContrastSelectorPreferenceController 63 mUiModeManager = mContext.getSystemService(UiModeManager.class); in ContrastSelectorPreferenceController() 93 highlightContrast(toContrastLevel(mUiModeManager.getContrast())); in displayPreference() 104 mUiModeManager.addContrastChangeListener(mMainExecutor, this); in onStart() 109 mUiModeManager.removeContrastChangeListener(this); in onStop()
|
D | DarkUIPreferenceController.java | 46 private UiModeManager mUiModeManager; field in DarkUIPreferenceController 58 mUiModeManager = context.getSystemService(UiModeManager.class); in DarkUIPreferenceController() 82 return mUiModeManager.setNightModeActivated(isChecked); in setChecked()
|
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/ |
D | SystemStateHelperTest.java | 79 @Mock UiModeManager mUiModeManager; field in SystemStateHelperTest 98 doReturn(mUiModeManager).when(mContext).getSystemService(UiModeManager.class); in setUp() 126 when(mUiModeManager.getCurrentModeType()).thenReturn(Configuration.UI_MODE_TYPE_CAR); in testQuerySystemForCarMode_True() 133 when(mUiModeManager.getCurrentModeType()).thenReturn(Configuration.UI_MODE_TYPE_NORMAL); in testQuerySystemForCarMode_False() 140 when(mUiModeManager.getActiveProjectionTypes()) in testQuerySystemForAutomotiveProjection_True() 144 when(mUiModeManager.getActiveProjectionTypes()) in testQuerySystemForAutomotiveProjection_True() 152 when(mUiModeManager.getActiveProjectionTypes()) in testQuerySystemForAutomotiveProjection_False() 160 when(mUiModeManager.getCurrentModeType()).thenReturn(Configuration.UI_MODE_TYPE_CAR); in testQuerySystemForAutomotiveProjectionAndCarMode_True() 161 when(mUiModeManager.getActiveProjectionTypes()) in testQuerySystemForAutomotiveProjectionAndCarMode_True() 170 .thenReturn(mUiModeManager) // Without this, class construction will throw NPE. in testQuerySystemForAutomotiveProjectionOrCarMode_nullService() [all …]
|
D | ComponentContextFixture.java | 248 return mUiModeManager; in getSystemService() 639 private final UiModeManager mUiModeManager = mock(UiModeManager.class);
|
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/slices/ |
D | DarkThemeSlice.java | 66 private final UiModeManager mUiModeManager; field in DarkThemeSlice 71 mUiModeManager = context.getSystemService(UiModeManager.class); in DarkThemeSlice() 142 mUiModeManager.setNightModeActivated(isChecked); in onNotifyChange() 180 final int mode = mUiModeManager.getNightMode(); in isNightModeScheduled()
|
/packages/apps/ThemePicker/src/com/android/customization/model/mode/ |
D | DarkModeSectionController.java | 64 private final UiModeManagerWrapper mUiModeManager; field in DarkModeSectionController 78 mUiModeManager = uiModeManager; in DarkModeSectionController() 145 mUiModeManager.setNightModeActivated(viewActivated); in onViewActivated()
|
/packages/apps/Car/SystemUI/src/com/android/systemui/car/notification/ |
D | NotificationPanelViewMediator.java | 60 private final UiModeManager mUiModeManager; field in NotificationPanelViewMediator 112 mUiModeManager = uiModeManager; in NotificationPanelViewMediator() 169 mUiModeManager.setNightModeActivated(mIsUiModeNight); in onConfigChanged()
|
/packages/apps/Car/SystemUI/src/com/android/systemui/car/hvac/ |
D | HvacPanelOverlayViewController.java | 49 private final UiModeManager mUiModeManager; field in HvacPanelOverlayViewController 71 mUiModeManager = uiModeManager; in HvacPanelOverlayViewController() 211 mUiModeManager.setNightModeActivated(mIsUiModeNight); in onConfigChanged()
|
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/ |
D | ActivityTest.java | 83 protected UiModeManager mUiModeManager; field in ActivityTest 219 mUiModeManager = (UiModeManager) getActivity() in setSystemUiModeNight() 221 mUiModeManager.setNightMode(uiModeNight); in setSystemUiModeNight()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/ |
D | DarkThemeSliceTest.java | 64 private UiModeManager mUiModeManager; field in DarkThemeSliceTest 79 doReturn(mUiModeManager).when(mContext).getSystemService(UiModeManager.class); in setUp() 231 when(mUiModeManager.getNightMode()).thenReturn(mode); in setNightMode()
|
/packages/apps/Car/SystemUI/tests/src/com/android/systemui/car/hvac/ |
D | HvacPanelOverlayViewControllerTest.java | 77 UiModeManager mUiModeManager; field in HvacPanelOverlayViewControllerTest 92 mCarDeviceProvisionedController, mConfigurationController, mUiModeManager); in setUp()
|
/packages/apps/Car/SystemUI/src/com/android/systemui/car/systembar/ |
D | CarSystemBar.java | 128 private UiModeManager mUiModeManager; field in CarSystemBar 210 mUiModeManager = mContext.getSystemService(UiModeManager.class); in CarSystemBar() 767 mUiModeManager.setNightModeActivated(mIsUiModeNight); in onConfigChanged() 859 mUiModeManager = uiModeManager; in setUiModeManager()
|
/packages/apps/Car/SystemUI/src/com/android/systemui/car/volume/ |
D | CarVolumeDialogImpl.java | 128 private final UiModeManager mUiModeManager; field in CarVolumeDialogImpl 295 mUiModeManager = mContext.getSystemService(UiModeManager.class); in CarVolumeDialogImpl() 367 mUiModeManager.setNightModeActivated(mIsUiModeNight); in onConfigChanged()
|