Home
last modified time | relevance | path

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

12

/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterysaver/
DBatterySaverButtonPreferenceControllerTest.java54 private PowerManager mPowerManager; field in BatterySaverButtonPreferenceControllerTest
68 doReturn(mPowerManager).when(mContext).getSystemService(Context.POWER_SERVICE); in setUp()
77 when(mPowerManager.isPowerSaveMode()).thenReturn(true); in updateState_lowPowerOn_preferenceIsChecked()
86 when(mPowerManager.isPowerSaveMode()).thenReturn(false); in testUpdateState_lowPowerOff_preferenceIsUnchecked()
97 verify(mPowerManager).setPowerSaveModeEnabled(true); in setChecked_on_setPowerSaveMode()
104 verify(mPowerManager).setPowerSaveModeEnabled(false); in setChecked_off_unsetPowerSaveMode()
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DBatterySaverControllerTest.java45 private PowerManager mPowerManager; field in BatterySaverControllerTest
56 ReflectionHelpers.setField(mBatterySaverController, "mPowerManager", mPowerManager); in setUp()
77 when(mPowerManager.isPowerSaveMode()).thenReturn(true); in getSummary_batterySaverOn_showSummaryOn()
84 when(mPowerManager.isPowerSaveMode()).thenReturn(false); in getSummary_batterySaverOffButScheduled_showSummaryScheduled()
93 when(mPowerManager.isPowerSaveMode()).thenReturn(false); in getSummary_batterySaverOff_showSummaryOff()
/packages/apps/Settings/tests/robotests/src/com/android/settings/display/
DBrightnessLevelPreferenceControllerTest.java53 private PowerManager mPowerManager; field in BrightnessLevelPreferenceControllerTest
70 when(mPowerManager.getMinimumScreenBrightnessSetting()).thenReturn(0); in setUp()
71 when(mPowerManager.getMaximumScreenBrightnessSetting()).thenReturn(100); in setUp()
72 when(mPowerManager.getMinimumScreenBrightnessForVrSetting()).thenReturn(0); in setUp()
73 when(mPowerManager.getMaximumScreenBrightnessForVrSetting()).thenReturn(100); in setUp()
75 mPowerManager); in setUp()
/packages/services/Car/service/src/com/android/car/systeminterface/
DDisplayInterface.java84 private final PowerManager mPowerManager; field in DisplayInterface.DefaultImpl
124 mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in DefaultImpl()
125 mMaximumBacklight = mPowerManager.getMaximumScreenBrightnessSetting(); in DefaultImpl()
126 mMinimumBacklight = mPowerManager.getMinimumScreenBrightnessSetting(); in DefaultImpl()
210 mPowerManager.wakeUp(SystemClock.uptimeMillis()); in setDisplayState()
214 mPowerManager.goToSleep(SystemClock.uptimeMillis()); in setDisplayState()
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/
DIkeSessionTestBase.java66 protected PowerManager mPowerManager; field in IkeSessionTestBase
88 mPowerManager = mock(PowerManager.class); in setUp()
91 doReturn(mPowerManager).when(mSpyContext).getSystemService(eq(PowerManager.class)); in setUp()
93 .when(mPowerManager) in setUp()
98 .when(mPowerManager) in setUp()
/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/src/java/com/android/internal/net/ipsec/ike/
DIkeLocalRequestScheduler.java49 private final PowerManager mPowerManager; field in IkeLocalRequestScheduler
62 mPowerManager = context.getSystemService(PowerManager.class); in IkeLocalRequestScheduler()
67 request.acquireWakeLock(mPowerManager); in addRequest()
73 request.acquireWakeLock(mPowerManager); in addRequestAtFront()
/packages/apps/Settings/src/com/android/settings/fuelgauge/
DBatteryHeaderPreferenceController.java62 private final PowerManager mPowerManager; field in BatteryHeaderPreferenceController
68 mPowerManager = context.getSystemService(PowerManager.class); in BatteryHeaderPreferenceController()
118 mBatteryMeterView.setPowerSave(mPowerManager.isPowerSaveMode()); in updateHeaderPreference()
131 mBatteryMeterView.setPowerSave(mPowerManager.isPowerSaveMode()); in quickUpdateHeaderPreference()
DBatterySaverController.java42 private final PowerManager mPowerManager; field in BatterySaverController
48 mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); in BatterySaverController()
89 final boolean isPowerSaveOn = mPowerManager.isPowerSaveMode(); in getSummary()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/
DBatteryHeaderPreferenceController.java64 private final PowerManager mPowerManager; field in BatteryHeaderPreferenceController
70 mPowerManager = context.getSystemService(PowerManager.class); in BatteryHeaderPreferenceController()
124 mBatteryMeterView.setPowerSave(mPowerManager.isPowerSaveMode()); in updateHeaderPreference()
137 mBatteryMeterView.setPowerSave(mPowerManager.isPowerSaveMode()); in quickUpdateHeaderPreference()
DBatterySaverController.java42 private final PowerManager mPowerManager; field in BatterySaverController
48 mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); in BatterySaverController()
89 final boolean isPowerSaveOn = mPowerManager.isPowerSaveMode(); in getSummary()
/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/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/
DDarkThemeSliceTest.java53 private PowerManager mPowerManager; field in DarkThemeSliceTest
66 doReturn(mPowerManager).when(mContext).getSystemService(PowerManager.class); in setUp()
67 when(mPowerManager.isPowerSaveMode()).thenReturn(false); in setUp()
105 when(mPowerManager.isPowerSaveMode()).thenReturn(true); in getSlice_batterySaver_returnErrorSlice()
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/detectors/
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/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/batterytip/detectors/
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/
DDarkModeScheduleSelectorController.java34 private PowerManager mPowerManager; field in DarkModeScheduleSelectorController
41 mPowerManager = context.getSystemService(PowerManager.class); in DarkModeScheduleSelectorController()
58 final boolean batterySaver = mPowerManager.isPowerSaveMode(); in updateState()
DDarkModePreference.java31 private PowerManager mPowerManager; field in DarkModePreference
38 mPowerManager = context.getSystemService(PowerManager.class); in DarkModePreference()
40 final boolean batterySaver = mPowerManager.isPowerSaveMode(); in DarkModePreference()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/batterysaver/
DBatterySaverButtonPreferenceController.java41 private final PowerManager mPowerManager; field in BatterySaverButtonPreferenceController
47 mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in BatterySaverButtonPreferenceController()
80 return mPowerManager.isPowerSaveMode(); in isChecked()
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterysaver/
DBatterySaverButtonPreferenceController.java41 private final PowerManager mPowerManager; field in BatterySaverButtonPreferenceController
47 mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in BatterySaverButtonPreferenceController()
80 return mPowerManager.isPowerSaveMode(); in isChecked()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/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/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/Nfc/src/com/android/nfc/cardemulation/
DCardEmulationManager.java82 final PowerManager mPowerManager; field in CardEmulationManager
99 mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in CardEmulationManager()
112 if (mPowerManager != null) { in onHostCardEmulationActivated()
113mPowerManager.userActivity(SystemClock.uptimeMillis(), PowerManager.USER_ACTIVITY_EVENT_TOUCH, 0); in onHostCardEmulationActivated()
126 if (mPowerManager != null) { in onHostCardEmulationData()
127mPowerManager.userActivity(SystemClock.uptimeMillis(), PowerManager.USER_ACTIVITY_EVENT_TOUCH, 0); in onHostCardEmulationData()
/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_tipHandled()

12