diff options
| author | Guojing Yuan <guojing@google.com> | 2021-03-30 16:55:09 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-03-30 16:55:09 +0000 |
| commit | bb12e2257ddaebbb0f756a40491db3de217701d6 (patch) | |
| tree | adf2222365a542736794b9867bd0cfb841a5e2bc /core/java/android | |
| parent | 8ec8ca25386b1512d6623b6166c0c3c5b9437447 (diff) | |
| parent | 6f95b3626fa02b5bb618749c229dd42713dac44c (diff) | |
Merge "Add Intent.ACTION_VIEW_PERMISSION_USAGE_FOR_PERIOD for privacy hub" into sc-dev
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/content/Intent.java | 64 |
1 files changed, 64 insertions, 0 deletions
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}. * |
