diff options
Diffstat (limited to 'core/java/android/content/pm')
| -rw-r--r-- | core/java/android/content/pm/PermissionInfo.java | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/core/java/android/content/pm/PermissionInfo.java b/core/java/android/content/pm/PermissionInfo.java index 1857ecf..2828d83 100644 --- a/core/java/android/content/pm/PermissionInfo.java +++ b/core/java/android/content/pm/PermissionInfo.java @@ -48,17 +48,25 @@ public class PermissionInfo extends PackageItemInfo implements Parcelable { public static final int PROTECTION_SIGNATURE = 2; /** - * System-level value for {@link #protectionLevel}, corresponding - * to the <code>signatureOrSystem</code> value of - * {@link android.R.attr#protectionLevel}. + * @deprecated Use {@link #PROTECTION_SIGNATURE}|{@link #PROTECTION_FLAG_PRIVILEGED} + * instead. */ + @Deprecated public static final int PROTECTION_SIGNATURE_OR_SYSTEM = 3; /** * Additional flag for {@link #protectionLevel}, corresponding - * to the <code>system</code> value of + * to the <code>privileged</code> value of * {@link android.R.attr#protectionLevel}. */ + public static final int PROTECTION_FLAG_PRIVILEGED = 0x10; + + /** + * @deprecated Old name for {@link #PROTECTION_FLAG_PRIVILEGED}, which + * is now very confusing because it only applies to privileged apps, not all + * apps on the system image. + */ + @Deprecated public static final int PROTECTION_FLAG_SYSTEM = 0x10; /** @@ -97,6 +105,13 @@ public class PermissionInfo extends PackageItemInfo implements Parcelable { public static final int PROTECTION_FLAG_VERIFIER = 0x200; /** + * Additional flag for {@link #protectionLevel}, corresponding + * to the <code>preinstalled</code> value of + * {@link android.R.attr#protectionLevel}. + */ + public static final int PROTECTION_FLAG_PREINSTALLED = 0x400; + + /** * Mask for {@link #protectionLevel}: the basic protection type. */ public static final int PROTECTION_MASK_BASE = 0xf; @@ -161,7 +176,7 @@ public class PermissionInfo extends PackageItemInfo implements Parcelable { /** @hide */ public static int fixProtectionLevel(int level) { if (level == PROTECTION_SIGNATURE_OR_SYSTEM) { - level = PROTECTION_SIGNATURE | PROTECTION_FLAG_SYSTEM; + level = PROTECTION_SIGNATURE | PROTECTION_FLAG_PRIVILEGED; } return level; } @@ -183,8 +198,8 @@ public class PermissionInfo extends PackageItemInfo implements Parcelable { protLevel = "signatureOrSystem"; break; } - if ((level&PermissionInfo.PROTECTION_FLAG_SYSTEM) != 0) { - protLevel += "|system"; + if ((level&PermissionInfo.PROTECTION_FLAG_PRIVILEGED) != 0) { + protLevel += "|privileged"; } if ((level&PermissionInfo.PROTECTION_FLAG_DEVELOPMENT) != 0) { protLevel += "|development"; |
