Remove the 'schedule by routine' from the saver scheduler

Fix: 258603978
Test: make RunSettingsRoboTests
Change-Id: I6256957dc5a4be6699998c825fb32e03f638af39
This commit is contained in:
ykhung
2022-11-14 11:24:17 +08:00
parent d66fd82c35
commit a2f5c5a24e
3 changed files with 7 additions and 14 deletions

View File

@@ -24,6 +24,7 @@ import android.provider.Settings;
import android.util.Log;
import com.android.settings.fuelgauge.batterysaver.BatterySaverScheduleRadioButtonsController;
import com.android.settingslib.fuelgauge.BatterySaverUtils;
/** Execute battery settings migration tasks in the device booting stage. */
public final class BatterySettingsMigrateChecker extends BroadcastReceiver {
@@ -52,5 +53,7 @@ public final class BatterySettingsMigrateChecker extends BroadcastReceiver {
BatterySaverScheduleRadioButtonsController.TRIGGER_LEVEL_MIN);
Log.w(TAG, "Reset invalid scheduled battery level from: " + threshold);
}
// Force removing the 'schedule by routine' state.
BatterySaverUtils.revertScheduleToNoneIfNeeded(context);
}
}