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

Commit 81e94935 authored by Wesley Wang's avatar Wesley Wang
Browse files

Remove user id from saver enabled acknowledge

 - Make low power warning ack as device based instead of user based

Test: BatterySaverUtils robo test
Bug: 301203729
Change-Id: I32d00e858de9c6d8c9153da0c54a43889297ed00
parent bef66aca
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@ import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.PowerManager;
import android.os.UserHandle;
import android.provider.Settings;
import android.provider.Settings.Global;
import android.provider.Settings.Secure;
@@ -202,10 +201,10 @@ public class BatterySaverUtils {
    }

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

    /**