Home
last modified time | relevance | path

Searched refs:mPowerManager (Results 1 – 25 of 57) sorted by relevance

123

/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DBatterySaverControllerTest.java50 private PowerManager mPowerManager; field in BatterySaverControllerTest
65 ReflectionHelpers.setField(mBatterySaverController, "mPowerManager", mPowerManager); in setUp()
86 when(mPowerManager.isPowerSaveMode()).thenReturn(true); in onPreferenceChange_onPowerSaveModeChanged_manualTrigger_logsType()
98 when(mPowerManager.isPowerSaveMode()).thenReturn(true); in onPreferenceChange_onPowerSaveModeChanged_triggerPercent_logsTypeAndPercentage()
116 when(mPowerManager.isPowerSaveMode()).thenReturn(true); in onPreferenceChange_onPowerSaveModeChanged_triggerDynamic_logsType()
129 when(mPowerManager.isPowerSaveMode()).thenReturn(true); in getSummary_batterySaverOn_showSummaryOn()
136 when(mPowerManager.isPowerSaveMode()).thenReturn(false); in getSummary_batterySaverOffButScheduled_showSummaryScheduled()
145 when(mPowerManager.isPowerSaveMode()).thenReturn(false); in getSummary_batterySaverOffButScheduledZeroPercent_showSummaryOff()
154 when(mPowerManager.isPowerSaveMode()).thenReturn(false); in getSummary_batterySaverOffButScheduledBasedOnRoutine_showSummaryBasedOnRoutine()
166 when(mPowerManager.isPowerSaveMode()).thenReturn(false); in getSummary_batterySaverOff_showSummaryOff()
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterysaver/
DBatterySaverButtonPreferenceControllerTest.java51 private PowerManager mPowerManager; field in BatterySaverButtonPreferenceControllerTest
61 doReturn(mPowerManager).when(mContext).getSystemService(Context.POWER_SERVICE); in setUp()
76 when(mPowerManager.isPowerSaveMode()).thenReturn(true); in updateState_lowPowerOn_preferenceIsChecked()
78 mController.onSwitchChanged(null, mPowerManager.isPowerSaveMode()); in updateState_lowPowerOn_preferenceIsChecked()
85 when(mPowerManager.isPowerSaveMode()).thenReturn(false); in testUpdateState_lowPowerOff_preferenceIsUnchecked()
87 mController.onSwitchChanged(null, mPowerManager.isPowerSaveMode()); in testUpdateState_lowPowerOff_preferenceIsUnchecked()
96 verify(mPowerManager).setPowerSaveModeEnabled(true); in setChecked_on_setPowerSaveMode()
103 verify(mPowerManager).setPowerSaveModeEnabled(false); in setChecked_off_unsetPowerSaveMode()
/packages/services/Car/service/src/com/android/car/systeminterface/
DDisplayInterface.java102 private final PowerManager mPowerManager; field in DisplayInterface.DefaultImpl
151 mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in DefaultImpl()
152 mMaximumBacklight = mPowerManager.getMaximumScreenBrightnessSetting(); in DefaultImpl()
153 mMinimumBacklight = mPowerManager.getMinimumScreenBrightnessSetting(); in DefaultImpl()
251 mPowerManager.wakeUp(SystemClock.uptimeMillis()); in setDisplayState()
255 mPowerManager.goToSleep(SystemClock.uptimeMillis()); in setDisplayState()
DSystemStateInterface.java87 private final PowerManager mPowerManager; field in SystemStateInterface.DefaultImpl
105 mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in DefaultImpl()
110 mPowerManager.shutdown(false /* no confirm*/, null, true /* true */); in shutdown()
/packages/apps/Settings/src/com/android/settings/display/
DAdaptiveSleepBatterySaverPreferenceController.java36 private final PowerManager mPowerManager; field in AdaptiveSleepBatterySaverPreferenceController
40 mPowerManager = context.getSystemService(PowerManager.class); in AdaptiveSleepBatterySaverPreferenceController()
59 return mPowerManager.isPowerSaveMode(); in isPowerSaveMode()
76 p -> mPowerManager.setPowerSaveModeEnabled(false)); in initializePreference()
DSmartAutoRotateBatterySaverController.java46 private final PowerManager mPowerManager; field in SmartAutoRotateBatterySaverController
60 mPowerManager = context.getSystemService(PowerManager.class); in SmartAutoRotateBatterySaverController()
65 return mPowerManager.isPowerSaveMode(); in isPowerSaveMode()
75 mPowerManager.setPowerSaveModeEnabled(false); in displayPreference()
DDarkUIPreferenceController.java50 private PowerManager mPowerManager; field in DarkUIPreferenceController
66 mPowerManager = context.getSystemService(PowerManager.class); in DarkUIPreferenceController()
122 return mPowerManager.isPowerSaveMode(); in isPowerSaveMode()
DSmartAutoRotatePreferenceController.java55 private final PowerManager mPowerManager; field in SmartAutoRotatePreferenceController
68 mPowerManager = context.getSystemService(PowerManager.class); in SmartAutoRotatePreferenceController()
121 return mPowerManager.isPowerSaveMode(); in isPowerSaveMode()
DAdaptiveSleepPreferenceController.java57 private final PowerManager mPowerManager; field in AdaptiveSleepPreferenceController
67 mPowerManager = context.getSystemService(PowerManager.class); in AdaptiveSleepPreferenceController()
138 return mPowerManager.isPowerSaveMode(); in isPowerSaveMode()
/packages/apps/Settings/tests/robotests/src/com/android/settings/display/
DBrightnessLevelPreferenceControllerTest.java62 private PowerManager mPowerManager; field in BrightnessLevelPreferenceControllerTest
81 when(mPowerManager.getBrightnessConstraint( in setUp()
83 when(mPowerManager.getBrightnessConstraint( in setUp()
85 when(mPowerManager.getBrightnessConstraint( in setUp()
87 when(mPowerManager.getBrightnessConstraint( in setUp()
90 mPowerManager); in setUp()
DAmbientDisplayAlwaysOnPreferenceControllerTest.java58 private PowerManager mPowerManager; field in AmbientDisplayAlwaysOnPreferenceControllerTest
83 doReturn(mPowerManager).when(mContext).getSystemService(PowerManager.class); in setUp()
84 when(mPowerManager.isAmbientDisplaySuppressedForTokenByApp(anyString(), anyInt())) in setUp()
156 when(mPowerManager.isAmbientDisplaySuppressedForTokenByApp(anyString(), anyInt())) in isAodSuppressedByBedtime_bedTimeModeOn_returnTrue()
181 when(mPowerManager.isAmbientDisplaySuppressedForTokenByApp(anyString(), anyInt())) in getSummary_bedTimeModeOn_shouldReturnUnavailableSummary()
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/conditional/
DBatterySaverConditionControllerTest.java46 private ShadowPowerManager mPowerManager; field in BatterySaverConditionControllerTest
54 mPowerManager = Shadows.shadowOf(mContext.getSystemService(PowerManager.class)); in setUp()
75 mPowerManager.setIsPowerSaveMode(true); in isDisplayable_PowerSaverOn_true()
82 mPowerManager.setIsPowerSaveMode(false); in isDisplayable_PowerSaverOff_false()
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/
DIkeSessionTestBase.java77 protected PowerManager mPowerManager; field in IkeSessionTestBase
99 mPowerManager = mock(PowerManager.class); in setUp()
102 doReturn(mPowerManager).when(mSpyContext).getSystemService(eq(PowerManager.class)); in setUp()
104 .when(mPowerManager) in setUp()
109 .when(mPowerManager) in setUp()
/packages/apps/Settings/src/com/android/settings/fuelgauge/
DBatterySaverController.java49 private final PowerManager mPowerManager; field in BatterySaverController
63 mPowerManager = mContext.getSystemService(PowerManager.class); in BatterySaverController()
104 final boolean isPowerSaveOn = mPowerManager.isPowerSaveMode(); in getSummary()
131 if (!mPowerManager.isPowerSaveMode()) { in logPowerSaver()
/packages/apps/Nfc/src/com/android/nfc/
DScreenStateHelper.java23 private final PowerManager mPowerManager; field in ScreenStateHelper
29 mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in ScreenStateHelper()
34 if (!mPowerManager.isScreenOn()) { in checkScreenState()
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/detectors/
DSmartBatteryDetector.java38 private PowerManager mPowerManager; field in SmartBatteryDetector
45 mPowerManager = context.getSystemService(PowerManager.class); in SmartBatteryDetector()
56 smartBatteryOff && !mPowerManager.isPowerSaveMode() && isUnderExpectedBatteryLevel in detect()
DEarlyWarningDetector.java36 private PowerManager mPowerManager; field in EarlyWarningDetector
42 mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in EarlyWarningDetector()
54 final boolean powerSaveModeOn = mPowerManager.isPowerSaveMode(); in detect()
DLowBatteryDetector.java35 private PowerManager mPowerManager; field in LowBatteryDetector
41 mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in LowBatteryDetector()
48 final boolean powerSaveModeOn = mPowerManager.isPowerSaveMode(); in detect()
/packages/apps/Settings/src/com/android/settings/display/darkmode/
DDarkModePreference.java35 private PowerManager mPowerManager; field in DarkModePreference
44 mPowerManager = context.getSystemService(PowerManager.class); in DarkModePreference()
47 final boolean batterySaver = mPowerManager.isPowerSaveMode(); in DarkModePreference()
DDarkModeScheduleSelectorController.java38 private PowerManager mPowerManager; field in DarkModeScheduleSelectorController
46 mPowerManager = context.getSystemService(PowerManager.class); in DarkModeScheduleSelectorController()
63 final boolean batterySaver = mPowerManager.isPowerSaveMode(); in updateState()
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/conditional/
DBatterySaverConditionController.java39 private final PowerManager mPowerManager; field in BatterySaverConditionController
44 mPowerManager = appContext.getSystemService(PowerManager.class); in BatterySaverConditionController()
56 return mPowerManager.isPowerSaveMode(); in isDisplayable()
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/
DDarkThemeSliceTest.java57 private PowerManager mPowerManager; field in DarkThemeSliceTest
72 doReturn(mPowerManager).when(mContext).getSystemService(PowerManager.class); in setUp()
73 when(mPowerManager.isPowerSaveMode()).thenReturn(false); in setUp()
130 when(mPowerManager.isPowerSaveMode()).thenReturn(true); in getSlice_batterySaver_returnErrorSlice()
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterysaver/
DBatterySaverButtonPreferenceController.java47 private final PowerManager mPowerManager; field in BatterySaverButtonPreferenceController
53 mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in BatterySaverButtonPreferenceController()
104 return mPowerManager.isPowerSaveMode(); in isChecked()
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/detectors/
DEarlyWarningDetectorTest.java52 private PowerManager mPowerManager; field in EarlyWarningDetectorTest
61 doReturn(mPowerManager).when(mContext).getSystemService(Context.POWER_SERVICE); in setUp()
90 doReturn(true).when(mPowerManager).isPowerSaveMode(); in testDetect_batterySaverOn_tipInvisible()
/packages/apps/ThemePicker/src/com/android/customization/model/mode/
DDarkModeSectionController.java56 private final PowerManager mPowerManager; field in DarkModeSectionController
66 mPowerManager = context.getSystemService(PowerManager.class); in DarkModeSectionController()
140 mDarkModeSectionView.setEnabled(!mPowerManager.isPowerSaveMode()); in onReceive()

123