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

Commit dba9178b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Clarify what ignoring battery optimizations means." into sc-dev am: 1b3424aa

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14748399

Change-Id: Ie4ff90c685e9cac8674f326967c7c117eff12843
parents ade30615 1b3424aa
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2107,6 +2107,8 @@ public final class PowerManager {
     * Return whether the given application package name is on the device's power allowlist.
     * Apps can be placed on the allowlist through the settings UI invoked by
     * {@link android.provider.Settings#ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS}.
     * <p>Being on the power allowlist means that the system will not apply most power saving
     * features to the app. Guardrails for extreme cases may still be applied.
     */
    public boolean isIgnoringBatteryOptimizations(String packageName) {
        return getPowerWhitelistManager().isWhitelisted(packageName, true);