summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/java/android/content/pm/PermissionInfo.java16
-rw-r--r--core/res/AndroidManifest.xml10
-rw-r--r--core/res/res/values/attrs_manifest.xml6
3 files changed, 26 insertions, 6 deletions
diff --git a/core/java/android/content/pm/PermissionInfo.java b/core/java/android/content/pm/PermissionInfo.java
index 0a1f148..1857ecf 100644
--- a/core/java/android/content/pm/PermissionInfo.java
+++ b/core/java/android/content/pm/PermissionInfo.java
@@ -83,6 +83,20 @@ public class PermissionInfo extends PackageItemInfo implements Parcelable {
public static final int PROTECTION_FLAG_PRE23 = 0x80;
/**
+ * Additional flag for {@link #protectionLevel}, corresponding
+ * to the <code>installer</code> value of
+ * {@link android.R.attr#protectionLevel}.
+ */
+ public static final int PROTECTION_FLAG_INSTALLER = 0x100;
+
+ /**
+ * Additional flag for {@link #protectionLevel}, corresponding
+ * to the <code>verifier</code> value of
+ * {@link android.R.attr#protectionLevel}.
+ */
+ public static final int PROTECTION_FLAG_VERIFIER = 0x200;
+
+ /**
* Mask for {@link #protectionLevel}: the basic protection type.
*/
public static final int PROTECTION_MASK_BASE = 0xf;
@@ -90,7 +104,7 @@ public class PermissionInfo extends PackageItemInfo implements Parcelable {
/**
* Mask for {@link #protectionLevel}: additional flag bits.
*/
- public static final int PROTECTION_MASK_FLAGS = 0xf0;
+ public static final int PROTECTION_MASK_FLAGS = 0xff0;
/**
* The level of access this permission is protecting, as per
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 8c868c9..e18e44c 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -1327,7 +1327,7 @@
that removes restrictions on where broadcasts can be sent and allows other
types of interactions. -->
<permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature|installer" />
<!-- @SystemApi @hide Allows an application to call APIs that allow it to query and manage
users on the device. This permission is not available to
@@ -1769,7 +1769,7 @@
<!-- @SystemApi Allows an application to update application operation statistics. Not for
use by third party apps. @hide -->
<permission android:name="android.permission.UPDATE_APP_OPS_STATS"
- android:protectionLevel="signature|system" />
+ android:protectionLevel="signature|system|installer" />
<!-- @SystemApi Allows an application to open windows that are for use by parts
of the system user interface.
@@ -2016,7 +2016,7 @@
@hide
-->
<permission android:name="android.permission.CLEAR_APP_USER_DATA"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature|installer" />
<!-- @SystemApi Allows an application to delete cache files.
<p>Not for use by third-party applications. -->
@@ -2041,7 +2041,7 @@
<!-- @hide Allows an application to grant or revoke specific permissions. -->
<permission android:name="android.permission.GRANT_REVOKE_PERMISSIONS"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature|installer" />
<!-- @hide Allows an application to observe permission changes. -->
<permission android:name="android.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS"
@@ -2552,7 +2552,7 @@
<p>Not for use by third-party applications.
@hide -->
<permission android:name="android.permission.KILL_UID"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature|installer" />
<!-- Allows applications to act as network scorers. @hide @SystemApi-->
<permission android:name="android.permission.LOCAL_MAC_ADDRESS"
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index 70f9db9..c501329 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -220,6 +220,12 @@
{@link android.os.Build.VERSION_CODES#MNC} (before runtime permissions
were introduced). -->
<flag name="pre23" value="0x80" />
+ <!-- Additional flag from base permission type: this permission can be automatically
+ granted to system apps that install packages. -->
+ <flag name="installer" value="0x100" />
+ <!-- Additional flag from base permission type: this permission can be automatically
+ granted to system apps that verify packages. -->
+ <flag name="verifier" value="0x200" />
</attr>
<!-- Flags indicating more context for a permission group. -->