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

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

Merge "Introduce PowerExemptionManager." into sc-dev am: 2d29c77b

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8c365e5065693cf6dac77ea1a129d3d5a8b2f5bf
parents 8f774ca3 2d29c77b
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