Merge "Fix battery saver slider is not displaying"
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user