Merge "Intent action to review permission decisions"

This commit is contained in:
Jordan Jozwiak
2022-01-05 17:25:01 +00:00
committed by Android (Google) Code Review
4 changed files with 39 additions and 0 deletions

View File

@@ -298,6 +298,7 @@ package android {
field public static final String SIGNAL_REBOOT_READINESS = "android.permission.SIGNAL_REBOOT_READINESS";
field public static final String SOUND_TRIGGER_RUN_IN_BATTERY_SAVER = "android.permission.SOUND_TRIGGER_RUN_IN_BATTERY_SAVER";
field public static final String START_ACTIVITIES_FROM_BACKGROUND = "android.permission.START_ACTIVITIES_FROM_BACKGROUND";
field public static final String START_REVIEW_PERMISSION_DECISIONS = "android.permission.START_REVIEW_PERMISSION_DECISIONS";
field public static final String STATUS_BAR_SERVICE = "android.permission.STATUS_BAR_SERVICE";
field public static final String STOP_APP_SWITCHES = "android.permission.STOP_APP_SWITCHES";
field public static final String SUBSTITUTE_NOTIFICATION_APP_NAME = "android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME";
@@ -9579,6 +9580,7 @@ package android.permission {
method @RequiresPermission(anyOf={android.Manifest.permission.ADJUST_RUNTIME_PERMISSIONS_POLICY, android.Manifest.permission.UPGRADE_RUNTIME_PERMISSIONS}) public void setRuntimePermissionsVersion(@IntRange(from=0) int);
method @RequiresPermission(android.Manifest.permission.MANAGE_ONE_TIME_PERMISSION_SESSIONS) public void startOneTimePermissionSession(@NonNull String, long, int, int);
method @RequiresPermission(android.Manifest.permission.MANAGE_ONE_TIME_PERMISSION_SESSIONS) public void stopOneTimePermissionSession(@NonNull String);
field @RequiresPermission(android.Manifest.permission.START_REVIEW_PERMISSION_DECISIONS) public static final String ACTION_REVIEW_PERMISSION_DECISIONS = "android.permission.action.REVIEW_PERMISSION_DECISIONS";
field public static final int PERMISSION_GRANTED = 0; // 0x0
field public static final int PERMISSION_HARD_DENIED = 2; // 0x2
field public static final int PERMISSION_SOFT_DENIED = 1; // 0x1

View File

@@ -24,6 +24,8 @@ import android.annotation.IntRange;
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;
import android.annotation.SystemService;
import android.annotation.TestApi;
@@ -101,6 +103,26 @@ public final class PermissionManager {
*/
public static final int PERMISSION_HARD_DENIED = 2;
/**
* Activity action: Launch UI to review permission decisions.
* <p>
* <strong>Important:</strong>You must protect the activity that handles this action with the
* {@link android.Manifest.permission#START_REVIEW_PERMISSION_DECISIONS} permission to ensure
* that only the system can launch this activity. The system will not launch activities that are
* not properly protected.
* <p>
* Input: Nothing.
* </p>
* <p>
* Output: Nothing.
* </p>
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
@RequiresPermission(android.Manifest.permission.START_REVIEW_PERMISSION_DECISIONS)
public static final String ACTION_REVIEW_PERMISSION_DECISIONS =
"android.permission.action.REVIEW_PERMISSION_DECISIONS";
/** @hide */
public static final String LOG_TAG_TRACE_GRANTS = "PermissionGrantTrace";

View File

@@ -5478,6 +5478,16 @@
android:description="@string/permdesc_startViewPermissionUsage"
android:protectionLevel="signature|installer" />
<!--
@SystemApi
Allows the holder to start the screen to review permission decisions.
<p>Protection level: signature|installer
@hide -->
<permission android:name="android.permission.START_REVIEW_PERMISSION_DECISIONS"
android:label="@string/permlab_startReviewPermissionDecisions"
android:description="@string/permdesc_startReviewPermissionDecisions"
android:protectionLevel="signature|installer" />
<!--
Allows the holder to start the screen with a list of app features.
<p>Protection level: signature|installer

View File

@@ -2011,6 +2011,11 @@
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permdesc_startViewPermissionUsage">Allows the holder to start the permission usage for an app. Should never be needed for normal apps.</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR_LIMIT=NONE] -->
<string name="permlab_startReviewPermissionDecisions">start view permission decisions</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR_LIMIT=NONE] -->
<string name="permdesc_startReviewPermissionDecisions">Allows the holder to start screen to review permission decisions. Should never be needed for normal apps.</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR_LIMIT=NONE] -->
<string name="permlab_startViewAppFeatures">start view app features</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR_LIMIT=NONE] -->