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

Commit f7f6200c authored by Raff Tsai's avatar Raff Tsai Committed by Android (Google) Code Review
Browse files

Merge "Fix battery saver slider is not displaying"

parents c0e6e25c 92cdc549
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.PowerManager;
import android.os.UserHandle;
import android.provider.Settings.Global;
import android.provider.Settings.Secure;
import android.text.TextUtils;
@@ -186,7 +187,8 @@ public class BatterySaverUtils {
    }

    private static void setBatterySaverConfirmationAcknowledged(Context context) {
        Secure.putInt(context.getContentResolver(), Secure.LOW_POWER_WARNING_ACKNOWLEDGED, 1);
        Secure.putIntForUser(context.getContentResolver(), Secure.LOW_POWER_WARNING_ACKNOWLEDGED, 1,
                UserHandle.USER_CURRENT);
    }

    /**
+2 −2
Original line number Diff line number Diff line
@@ -585,10 +585,10 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI {
                                resolver,
                                Global.LOW_POWER_MODE_TRIGGER_LEVEL,
                                batterySaverTriggerLevel);
                        Secure.putInt(
                        Secure.putIntForUser(
                                resolver,
                                Secure.LOW_POWER_WARNING_ACKNOWLEDGED,
                                1);
                                1, UserHandle.USER_CURRENT);
                    });
        } else {
            d.setTitle(R.string.battery_saver_confirmation_title);