summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorEvan Severson <evanseverson@google.com>2021-02-23 19:46:39 -0800
committerEvan Severson <evanseverson@google.com>2021-02-25 14:04:41 -0800
commitc5d33bfde248e27f66cb38ab323d5084da186db4 (patch)
treec249ea7bafed1fc1a5efc90e81a369577e82186b /core/java/android
parente2887a761b6ea0ed27f38564fbb61afdb4cc3c45 (diff)
Remove role exempt flag
There is no use for this currently. Bug: 158311343 Test: atest CtsPermission{1,3}TestCases Change-Id: I102b30ccb3354e248e4e6be304c6dfe6135ba2a6
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/content/pm/PackageManager.java35
-rw-r--r--core/java/android/permission/PermissionManager.java15
2 files changed, 2 insertions, 48 deletions
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index f9122b1f6c8b..3a35724d2c92 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -4060,16 +4060,6 @@ public abstract class PackageManager {
public static final int FLAG_PERMISSION_AUTO_REVOKED = 1 << 17;
/**
- * Permission flag: The permission is restricted but the app is exempt
- * from the restriction and is allowed to hold this permission in its
- * full form and the exemption is provided by the held roles.
- *
- * @hide
- */
- @SystemApi
- public static final int FLAG_PERMISSION_RESTRICTION_ROLE_EXEMPT = 1 << 18;
-
- /**
* Permission flag: This location permission is selected as the level of granularity of
* location accuracy.
* Example: If this flag is set for ACCESS_FINE_LOCATION, FINE location is the selected location
@@ -4098,8 +4088,7 @@ public abstract class PackageManager {
public static final int FLAGS_PERMISSION_RESTRICTION_ANY_EXEMPT =
FLAG_PERMISSION_RESTRICTION_INSTALLER_EXEMPT
| FLAG_PERMISSION_RESTRICTION_SYSTEM_EXEMPT
- | FLAG_PERMISSION_RESTRICTION_UPGRADE_EXEMPT
- | FLAG_PERMISSION_RESTRICTION_ROLE_EXEMPT;
+ | FLAG_PERMISSION_RESTRICTION_UPGRADE_EXEMPT;
/**
* Mask for all permission flags.
@@ -4184,20 +4173,11 @@ public abstract class PackageManager {
*/
public static final int FLAG_PERMISSION_WHITELIST_UPGRADE = 1 << 2;
- /**
- * Permission allowlist flag: permissions exempted by the system
- * when being granted a role.
- * Permissions can also be exempted by the installer, the system, or on
- * upgrade.
- */
- public static final int FLAG_PERMISSION_ALLOWLIST_ROLE = 1 << 3;
-
/** @hide */
@IntDef(flag = true, prefix = {"FLAG_PERMISSION_WHITELIST_"}, value = {
FLAG_PERMISSION_WHITELIST_SYSTEM,
FLAG_PERMISSION_WHITELIST_INSTALLER,
- FLAG_PERMISSION_WHITELIST_UPGRADE,
- FLAG_PERMISSION_ALLOWLIST_ROLE
+ FLAG_PERMISSION_WHITELIST_UPGRADE
})
@Retention(RetentionPolicy.SOURCE)
public @interface PermissionWhitelistFlags {}
@@ -5229,10 +5209,6 @@ public abstract class PackageManager {
* This list corresponds to the {@link #FLAG_PERMISSION_WHITELIST_INSTALLER} flag.
* Can be accessed by pre-installed holders of a dedicated permission or the
* installer on record.
- *
- * <li>one for cases where the system exempts the permission when granting a role.
- * This list corresponds to the {@link #FLAG_PERMISSION_ALLOWLIST_ROLE} flag. Can
- * be accessed by pre-installed holders of a dedicated permission.
* </ol>
*
* <p>
@@ -5251,7 +5227,6 @@ public abstract class PackageManager {
* @see #FLAG_PERMISSION_WHITELIST_SYSTEM
* @see #FLAG_PERMISSION_WHITELIST_UPGRADE
* @see #FLAG_PERMISSION_WHITELIST_INSTALLER
- * @see #FLAG_PERMISSION_ALLOWLIST_ROLE
*
* @throws SecurityException if you try to access a whitelist that you have no access to.
*/
@@ -5291,10 +5266,6 @@ public abstract class PackageManager {
* This list corresponds to the {@link #FLAG_PERMISSION_WHITELIST_INSTALLER} flag.
* Can be modified by pre-installed holders of a dedicated permission or the installer
* on record.
- *
- * <li>one for cases where the system exempts the permission when permission when
- * granting a role. This list corresponds to the {@link #FLAG_PERMISSION_ALLOWLIST_ROLE}
- * flag. Can be modified by pre-installed holders of a dedicated permission.
* </ol>
*
* <p>You need to specify the whitelists for which to set the whitelisted permissions
@@ -5318,7 +5289,6 @@ public abstract class PackageManager {
* @see #FLAG_PERMISSION_WHITELIST_SYSTEM
* @see #FLAG_PERMISSION_WHITELIST_UPGRADE
* @see #FLAG_PERMISSION_WHITELIST_INSTALLER
- * @see #FLAG_PERMISSION_ALLOWLIST_ROLE
*
* @throws SecurityException if you try to modify a whitelist that you have no access to.
*/
@@ -5388,7 +5358,6 @@ public abstract class PackageManager {
* @see #FLAG_PERMISSION_WHITELIST_SYSTEM
* @see #FLAG_PERMISSION_WHITELIST_UPGRADE
* @see #FLAG_PERMISSION_WHITELIST_INSTALLER
- * @see #FLAG_PERMISSION_ALLOWLIST_ROLE
*
* @throws SecurityException if you try to modify a whitelist that you have no access to.
*/
diff --git a/core/java/android/permission/PermissionManager.java b/core/java/android/permission/PermissionManager.java
index ff01011bd19b..bae36b299247 100644
--- a/core/java/android/permission/PermissionManager.java
+++ b/core/java/android/permission/PermissionManager.java
@@ -485,10 +485,6 @@ public final class PermissionManager {
* One for cases where the installer of the package allowlists a permission. This list
* corresponds to the {@link PackageManager#FLAG_PERMISSION_WHITELIST_INSTALLER} flag. Can be
* accessed by pre-installed holders of a dedicated permission or the installer on record.
- * <li>
- * One for cases where the system exempts the permission when granting a role. This list
- * corresponds to the {@link PackageManager#FLAG_PERMISSION_ALLOWLIST_ROLE} flag. Can be
- * accessed by pre-installed holders of a dedicated permission.
* </ol>
*
* @param packageName the app for which to get allowlisted permissions
@@ -502,7 +498,6 @@ public final class PermissionManager {
* @see PackageManager#FLAG_PERMISSION_WHITELIST_SYSTEM
* @see PackageManager#FLAG_PERMISSION_WHITELIST_UPGRADE
* @see PackageManager#FLAG_PERMISSION_WHITELIST_INSTALLER
- * @see PackageManager#FLAG_PERMISSION_ALLOWLIST_ROLE
*
* @hide Pending API
*/
@@ -549,10 +544,6 @@ public final class PermissionManager {
* One for cases where the installer of the package allowlists a permission. This list
* corresponds to the {@link PackageManager#FLAG_PERMISSION_WHITELIST_INSTALLER} flag. Can be
* accessed by pre-installed holders of a dedicated permission or the installer on record.
- * <li>
- * One for cases where the system exempts the permission when granting a role. This list
- * corresponds to the {@link PackageManager#FLAG_PERMISSION_ALLOWLIST_ROLE} flag. Can be
- * accessed by pre-installed holders of a dedicated permission.
* </ol>
* <p>
* You need to specify the allowlists for which to set the allowlisted permissions which will
@@ -570,7 +561,6 @@ public final class PermissionManager {
* @see PackageManager#FLAG_PERMISSION_WHITELIST_SYSTEM
* @see PackageManager#FLAG_PERMISSION_WHITELIST_UPGRADE
* @see PackageManager#FLAG_PERMISSION_WHITELIST_INSTALLER
- * @see PackageManager#FLAG_PERMISSION_ALLOWLIST_ROLE
*
* @hide Pending API
*/
@@ -613,10 +603,6 @@ public final class PermissionManager {
* One for cases where the installer of the package allowlists a permission. This list
* corresponds to the {@link PackageManager#FLAG_PERMISSION_WHITELIST_INSTALLER} flag. Can be
* accessed by pre-installed holders of a dedicated permission or the installer on record.
- * <li>
- * One for cases where the system exempts the permission when granting a role. This list
- * corresponds to the {@link PackageManager#FLAG_PERMISSION_ALLOWLIST_ROLE} flag. Can be
- * accessed by pre-installed holders of a dedicated permission.
* </ol>
* <p>
* You need to specify the allowlists for which to set the allowlisted permissions which will
@@ -634,7 +620,6 @@ public final class PermissionManager {
* @see PackageManager#FLAG_PERMISSION_WHITELIST_SYSTEM
* @see PackageManager#FLAG_PERMISSION_WHITELIST_UPGRADE
* @see PackageManager#FLAG_PERMISSION_WHITELIST_INSTALLER
- * @see PackageManager#FLAG_PERMISSION_ALLOWLIST_ROLE
*
* @hide Pending API
*/