Change range of battery saver schedule seekbar

The minimum value which can be set as trigger for
Battery saver was changed from 10% -> 20% however the
settings UI was not aligned with this change.

ref: b0fe225 Update the battery saver scheduler minimum level

Update the UI to align with the minimum trigger
level.

Bug: 396444535
Test: manual, check minimum seekbar value after reboot.
Test: atest BatterySaverScheduleSeekBarControllerTest
Change-Id: I4baa766ff1cb78ce656ae340ce930094b9e124e0
This commit is contained in:
Henrik Baard
2025-02-14 08:15:55 +01:00
parent bc86ae0553
commit 37bf0fbe57
2 changed files with 2 additions and 2 deletions

View File

@@ -49,7 +49,7 @@ public class BatterySaverScheduleSeekBarController
implements OnPreferenceChangeListener, OnSeekBarChangeListener {
public static final int MAX_SEEKBAR_VALUE = 15;
public static final int MIN_SEEKBAR_VALUE = 2;
public static final int MIN_SEEKBAR_VALUE = 4;
public static final String KEY_BATTERY_SAVER_SEEK_BAR = "battery_saver_seek_bar";
private static final int LEVEL_UNIT_SCALE = 5;

View File

@@ -95,7 +95,7 @@ public class BatterySaverScheduleSeekBarControllerTest {
@Test
public void updateSeekBar_percentageMode_hasCorrectProperties() {
final CharSequence expectedTitle = "10%";
final CharSequence expectedTitle = "20%";
Settings.Global.putInt(
mResolver,
Global.AUTOMATIC_POWER_SAVE_MODE,