Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f95b362 authored by Guojing Yuan's avatar Guojing Yuan
Browse files

Add Intent.ACTION_VIEW_PERMISSION_USAGE_FOR_PERIOD for privacy hub

BUG: 176902658

Test: N/A
Change-Id: I81cb4c186b2e283e878bc73d4a27af85408ce5eb
parent 522bb3d9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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
+64 −0
Original line number Diff line number Diff line
@@ -1978,6 +1978,43 @@ public class Intent implements Parcelable, Cloneable {
    public static final String ACTION_VIEW_PERMISSION_USAGE =
            "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>
@@ -5335,6 +5372,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}.