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

Commit 78ec58d2 authored by Joel Galenson's avatar Joel Galenson
Browse files

Add an intent to launch the app permission usage screen.

Bug: 63532550
Test: Launched the new screen with this intent.
Change-Id: I0b690b742ad4e89fcbd6e613675f5e08ed3dc644
parent 8c12dcd1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -987,6 +987,7 @@ package android.content {
    field public static final java.lang.String ACTION_PRE_BOOT_COMPLETED = "android.intent.action.PRE_BOOT_COMPLETED";
    field public static final java.lang.String ACTION_QUERY_PACKAGE_RESTART = "android.intent.action.QUERY_PACKAGE_RESTART";
    field public static final java.lang.String ACTION_RESOLVE_INSTANT_APP_PACKAGE = "android.intent.action.RESOLVE_INSTANT_APP_PACKAGE";
    field public static final java.lang.String ACTION_REVIEW_APP_PERMISSION_USAGE = "android.intent.action.REVIEW_APP_PERMISSION_USAGE";
    field public static final java.lang.String ACTION_REVIEW_PERMISSIONS = "android.intent.action.REVIEW_PERMISSIONS";
    field public static final java.lang.String ACTION_REVIEW_PERMISSION_USAGE = "android.intent.action.REVIEW_PERMISSION_USAGE";
    field public static final java.lang.String ACTION_SHOW_SUSPENDED_APP_DETAILS = "android.intent.action.SHOW_SUSPENDED_APP_DETAILS";
+24 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.annotation.BroadcastBehavior;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SystemApi;
@@ -1924,6 +1925,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 uses of permissions for a single app.
     * <p>
     * Input: {@link #EXTRA_PACKAGE_NAME} specifies the package whose
     * permissions will be reviewed (mandatory).
     * </p>
     * <p>
     * Output: Nothing.
     * </p>
     * <p class="note">
     * This requires {@link android.Manifest.permission#GRANT_RUNTIME_PERMISSIONS} permission.
     * </p>
     *
     * @see #EXTRA_PACKAGE_NAME
     *
     * @hide
     */
    @SystemApi
    @RequiresPermission(android.Manifest.permission.GRANT_RUNTIME_PERMISSIONS)
    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
    public static final String ACTION_REVIEW_APP_PERMISSION_USAGE =
            "android.intent.action.REVIEW_APP_PERMISSION_USAGE";

    // ---------------------------------------------------------------------
    // ---------------------------------------------------------------------
    // Standard intent broadcast actions (see action variable).