Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2efacb16 authored by Makoto Onuki's avatar Makoto Onuki Committed by android-build-merger
Browse files

Merge "Ensure automatic battery saver won't stick" into pi-dev am: c1203d6a

am: 6e7625b0

Change-Id: I96ddca3b28561b2d6c52b35ca8bc1ff590cd9533
parents e159397f 6e7625b0
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -141,8 +141,14 @@ public class BatterySaverStateMachine {
        if (DEBUG) {
            Slog.d(TAG, "onBootCompleted");
        }
        // This is called with the power manager lock held. Don't do any
        // Just booted. We don't want LOW_POWER_MODE to be persisted, so just always clear it.
        putGlobalSetting(Global.LOW_POWER_MODE, 0);

        // This is called with the power manager lock held. Don't do anything that may call to
        // upper services. (e.g. don't call into AM directly)
        // So use a BG thread.
        runOnBgThread(() -> {

            final ContentResolver cr = mContext.getContentResolver();
            cr.registerContentObserver(Settings.Global.getUriFor(
                    Settings.Global.LOW_POWER_MODE),