Home
last modified time | relevance | path

Searched refs:BatterySaverUtils (Results 1 – 4 of 4) sorted by relevance

/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/fuelgauge/
DBatterySaverUtilsTest.java71 assertThat(BatterySaverUtils.setPowerSaveMode(mMockContext, true, true)).isFalse(); in testSetPowerSaveMode_enable_firstCall_needWarning()
88 assertThat(BatterySaverUtils.setPowerSaveMode(mMockContext, true, true)).isTrue(); in testSetPowerSaveMode_enable_secondCall_needWarning()
102 assertThat(BatterySaverUtils.setPowerSaveMode(mMockContext, true, true)).isTrue(); in testSetPowerSaveMode_enable_thridCall_needWarning()
116 assertThat(BatterySaverUtils.setPowerSaveMode(mMockContext, true, false)).isTrue(); in testSetPowerSaveMode_enable_firstCall_noWarning()
131 assertThat(BatterySaverUtils.setPowerSaveMode(mMockContext, false, false)).isTrue(); in testSetPowerSaveMode_disable_firstCall_noWarning()
147 assertThat(BatterySaverUtils.setPowerSaveMode(mMockContext, false, true)).isTrue(); in testSetPowerSaveMode_disable_firstCall_needWarning()
161 BatterySaverUtils.ensureAutoBatterySaver(mMockContext, BATTERY_SAVER_THRESHOLD_1); in testEnsureAutoBatterysaver_setNewPositiveValue_doNotOverwrite()
167 BatterySaverUtils.ensureAutoBatterySaver(mMockContext, BATTERY_SAVER_THRESHOLD_2); in testEnsureAutoBatterysaver_setNewPositiveValue_doNotOverwrite()
177 BatterySaverUtils.setAutoBatterySaverTriggerLevel(mMockContext, 0); in testSetAutoBatterySaverTriggerLevel_setSuppressSuggestion()
183 BatterySaverUtils.setAutoBatterySaverTriggerLevel(mMockContext, BATTERY_SAVER_THRESHOLD_1); in testSetAutoBatterySaverTriggerLevel_setSuppressSuggestion()
/frameworks/base/packages/SystemUI/src/com/android/systemui/power/
DPowerNotificationWarnings.java56 import com.android.settingslib.fuelgauge.BatterySaverUtils;
108 BatterySaverUtils.ACTION_SHOW_START_SAVER_CONFIRMATION;
110 BatterySaverUtils.ACTION_SHOW_AUTO_SAVER_SUGGESTION;
559 final boolean confirmOnly = extras.getBoolean(BatterySaverUtils.EXTRA_CONFIRM_TEXT_ONLY); in showStartSaverConfirmation()
561 extras.getInt(BatterySaverUtils.EXTRA_POWER_SAVE_MODE_TRIGGER, in showStartSaverConfirmation()
564 extras.getInt(BatterySaverUtils.EXTRA_POWER_SAVE_MODE_TRIGGER_LEVEL, 0); in showStartSaverConfirmation()
679 BatterySaverUtils.setPowerSaveMode(mContext, mode, needFirstTimeWarning); in setSaverMode()
742 BatterySaverUtils.suppressAutoBatterySaver(context); in onReceive()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/fuelgauge/
DBatterySaverUtils.java34 public class BatterySaverUtils { class
58 private BatterySaverUtils() { in BatterySaverUtils() method in BatterySaverUtils
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DBatteryControllerImpl.java33 import com.android.settingslib.fuelgauge.BatterySaverUtils;
117 BatterySaverUtils.setPowerSaveMode(mContext, powerSave, /*needFirstTimeWarning*/ true); in setPowerSaveMode()