From c064bc738fe1877450e9c2cf1d637c1481a06a57 Mon Sep 17 00:00:00 2001 From: Yi-an Chen Date: Fri, 12 Mar 2021 20:06:32 +0000 Subject: [PATCH] Add the intent for showing permission history Bug: 176902658 Test: Manually tested with Sargo DVT Change-Id: I43f8c29c6b7c696c37c8bf7af5ddc710b9230c08 --- core/api/system-current.txt | 1 + core/java/android/content/Intent.java | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/core/api/system-current.txt b/core/api/system-current.txt index b0b2c6cdf0f71..8b763a3c5f0b7 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -2238,6 +2238,7 @@ package android.content { field @RequiresPermission(android.Manifest.permission.REVIEW_ACCESSIBILITY_SERVICES) public static final String ACTION_REVIEW_ACCESSIBILITY_SERVICES = "android.intent.action.REVIEW_ACCESSIBILITY_SERVICES"; field @RequiresPermission(android.Manifest.permission.GRANT_RUNTIME_PERMISSIONS) public static final String ACTION_REVIEW_ONGOING_PERMISSION_USAGE = "android.intent.action.REVIEW_ONGOING_PERMISSION_USAGE"; field public static final String ACTION_REVIEW_PERMISSIONS = "android.intent.action.REVIEW_PERMISSIONS"; + field @RequiresPermission(android.Manifest.permission.GRANT_RUNTIME_PERMISSIONS) public static final String ACTION_REVIEW_PERMISSION_HISTORY = "android.intent.action.REVIEW_PERMISSION_HISTORY"; field @RequiresPermission(android.Manifest.permission.GRANT_RUNTIME_PERMISSIONS) public static final String ACTION_REVIEW_PERMISSION_USAGE = "android.intent.action.REVIEW_PERMISSION_USAGE"; field public static final String ACTION_ROLLBACK_COMMITTED = "android.intent.action.ROLLBACK_COMMITTED"; field public static final String ACTION_SHOW_SUSPENDED_APP_DETAILS = "android.intent.action.SHOW_SUSPENDED_APP_DETAILS"; diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index de17fda82d710..ed10979e30f8a 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -2171,6 +2171,29 @@ public class Intent implements Parcelable, Cloneable { public static final String ACTION_REVIEW_PERMISSION_USAGE = "android.intent.action.REVIEW_PERMISSION_USAGE"; + /** + * Activity action: Launch UI to review the timeline history of permissions. + *

+ * Input: {@link #EXTRA_PERMISSION_GROUP_NAME} specifies the permission group name + * that will be displayed by the launched UI. + *

+ *

+ * Output: Nothing. + *

+ *

+ * This requires {@link android.Manifest.permission#GRANT_RUNTIME_PERMISSIONS} permission. + *

+ * + * @see #EXTRA_PERMISSION_GROUP_NAME + * + * @hide + */ + @SystemApi + @RequiresPermission(android.Manifest.permission.GRANT_RUNTIME_PERMISSIONS) + @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) + public static final String ACTION_REVIEW_PERMISSION_HISTORY = + "android.intent.action.REVIEW_PERMISSION_HISTORY"; + /** * Activity action: Launch UI to review ongoing app uses of permissions. *