summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/api/system-current.txt4
-rw-r--r--core/java/android/content/Intent.java64
2 files changed, 68 insertions, 0 deletions
diff --git a/core/api/system-current.txt b/core/api/system-current.txt
index 2094e981f68e..55816df3fe4e 100644
--- a/core/api/system-current.txt
+++ b/core/api/system-current.txt
@@ -2325,9 +2325,12 @@ package android.content {
field public static final String ACTION_UPGRADE_SETUP = "android.intent.action.UPGRADE_SETUP";
field public static final String ACTION_USER_ADDED = "android.intent.action.USER_ADDED";
field public static final String ACTION_USER_REMOVED = "android.intent.action.USER_REMOVED";
+ field @RequiresPermission(android.Manifest.permission.START_VIEW_PERMISSION_USAGE) public static final String ACTION_VIEW_PERMISSION_USAGE_FOR_PERIOD = "android.intent.action.VIEW_PERMISSION_USAGE_FOR_PERIOD";
field public static final String ACTION_VOICE_ASSIST = "android.intent.action.VOICE_ASSIST";
field public static final String CATEGORY_LEANBACK_SETTINGS = "android.intent.category.LEANBACK_SETTINGS";
+ field public static final String EXTRA_ATTRIBUTION_TAGS = "android.intent.extra.ATTRIBUTION_TAGS";
field public static final String EXTRA_CALLING_PACKAGE = "android.intent.extra.CALLING_PACKAGE";
+ field public static final String EXTRA_END_TIME = "android.intent.extra.END_TIME";
field public static final String EXTRA_FORCE_FACTORY_RESET = "android.intent.extra.FORCE_FACTORY_RESET";
field public static final String EXTRA_INSTANT_APP_ACTION = "android.intent.extra.INSTANT_APP_ACTION";
field public static final String EXTRA_INSTANT_APP_BUNDLES = "android.intent.extra.INSTANT_APP_BUNDLES";
@@ -2346,6 +2349,7 @@ package android.content {
field public static final String EXTRA_REMOTE_CALLBACK = "android.intent.extra.REMOTE_CALLBACK";
field public static final String EXTRA_RESULT_NEEDED = "android.intent.extra.RESULT_NEEDED";
field public static final String EXTRA_ROLE_NAME = "android.intent.extra.ROLE_NAME";
+ field public static final String EXTRA_START_TIME = "android.intent.extra.START_TIME";
field public static final String EXTRA_UNKNOWN_INSTANT_APP = "android.intent.extra.UNKNOWN_INSTANT_APP";
field public static final String EXTRA_VERIFICATION_BUNDLE = "android.intent.extra.VERIFICATION_BUNDLE";
field public static final int FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT = 67108864; // 0x4000000
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 96b8fbe293f5..2c77372d6345 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -1979,6 +1979,43 @@ public class Intent implements Parcelable, Cloneable {
"android.intent.action.VIEW_PERMISSION_USAGE";
/**
+ * Activity action: Launch UI to show information about the usage of a given permission group in
+ * a given period. This action would be handled by apps that want to show details about how and
+ * why given permission group is being used.
+ * <p>
+ * <strong>Important:</strong>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.
+ *
+ * <p>
+ * Input: {@link #EXTRA_PERMISSION_GROUP_NAME} specifies the permission group for which the
+ * launched UI would be targeted.
+ * </p>
+ * <p>
+ * Input: {@link #EXTRA_ATTRIBUTION_TAGS} specifies the attribution tags for the usage entry.
+ * </p>
+ * <p>
+ * Input: {@link #EXTRA_START_TIME} specifies the start time of the period. Both start time and
+ * end time are needed and start time must be <= end time.
+ * </p>
+ * <p>
+ * Input: {@link #EXTRA_END_TIME} specifies the end time of the period. Both start time and end
+ * time are needed and start time must be <= end time.
+ * </p>
+ * <p>
+ * Output: Nothing.
+ * </p>
+ *
+ * @hide
+ */
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ @RequiresPermission(android.Manifest.permission.START_VIEW_PERMISSION_USAGE)
+ @SystemApi
+ public static final String ACTION_VIEW_PERMISSION_USAGE_FOR_PERIOD =
+ "android.intent.action.VIEW_PERMISSION_USAGE_FOR_PERIOD";
+
+ /**
* Activity action: Launch UI to manage a default app.
* <p>
* Input: {@link #EXTRA_ROLE_NAME} specifies the role of the default app which will be managed
@@ -5336,6 +5373,33 @@ public class Intent implements Parcelable, Cloneable {
public static final String EXTRA_TASK_ID = "android.intent.extra.TASK_ID";
/**
+ * A String[] holding attribution tags when used with
+ * {@link #ACTION_VIEW_PERMISSION_USAGE_FOR_PERIOD}
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final String EXTRA_ATTRIBUTION_TAGS = "android.intent.extra.ATTRIBUTION_TAGS";
+
+ /**
+ * A long representing the start timestamp (in millis) of the permission usage when used with
+ * {@link #ACTION_VIEW_PERMISSION_USAGE_FOR_PERIOD}
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final String EXTRA_START_TIME = "android.intent.extra.START_TIME";
+
+ /**
+ * A long representing the end timestamp (in millis) of the permission usage when used with
+ * {@link #ACTION_VIEW_PERMISSION_USAGE_FOR_PERIOD}
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final String EXTRA_END_TIME = "android.intent.extra.END_TIME";
+
+ /**
* An Intent[] describing additional, alternate choices you would like shown with
* {@link #ACTION_CHOOSER}.
*