diff options
author | 2024-02-01 13:33:02 -0800 | |
---|---|---|
committer | 2024-02-02 02:30:37 +0000 | |
commit | 40fc60aa81c10644f68c35d49b5f4354dc0931bb (patch) | |
tree | 4dec891533ca57e8eff2a0c7fe6550c441e32ec0 | |
parent | 148026c459f52e2a81f0138e23e6575a12922adf (diff) |
[ECM] Define ACTION_SHOW_ECM_RESTRICTED_SETTING_DIALOG
We're planning to move the "Restricted setting" dialog into
PermissionController. But, this dialog's intent action string,
Settings.ACTION_SHOW_RESTRICTED_SETTING_DIALOG, is currently bound to
the Settings app.
So, to ease the transition, this change defines a new intent action
string.
This string should only need to be accessed by PermissionController,
which handles the intent, and EnhancedConfirmationManager, which
constructs the intent.
Bug: 322026141
Test: manual
Change-Id: I1ba1d5bc778dd39239abb0dc6e0f0f32bea0c2b2
-rw-r--r-- | framework-s/api/system-current.txt | 1 | ||||
-rw-r--r-- | framework-s/java/android/app/ecm/EnhancedConfirmationManager.java | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/framework-s/api/system-current.txt b/framework-s/api/system-current.txt index b4dfafba2..527407bf3 100644 --- a/framework-s/api/system-current.txt +++ b/framework-s/api/system-current.txt @@ -7,6 +7,7 @@ package android.app.ecm { 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; method @RequiresPermission(android.Manifest.permission.MANAGE_ENHANCED_CONFIRMATION_STATES) public void setClearRestrictionAllowed(@NonNull String) throws android.content.pm.PackageManager.NameNotFoundException; + field public static final String ACTION_SHOW_ECM_RESTRICTED_SETTING_DIALOG = "android.app.ecm.action.SHOW_ECM_RESTRICTED_SETTING_DIALOG"; } } diff --git a/framework-s/java/android/app/ecm/EnhancedConfirmationManager.java b/framework-s/java/android/app/ecm/EnhancedConfirmationManager.java index 52e220bc0..a7cea07d3 100644 --- a/framework-s/java/android/app/ecm/EnhancedConfirmationManager.java +++ b/framework-s/java/android/app/ecm/EnhancedConfirmationManager.java @@ -16,9 +16,12 @@ package android.app.ecm; +import static android.annotation.SdkConstant.SdkConstantType.BROADCAST_INTENT_ACTION; + import android.annotation.FlaggedApi; import android.annotation.IntDef; import android.annotation.RequiresPermission; +import android.annotation.SdkConstant; import android.annotation.SystemApi; import android.annotation.SystemService; import android.annotation.TargetApi; @@ -192,6 +195,13 @@ public final class EnhancedConfirmationManager { * appropriate RequiresPermission annotation. */ + /** + * Shows the "Restricted setting" dialog. Opened when a setting is blocked. + */ + @SdkConstant(BROADCAST_INTENT_ACTION) + public static final String ACTION_SHOW_ECM_RESTRICTED_SETTING_DIALOG = + "android.app.ecm.action.SHOW_ECM_RESTRICTED_SETTING_DIALOG"; + /** A map of ECM states to their corresponding app op states */ @Retention(java.lang.annotation.RetentionPolicy.SOURCE) @IntDef(prefix = {"ECM_STATE_"}, value = {EcmState.ECM_STATE_NOT_GUARDED, |