diff --git a/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatterySaverUtils.java b/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatterySaverUtils.java index e19ac815b939c..6d7e86f649444 100644 --- a/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatterySaverUtils.java +++ b/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatterySaverUtils.java @@ -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); } /** diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java index eb195718c3f75..c8cf02a052429 100644 --- a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java +++ b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java @@ -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);