diff --git a/core/api/system-current.txt b/core/api/system-current.txt index b8cdd9fb2ae14..c8e41085dba0c 100755 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -2423,6 +2423,7 @@ package android.content { field @RequiresPermission(android.Manifest.permission.MANAGE_ROLE_HOLDERS) public static final String ACTION_MANAGE_DEFAULT_APP = "android.intent.action.MANAGE_DEFAULT_APP"; field public static final String ACTION_MANAGE_PERMISSIONS = "android.intent.action.MANAGE_PERMISSIONS"; field public static final String ACTION_MANAGE_PERMISSION_APPS = "android.intent.action.MANAGE_PERMISSION_APPS"; + field @RequiresPermission(android.Manifest.permission.START_VIEW_PERMISSION_USAGE) public static final String ACTION_MANAGE_PERMISSION_USAGE = "android.intent.action.MANAGE_PERMISSION_USAGE"; field @RequiresPermission(android.Manifest.permission.MANAGE_ROLE_HOLDERS) public static final String ACTION_MANAGE_SPECIAL_APP_ACCESSES = "android.intent.action.MANAGE_SPECIAL_APP_ACCESSES"; field public static final String ACTION_MASTER_CLEAR_NOTIFICATION = "android.intent.action.MASTER_CLEAR_NOTIFICATION"; field public static final String ACTION_PACKAGE_NEEDS_INTEGRITY_VERIFICATION = "android.intent.action.PACKAGE_NEEDS_INTEGRITY_VERIFICATION"; diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index 335e703ddacd9..7a8aee0875dfc 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -2298,6 +2298,47 @@ public class Intent implements Parcelable, Cloneable { public static final String ACTION_REVIEW_ACCESSIBILITY_SERVICES = "android.intent.action.REVIEW_ACCESSIBILITY_SERVICES"; + /** + * Activity action: Launch UI to manage the usage of a given permission group. + * This action would be handled by apps that want to show controls about the features + * which use the permission group. + * + *

+ * Input: {@link #EXTRA_PERMISSION_GROUP_NAME} specifies the permission group for + * which the launched UI would be targeted. + * Input: {@link #EXTRA_ATTRIBUTION_TAGS} specifies the attribution tags for the usage entry. + * Input: {@link #EXTRA_START_TIME} specifies the start time of the period (epoch time in + * millis). If both start time and end time are present, start time must be <= end time. + * Input: {@link #EXTRA_END_TIME} specifies the end time of the period (epoch time in + * millis). If the end time is empty, that implies that the permission usage is still in use. + * If both start time and end time are present, start time must be <= end time. + * Input: {@link #EXTRA_SHOWING_ATTRIBUTION} specifies whether the subattribution was shown + * in the UI. + *

+ *

+ * Output: Nothing. + *

+ *

+ * You must protect the activity that handles this action with the + * {@link android.Manifest.permission#START_VIEW_PERMISSION_USAGE} permission to ensure that + * only the system can launch this activity. The system will not launch activities + * that are not properly protected. + *

+ * + * @see #EXTRA_PERMISSION_GROUP_NAME + * @see #EXTRA_ATTRIBUTION_TAGS + * @see #EXTRA_START_TIME + * @see #EXTRA_END_TIME + * @see #EXTRA_SHOWING_ATTRIBUTION + * + * @hide + */ + @SystemApi + @RequiresPermission(android.Manifest.permission.START_VIEW_PERMISSION_USAGE) + @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) + public static final String ACTION_MANAGE_PERMISSION_USAGE = + "android.intent.action.MANAGE_PERMISSION_USAGE"; + // --------------------------------------------------------------------- // --------------------------------------------------------------------- // Standard intent broadcast actions (see action variable).