diff options
| author | Dianne Hackborn <hackbod@google.com> | 2015-07-21 16:57:51 -0700 |
|---|---|---|
| committer | Dianne Hackborn <hackbod@google.com> | 2015-07-21 17:01:15 -0700 |
| commit | cfbfafe1b9ca2fd135a4fb6b528b3829830803bf (patch) | |
| tree | 7e482505909554ef6cc3367060628f71a061dfa1 /core/java/android | |
| parent | 673ccfd45a81482d97eecf76dc0fef0dfd57be73 (diff) | |
Work on issue #22303510: Additional permissions aren't properly...
...disabled after toggling them off
Keep track of whether a permission that has been declared by an app
was able to actually be installed in the system, along with an API
to find this information so that system UI can tell whether that
permission is of interest.
Also clean up some of the permission debug output.
Change-Id: If4541bedb857789b255bb18f03cad155dcda0b95
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/content/pm/PermissionInfo.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/core/java/android/content/pm/PermissionInfo.java b/core/java/android/content/pm/PermissionInfo.java index 2828d83bcdae..d51451340690 100644 --- a/core/java/android/content/pm/PermissionInfo.java +++ b/core/java/android/content/pm/PermissionInfo.java @@ -145,12 +145,10 @@ public class PermissionInfo extends PackageItemInfo implements Parcelable { public static final int FLAG_COSTS_MONEY = 1<<0; /** - * Flag for {@link #protectionLevel}, corresponding - * to the <code>hide</code> value of - * {@link android.R.attr#permissionFlags}. - * @hide + * Flag for {@link #flags}, indicating that this permission has been + * installed into the system's globally defined permissions. */ - public static final int PROTECTION_FLAG_HIDE = 1<<1; + public static final int FLAG_INSTALLED = 1<<30; /** * Additional flags about this permission as given by @@ -210,6 +208,15 @@ public class PermissionInfo extends PackageItemInfo implements Parcelable { if ((level&PermissionInfo.PROTECTION_FLAG_PRE23) != 0) { protLevel += "|pre23"; } + if ((level&PermissionInfo.PROTECTION_FLAG_INSTALLER) != 0) { + protLevel += "|installer"; + } + if ((level&PermissionInfo.PROTECTION_FLAG_VERIFIER) != 0) { + protLevel += "|verifier"; + } + if ((level&PermissionInfo.PROTECTION_FLAG_PREINSTALLED) != 0) { + protLevel += "|preinstalled"; + } return protLevel; } |
