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

Commit b4582d98 authored by Kweku Adams's avatar Kweku Adams
Browse files

Clarify what ignoring battery optimizations means.

Add some more definition to what it means to be on the power allowlist.

Bug: 173547576
Test: N/A
Change-Id: I6c6bd3248dc39877e560656e787ef02adf7d279f
parent 5f28ee3e
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);