summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework-s/api/system-current.txt6
-rw-r--r--framework-s/java/android/app/ecm/EnhancedConfirmationManager.java5
2 files changed, 8 insertions, 3 deletions
diff --git a/framework-s/api/system-current.txt b/framework-s/api/system-current.txt
index e8d1b8992..02ab5b562 100644
--- a/framework-s/api/system-current.txt
+++ b/framework-s/api/system-current.txt
@@ -2,10 +2,10 @@
package android.app.ecm {
@FlaggedApi("android.permission.flags.enhanced_confirmation_mode_apis_enabled") public final class EnhancedConfirmationManager {
- method public void clearRestriction(@NonNull String) throws android.content.pm.PackageManager.NameNotFoundException;
+ method @RequiresPermission(android.Manifest.permission.MANAGE_ENHANCED_CONFIRMATION_STATES) public void clearRestriction(@NonNull String) throws android.content.pm.PackageManager.NameNotFoundException;
method @NonNull public android.app.PendingIntent getRestrictedSettingDialogIntent(@NonNull String) throws android.content.pm.PackageManager.NameNotFoundException;
- method public boolean isClearRestrictionAllowed(@NonNull String) throws android.content.pm.PackageManager.NameNotFoundException;
- method public boolean isRestricted(@NonNull String, @NonNull String) throws android.content.pm.PackageManager.NameNotFoundException;
+ method @RequiresPermission(android.Manifest.permission.MANAGE_ENHANCED_CONFIRMATION_STATES) public boolean isClearRestrictionAllowed(@NonNull String) throws android.content.pm.PackageManager.NameNotFoundException;
+ method @RequiresPermission(android.Manifest.permission.MANAGE_ENHANCED_CONFIRMATION_STATES) public boolean isRestricted(@NonNull String, @NonNull String) throws android.content.pm.PackageManager.NameNotFoundException;
}
}
diff --git a/framework-s/java/android/app/ecm/EnhancedConfirmationManager.java b/framework-s/java/android/app/ecm/EnhancedConfirmationManager.java
index fa745a52f..6feae2ee8 100644
--- a/framework-s/java/android/app/ecm/EnhancedConfirmationManager.java
+++ b/framework-s/java/android/app/ecm/EnhancedConfirmationManager.java
@@ -18,6 +18,7 @@ package android.app.ecm;
import android.annotation.FlaggedApi;
import android.annotation.IntDef;
+import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.annotation.TargetApi;
@@ -239,6 +240,7 @@ public final class EnhancedConfirmationManager {
* @return {@code true} if the setting is restricted from the app
* @throws NameNotFoundException if the provided package was not found
*/
+ @RequiresPermission(android.Manifest.permission.MANAGE_ENHANCED_CONFIRMATION_STATES)
public boolean isRestricted(@NonNull String packageName, @NonNull String settingIdentifier)
throws NameNotFoundException {
try {
@@ -261,6 +263,7 @@ public final class EnhancedConfirmationManager {
* @param packageName package name of the application to remove protection from
* @throws NameNotFoundException if the provided package was not found
*/
+ @RequiresPermission(android.Manifest.permission.MANAGE_ENHANCED_CONFIRMATION_STATES)
public void clearRestriction(@NonNull String packageName) throws NameNotFoundException {
try {
mService.clearRestriction(packageName, mContext.getUser().getIdentifier());
@@ -283,6 +286,7 @@ public final class EnhancedConfirmationManager {
* restrictions from the provided app
* @throws NameNotFoundException if the provided package was not found
*/
+ @RequiresPermission(android.Manifest.permission.MANAGE_ENHANCED_CONFIRMATION_STATES)
public boolean isClearRestrictionAllowed(@NonNull String packageName)
throws NameNotFoundException {
try {
@@ -305,6 +309,7 @@ public final class EnhancedConfirmationManager {
* @throws NameNotFoundException if the provided package was not found
* @hide
*/
+ @RequiresPermission(android.Manifest.permission.MANAGE_ENHANCED_CONFIRMATION_STATES)
public void setClearRestrictionAllowed(@NonNull String packageName)
throws NameNotFoundException {
try {