From cb2e1bdabb53036b842dc3776d468dc6337d3382 Mon Sep 17 00:00:00 2001 From: YK Hung Date: Sun, 20 Oct 2024 02:11:54 +0000 Subject: [PATCH] Fix BatterySaverScheduleRadioButtonsControllerTest Test was failing because it was not setting the EXTRA_LOW_POWER_WARNING_ACKNOWLEDGED setting. Change-Id: Id9e95c0240908dafbaa791e7f4f4b9ded9d39d9b Test: atest BatterySaverScheduleRadioButtonsControllerTest Bug: 370883745 Fix: 370883745 Flag: EXEMPT for simple bug fix --- .../BatterySaverScheduleRadioButtonsControllerTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/unit/src/com/android/settings/fuelgauge/batterysaver/BatterySaverScheduleRadioButtonsControllerTest.java b/tests/unit/src/com/android/settings/fuelgauge/batterysaver/BatterySaverScheduleRadioButtonsControllerTest.java index bb2d2ef4674..f0a24844659 100644 --- a/tests/unit/src/com/android/settings/fuelgauge/batterysaver/BatterySaverScheduleRadioButtonsControllerTest.java +++ b/tests/unit/src/com/android/settings/fuelgauge/batterysaver/BatterySaverScheduleRadioButtonsControllerTest.java @@ -53,6 +53,8 @@ public class BatterySaverScheduleRadioButtonsControllerTest { public void setDefaultKey_percentage_shouldSuppressNotification() { Secure.putInt( mContext.getContentResolver(), Secure.LOW_POWER_WARNING_ACKNOWLEDGED, 1); + Secure.putInt( + mContext.getContentResolver(), Secure.EXTRA_LOW_POWER_WARNING_ACKNOWLEDGED, 1); Settings.Global.putInt(mResolver, Global.AUTOMATIC_POWER_SAVE_MODE, PowerManager.POWER_SAVE_MODE_TRIGGER_PERCENTAGE); Settings.Global.putInt(mResolver, Global.LOW_POWER_MODE_TRIGGER_LEVEL, 5);