From b2f88488e9a639b67285527daf51d60e46311890 Mon Sep 17 00:00:00 2001 From: Varun Shah Date: Wed, 24 Mar 2021 22:23:38 -0700 Subject: [PATCH] Hide permanent allow list methods. Bug: 183052977 Test: m Change-Id: I78736c648b0b50a87029b2dd48d9a5a42117f3a7 --- .../framework/java/android/os/PowerExemptionManager.java | 6 ++++++ core/api/system-current.txt | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/apex/jobscheduler/framework/java/android/os/PowerExemptionManager.java b/apex/jobscheduler/framework/java/android/os/PowerExemptionManager.java index 63b3959eeafd7..fea7a11ba61ae 100644 --- a/apex/jobscheduler/framework/java/android/os/PowerExemptionManager.java +++ b/apex/jobscheduler/framework/java/android/os/PowerExemptionManager.java @@ -378,6 +378,8 @@ public class PowerExemptionManager { /** * Add the specified package to the permanent power save allow list. + * + * @hide */ @RequiresPermission(android.Manifest.permission.DEVICE_POWER) public void addToPermanentAllowList(@NonNull String packageName) { @@ -386,6 +388,8 @@ public class PowerExemptionManager { /** * Add the specified packages to the permanent power save allow list. + * + * @hide */ @RequiresPermission(android.Manifest.permission.DEVICE_POWER) public void addToPermanentAllowList(@NonNull List packageNames) { @@ -402,6 +406,7 @@ public class PowerExemptionManager { * * @param includingIdle Set to true if the app should be allow-listed from device idle as well * as other power save restrictions + * @hide */ @NonNull @RequiresPermission(android.Manifest.permission.DEVICE_POWER) @@ -443,6 +448,7 @@ public class PowerExemptionManager { * removed. Apps allow-listed by default by the system cannot be removed. * * @param packageName The app to remove from the allow list + * @hide */ @RequiresPermission(android.Manifest.permission.DEVICE_POWER) public void removeFromPermanentAllowList(@NonNull String packageName) { diff --git a/core/api/system-current.txt b/core/api/system-current.txt index ac6f2738cfe74..0e8c70b1bc072 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -8290,12 +8290,8 @@ package android.os { } public class PowerExemptionManager { - method @RequiresPermission(android.Manifest.permission.DEVICE_POWER) public void addToPermanentAllowList(@NonNull String); - method @RequiresPermission(android.Manifest.permission.DEVICE_POWER) public void addToPermanentAllowList(@NonNull java.util.List); method @RequiresPermission(android.Manifest.permission.CHANGE_DEVICE_IDLE_TEMP_WHITELIST) public void addToTemporaryAllowList(@NonNull String, int, @Nullable String, long); method @RequiresPermission(android.Manifest.permission.CHANGE_DEVICE_IDLE_TEMP_WHITELIST) public long addToTemporaryAllowListForEvent(@NonNull String, int, @Nullable String, int); - method @NonNull @RequiresPermission(android.Manifest.permission.DEVICE_POWER) public int[] getAllowListedAppIds(boolean); - method @RequiresPermission(android.Manifest.permission.DEVICE_POWER) public void removeFromPermanentAllowList(@NonNull String); field public static final int EVENT_MMS = 2; // 0x2 field public static final int EVENT_SMS = 1; // 0x1 field public static final int EVENT_UNSPECIFIED = 0; // 0x0