From 40fc60aa81c10644f68c35d49b5f4354dc0931bb Mon Sep 17 00:00:00 2001 From: Jay Thomas Sullivan Date: Thu, 1 Feb 2024 13:33:02 -0800 Subject: [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 --- .../java/android/app/ecm/EnhancedConfirmationManager.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'framework-s/java') 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, -- cgit v1.2.3-59-g8ed1b