Home
last modified time | relevance | path

Searched refs:mUiModeManager (Results 1 – 14 of 14) sorted by relevance

/packages/apps/Settings/src/com/android/settings/display/darkmode/
DDarkModeCustomPreferenceController.java40 private final UiModeManager mUiModeManager; field in DarkModeCustomPreferenceController
47 mUiModeManager = context.getSystemService(UiModeManager.class); in DarkModeCustomPreferenceController()
73 initialTime = mUiModeManager.getCustomNightModeStart(); in getDialog()
75 initialTime = mUiModeManager.getCustomNightModeEnd(); in getDialog()
80 mUiModeManager.setCustomNightModeStart(time); in getDialog()
82 mUiModeManager.setCustomNightModeEnd(time); in getDialog()
92 if (mUiModeManager.getNightMode() != MODE_NIGHT_CUSTOM) { in refreshSummary()
99 time = mUiModeManager.getCustomNightModeStart(); in refreshSummary()
101 time = mUiModeManager.getCustomNightModeEnd(); in refreshSummary()
DDarkModeActivationPreferenceController.java41 private final UiModeManager mUiModeManager; field in DarkModeActivationPreferenceController
52 mUiModeManager = context.getSystemService(UiModeManager.class); in DarkModeActivationPreferenceController()
79 final int mode = mUiModeManager.getNightMode(); in updateNightMode()
88 ? mUiModeManager.getCustomNightModeStart() in updateNightMode()
89 : mUiModeManager.getCustomNightModeEnd(); in updateNightMode()
114 final int mode = mUiModeManager.getNightMode(); in getSummary()
121 ? mUiModeManager.getCustomNightModeEnd() in getSummary()
122 : mUiModeManager.getCustomNightModeStart(); in getSummary()
141 mUiModeManager.setNightModeActivated(!active);
DDarkModeScheduleSelectorController.java37 private final UiModeManager mUiModeManager; field in DarkModeScheduleSelectorController
45 mUiModeManager = context.getSystemService(UiModeManager.class); in DarkModeScheduleSelectorController()
71 switch (mUiModeManager.getNightMode()) { in getCurrentMode()
96 mUiModeManager.setNightMode(mode); in onPreferenceChange()
103 mUiModeManager.setNightMode(UiModeManager.MODE_NIGHT_AUTO); in onPreferenceChange()
106 mUiModeManager.setNightMode(UiModeManager.MODE_NIGHT_CUSTOM); in onPreferenceChange()
DDarkModePreference.java31 private UiModeManager mUiModeManager; field in DarkModePreference
41 mUiModeManager = context.getSystemService(UiModeManager.class); in DarkModePreference()
74 final int mode = mUiModeManager.getNightMode(); in updateSummary()
83 ? mUiModeManager.getCustomNightModeEnd() in updateSummary()
84 : mUiModeManager.getCustomNightModeStart(); in updateSummary()
/packages/services/Car/service/src/com/android/car/
DCarNightService.java60 private final UiModeManager mUiModeManager; field in CarNightService
113 if (mUiModeManager != null && (mForcedMode == FORCED_SENSOR_MODE)) { in setNightModeLocked()
114 mUiModeManager.setNightMode(mNightSetting); in setNightModeLocked()
130 if (mUiModeManager == null) { in forceDayNightMode()
151 mUiModeManager.setNightMode(resultMode); in forceDayNightMode()
152 return mUiModeManager.getNightMode(); in forceDayNightMode()
159 mUiModeManager = (UiModeManager) mContext.getSystemService(Context.UI_MODE_SERVICE); in CarNightService()
160 if (mUiModeManager == null) { in CarNightService()
/packages/apps/Car/Settings/src/com/android/car/settings/quicksettings/
DDayNightTile.java37 private final UiModeManager mUiModeManager; field in DayNightTile
53 mUiModeManager = (UiModeManager) mContext.getSystemService(Context.UI_MODE_SERVICE); in DayNightTile()
54 if (mUiModeManager.getNightMode() == UiModeManager.MODE_NIGHT_YES) { in DayNightTile()
103 if (mUiModeManager.getNightMode() == UiModeManager.MODE_NIGHT_YES) { in onClick()
104 mUiModeManager.setNightMode(UiModeManager.MODE_NIGHT_NO); in onClick()
106 mUiModeManager.setNightMode(UiModeManager.MODE_NIGHT_YES); in onClick()
/packages/services/Car/tests/ThemePlayground/src/com/android/car/themeplayground/
DWidgetsSamples.java29 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()
DAbstractSampleActivity.java39 private UiModeManager mUiModeManager; field in AbstractSampleActivity
45 mUiModeManager = (UiModeManager) this.getSystemService(Context.UI_MODE_SERVICE); in onCreateOptionsMenu()
126 mUiModeManager.setNightMode( in toggleDayNight()
127 (mUiModeManager.getNightMode() == UiModeManager.MODE_NIGHT_YES) in toggleDayNight()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/display/
DDarkUIPreferenceController.java32 private UiModeManager mUiModeManager; field in DarkUIPreferenceController
36 mUiModeManager = context.getSystemService(UiModeManager.class); in DarkUIPreferenceController()
41 mUiModeManager = uiModeManager; in setUiModeManager()
52 mContext, mUiModeManager.getNightMode()); in getSummary()
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/slices/
DDarkThemeSlice.java66 private final UiModeManager mUiModeManager; field in DarkThemeSlice
71 mUiModeManager = context.getSystemService(UiModeManager.class); in DarkThemeSlice()
142 mUiModeManager.setNightModeActivated(isChecked); in onNotifyChange()
175 final int mode = mUiModeManager.getNightMode(); in isNightModeScheduled()
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
DSystemStateHelperTest.java72 @Mock UiModeManager mUiModeManager; field in SystemStateHelperTest
116 when(mContext.getSystemService(Context.UI_MODE_SERVICE)).thenReturn(mUiModeManager); in testQuerySystemForCarMode_True()
117 when(mUiModeManager.getCurrentModeType()).thenReturn(Configuration.UI_MODE_TYPE_CAR); in testQuerySystemForCarMode_True()
124 when(mContext.getSystemService(Context.UI_MODE_SERVICE)).thenReturn(mUiModeManager); in testQuerySystemForCarMode_False()
125 when(mUiModeManager.getCurrentModeType()).thenReturn(Configuration.UI_MODE_TYPE_NORMAL); in testQuerySystemForCarMode_False()
/packages/apps/Settings/src/com/android/settings/display/
DDarkUIPreferenceController.java49 private UiModeManager mUiModeManager; field in DarkUIPreferenceController
65 mUiModeManager = context.getSystemService(UiModeManager.class); in DarkUIPreferenceController()
95 return mUiModeManager.setNightModeActivated(isChecked); in setChecked()
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/
DActivityTest.java77 protected UiModeManager mUiModeManager; field in ActivityTest
204 mUiModeManager = (UiModeManager) getActivity() in setSystemUiModeNight()
206 mUiModeManager.setNightMode(uiModeNight); in setSystemUiModeNight()
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/
DDarkThemeSliceTest.java59 private UiModeManager mUiModeManager; field in DarkThemeSliceTest
74 doReturn(mUiModeManager).when(mContext).getSystemService(UiModeManager.class); in setUp()
222 when(mUiModeManager.getNightMode()).thenReturn(mode); in setNightMode()