Home
last modified time | relevance | path

Searched refs:mPowerManager (Results 1 – 25 of 36) 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/services/Car/service/src/com/android/car/systeminterface/
DDisplayInterface.java81 private final PowerManager mPowerManager; field in DisplayInterface.DefaultImpl
120 mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in DefaultImpl()
121 mMaximumBacklight = mPowerManager.getMaximumScreenBrightnessSetting(); in DefaultImpl()
122 mMinimumBacklight = mPowerManager.getMinimumScreenBrightnessSetting(); in DefaultImpl()
206 mPowerManager.wakeUp(SystemClock.uptimeMillis()); in setDisplayState()
210 mPowerManager.goToSleep(SystemClock.uptimeMillis()); in setDisplayState()
DSystemStateInterface.java78 private final PowerManager mPowerManager; field in SystemStateInterface.DefaultImpl
95 mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in DefaultImpl()
100 mPowerManager.shutdown(false /* no confirm*/, null, true /* true */); in shutdown()
/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/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/apps/Settings/src/com/android/settings/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/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/src/com/android/settings/fuelgauge/batterytip/detectors/
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()
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()
/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/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/apps/Nfc/src/com/android/nfc/cardemulation/
DCardEmulationManager.java80 final PowerManager mPowerManager; field in CardEmulationManager
97 mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in CardEmulationManager()
110 if (mPowerManager != null) { in onHostCardEmulationActivated()
111mPowerManager.userActivity(SystemClock.uptimeMillis(), PowerManager.USER_ACTIVITY_EVENT_TOUCH, 0); in onHostCardEmulationActivated()
124 if (mPowerManager != null) { in onHostCardEmulationData()
125mPowerManager.userActivity(SystemClock.uptimeMillis(), PowerManager.USER_ACTIVITY_EVENT_TOUCH, 0); in onHostCardEmulationData()
/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/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()
/packages/apps/CellBroadcastReceiver/tests/unit/src/com/android/cellbroadcastreceiver/
DCellBroadcastAlertDialogTest.java56 private PowerManager mPowerManager; field in CellBroadcastAlertDialogTest
83 mPowerManager = new PowerManager(mContext, mMockedPowerManagerService, null); in setUp()
84 injectSystemService(PowerManager.class, mPowerManager); in setUp()
/packages/apps/Settings/src/com/android/settings/display/
DDarkUIPreferenceController.java50 private PowerManager mPowerManager; field in DarkUIPreferenceController
66 mPowerManager = context.getSystemService(PowerManager.class); in DarkUIPreferenceController()
127 return mPowerManager.isPowerSaveMode(); in isPowerSaveMode()
/packages/apps/Settings/src/com/android/settings/applications/
DRecentAppStatsMixin.java63 private final PowerManager mPowerManager;; field in RecentAppStatsMixin
85 mPowerManager = mContext.getSystemService(PowerManager.class); in RecentAppStatsMixin()
118 final List<UsageStats> mStats = mPowerManager.isPowerSaveMode() in loadDisplayableRecentApps()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/applications/
DRecentAppStatsMixin.java63 private final PowerManager mPowerManager;; field in RecentAppStatsMixin
85 mPowerManager = mContext.getSystemService(PowerManager.class); in RecentAppStatsMixin()
118 final List<UsageStats> mStats = mPowerManager.isPowerSaveMode() in loadDisplayableRecentApps()

12