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

Commit 6e7625b0 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

Change-Id: I98897510188c38309f708d86802f83ef3573984d
parents de8f0912 c1203d6a
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),