/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/ |
D | BatterySaverControllerTest.java | 50 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/ |
D | BatterySaverButtonPreferenceControllerTest.java | 51 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/ |
D | DisplayInterface.java | 102 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()
|
D | SystemStateInterface.java | 87 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/ |
D | AdaptiveSleepBatterySaverPreferenceController.java | 36 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()
|
D | SmartAutoRotateBatterySaverController.java | 46 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()
|
D | DarkUIPreferenceController.java | 50 private PowerManager mPowerManager; field in DarkUIPreferenceController 66 mPowerManager = context.getSystemService(PowerManager.class); in DarkUIPreferenceController() 122 return mPowerManager.isPowerSaveMode(); in isPowerSaveMode()
|
D | SmartAutoRotatePreferenceController.java | 55 private final PowerManager mPowerManager; field in SmartAutoRotatePreferenceController 68 mPowerManager = context.getSystemService(PowerManager.class); in SmartAutoRotatePreferenceController() 121 return mPowerManager.isPowerSaveMode(); in isPowerSaveMode()
|
D | AdaptiveSleepPreferenceController.java | 57 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/ |
D | BrightnessLevelPreferenceControllerTest.java | 62 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()
|
D | AmbientDisplayAlwaysOnPreferenceControllerTest.java | 58 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/ |
D | BatterySaverConditionControllerTest.java | 46 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/ |
D | IkeSessionTestBase.java | 77 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/ |
D | BatterySaverController.java | 49 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/ |
D | ScreenStateHelper.java | 23 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/ |
D | SmartBatteryDetector.java | 38 private PowerManager mPowerManager; field in SmartBatteryDetector 45 mPowerManager = context.getSystemService(PowerManager.class); in SmartBatteryDetector() 56 smartBatteryOff && !mPowerManager.isPowerSaveMode() && isUnderExpectedBatteryLevel in detect()
|
D | EarlyWarningDetector.java | 36 private PowerManager mPowerManager; field in EarlyWarningDetector 42 mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in EarlyWarningDetector() 54 final boolean powerSaveModeOn = mPowerManager.isPowerSaveMode(); in detect()
|
D | LowBatteryDetector.java | 35 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/ |
D | DarkModePreference.java | 35 private PowerManager mPowerManager; field in DarkModePreference 44 mPowerManager = context.getSystemService(PowerManager.class); in DarkModePreference() 47 final boolean batterySaver = mPowerManager.isPowerSaveMode(); in DarkModePreference()
|
D | DarkModeScheduleSelectorController.java | 38 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/ |
D | BatterySaverConditionController.java | 39 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/ |
D | DarkThemeSliceTest.java | 57 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/ |
D | BatterySaverButtonPreferenceController.java | 47 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/ |
D | EarlyWarningDetectorTest.java | 52 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/ |
D | DarkModeSectionController.java | 56 private final PowerManager mPowerManager; field in DarkModeSectionController 66 mPowerManager = context.getSystemService(PowerManager.class); in DarkModeSectionController() 140 mDarkModeSectionView.setEnabled(!mPowerManager.isPowerSaveMode()); in onReceive()
|