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

Commit 2d29c77b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Introduce PowerExemptionManager." into sc-dev

parents 726c5061 69f79be0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.app.SystemServiceRegistry;
import android.content.Context;
import android.os.DeviceIdleManager;
import android.os.IDeviceIdleController;
import android.os.PowerExemptionManager;
import android.os.PowerWhitelistManager;

/**
@@ -52,5 +53,8 @@ public class JobSchedulerFrameworkInitializer {
        SystemServiceRegistry.registerContextAwareService(
                Context.POWER_WHITELIST_MANAGER, PowerWhitelistManager.class,
                PowerWhitelistManager::new);
        SystemServiceRegistry.registerContextAwareService(
                Context.POWER_EXEMPTION_SERVICE, PowerExemptionManager.class,
                PowerExemptionManager::new);
    }
}
+626 −0

File added.

Preview size limit exceeded, changes collapsed.

+20 −0

File changed.

Preview size limit exceeded, changes collapsed.

+9 −0
Original line number Diff line number Diff line
@@ -4836,6 +4836,15 @@ public abstract class Context {
    @SuppressLint("ServiceName")  // TODO: This should be renamed to POWER_WHITELIST_SERVICE
    public static final String POWER_WHITELIST_MANAGER = "power_whitelist";

    /**
     * System service name for the PowerExemptionManager.
     *
     * @see #getSystemService(String)
     * @hide
     */
    @SystemApi
    public static final String POWER_EXEMPTION_SERVICE = "power_exemption";

    /**
     * Use with {@link #getSystemService(String)} to retrieve a
     * {@link android.app.admin.DevicePolicyManager} for working with global