am c55c4a28: am b14dc048: Merge "Add new "preinstalled" permission flag." into mnc-dev

* commit 'c55c4a289c6f2ee5c1436af274b9e5eeaf1566f8':
  Add new "preinstalled" permission flag.
This commit is contained in:
Dianne Hackborn
2015-07-08 01:30:01 +00:00
committed by Android Git Automerger
6 changed files with 191 additions and 158 deletions

View File

@@ -9443,13 +9443,15 @@ package android.content.pm {
field public static final int PROTECTION_FLAG_DEVELOPMENT = 32; // 0x20 field public static final int PROTECTION_FLAG_DEVELOPMENT = 32; // 0x20
field public static final int PROTECTION_FLAG_INSTALLER = 256; // 0x100 field public static final int PROTECTION_FLAG_INSTALLER = 256; // 0x100
field public static final int PROTECTION_FLAG_PRE23 = 128; // 0x80 field public static final int PROTECTION_FLAG_PRE23 = 128; // 0x80
field public static final int PROTECTION_FLAG_SYSTEM = 16; // 0x10 field public static final int PROTECTION_FLAG_PREINSTALLED = 1024; // 0x400
field public static final int PROTECTION_FLAG_PRIVILEGED = 16; // 0x10
field public static final deprecated int PROTECTION_FLAG_SYSTEM = 16; // 0x10
field public static final int PROTECTION_FLAG_VERIFIER = 512; // 0x200 field public static final int PROTECTION_FLAG_VERIFIER = 512; // 0x200
field public static final int PROTECTION_MASK_BASE = 15; // 0xf field public static final int PROTECTION_MASK_BASE = 15; // 0xf
field public static final int PROTECTION_MASK_FLAGS = 4080; // 0xff0 field public static final int PROTECTION_MASK_FLAGS = 4080; // 0xff0
field public static final int PROTECTION_NORMAL = 0; // 0x0 field public static final int PROTECTION_NORMAL = 0; // 0x0
field public static final int PROTECTION_SIGNATURE = 2; // 0x2 field public static final int PROTECTION_SIGNATURE = 2; // 0x2
field public static final int PROTECTION_SIGNATURE_OR_SYSTEM = 3; // 0x3 field public static final deprecated int PROTECTION_SIGNATURE_OR_SYSTEM = 3; // 0x3
field public int descriptionRes; field public int descriptionRes;
field public int flags; field public int flags;
field public java.lang.String group; field public java.lang.String group;

View File

@@ -9778,13 +9778,15 @@ package android.content.pm {
field public static final int PROTECTION_FLAG_DEVELOPMENT = 32; // 0x20 field public static final int PROTECTION_FLAG_DEVELOPMENT = 32; // 0x20
field public static final int PROTECTION_FLAG_INSTALLER = 256; // 0x100 field public static final int PROTECTION_FLAG_INSTALLER = 256; // 0x100
field public static final int PROTECTION_FLAG_PRE23 = 128; // 0x80 field public static final int PROTECTION_FLAG_PRE23 = 128; // 0x80
field public static final int PROTECTION_FLAG_SYSTEM = 16; // 0x10 field public static final int PROTECTION_FLAG_PREINSTALLED = 1024; // 0x400
field public static final int PROTECTION_FLAG_PRIVILEGED = 16; // 0x10
field public static final deprecated int PROTECTION_FLAG_SYSTEM = 16; // 0x10
field public static final int PROTECTION_FLAG_VERIFIER = 512; // 0x200 field public static final int PROTECTION_FLAG_VERIFIER = 512; // 0x200
field public static final int PROTECTION_MASK_BASE = 15; // 0xf field public static final int PROTECTION_MASK_BASE = 15; // 0xf
field public static final int PROTECTION_MASK_FLAGS = 4080; // 0xff0 field public static final int PROTECTION_MASK_FLAGS = 4080; // 0xff0
field public static final int PROTECTION_NORMAL = 0; // 0x0 field public static final int PROTECTION_NORMAL = 0; // 0x0
field public static final int PROTECTION_SIGNATURE = 2; // 0x2 field public static final int PROTECTION_SIGNATURE = 2; // 0x2
field public static final int PROTECTION_SIGNATURE_OR_SYSTEM = 3; // 0x3 field public static final deprecated int PROTECTION_SIGNATURE_OR_SYSTEM = 3; // 0x3
field public int descriptionRes; field public int descriptionRes;
field public int flags; field public int flags;
field public java.lang.String group; field public java.lang.String group;

View File

@@ -48,17 +48,25 @@ public class PermissionInfo extends PackageItemInfo implements Parcelable {
public static final int PROTECTION_SIGNATURE = 2; public static final int PROTECTION_SIGNATURE = 2;
/** /**
* System-level value for {@link #protectionLevel}, corresponding * @deprecated Use {@link #PROTECTION_SIGNATURE}|{@link #PROTECTION_FLAG_PRIVILEGED}
* to the <code>signatureOrSystem</code> value of * instead.
* {@link android.R.attr#protectionLevel}.
*/ */
@Deprecated
public static final int PROTECTION_SIGNATURE_OR_SYSTEM = 3; public static final int PROTECTION_SIGNATURE_OR_SYSTEM = 3;
/** /**
* Additional flag for {@link #protectionLevel}, corresponding * 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}. * {@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; public static final int PROTECTION_FLAG_SYSTEM = 0x10;
/** /**
@@ -96,6 +104,13 @@ public class PermissionInfo extends PackageItemInfo implements Parcelable {
*/ */
public static final int PROTECTION_FLAG_VERIFIER = 0x200; 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. * Mask for {@link #protectionLevel}: the basic protection type.
*/ */
@@ -161,7 +176,7 @@ public class PermissionInfo extends PackageItemInfo implements Parcelable {
/** @hide */ /** @hide */
public static int fixProtectionLevel(int level) { public static int fixProtectionLevel(int level) {
if (level == PROTECTION_SIGNATURE_OR_SYSTEM) { if (level == PROTECTION_SIGNATURE_OR_SYSTEM) {
level = PROTECTION_SIGNATURE | PROTECTION_FLAG_SYSTEM; level = PROTECTION_SIGNATURE | PROTECTION_FLAG_PRIVILEGED;
} }
return level; return level;
} }
@@ -183,8 +198,8 @@ public class PermissionInfo extends PackageItemInfo implements Parcelable {
protLevel = "signatureOrSystem"; protLevel = "signatureOrSystem";
break; break;
} }
if ((level&PermissionInfo.PROTECTION_FLAG_SYSTEM) != 0) { if ((level&PermissionInfo.PROTECTION_FLAG_PRIVILEGED) != 0) {
protLevel += "|system"; protLevel += "|privileged";
} }
if ((level&PermissionInfo.PROTECTION_FLAG_DEVELOPMENT) != 0) { if ((level&PermissionInfo.PROTECTION_FLAG_DEVELOPMENT) != 0) {
protLevel += "|development"; protLevel += "|development";

View File

@@ -785,31 +785,31 @@
to handle the respond-via-message action during incoming calls. to handle the respond-via-message action during incoming calls.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.SEND_RESPOND_VIA_MESSAGE" <permission android:name="android.permission.SEND_RESPOND_VIA_MESSAGE"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Allows an application to filter carrier specific sms. <!-- Allows an application to filter carrier specific sms.
@hide --> @hide -->
<permission android:name="android.permission.CARRIER_FILTER_SMS" <permission android:name="android.permission.CARRIER_FILTER_SMS"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to receive emergency cell broadcast messages, <!-- @SystemApi Allows an application to receive emergency cell broadcast messages,
to record or display them to the user. to record or display them to the user.
<p>Not for use by third-party applications. <p>Not for use by third-party applications.
@hide Pending API council approval --> @hide Pending API council approval -->
<permission android:name="android.permission.RECEIVE_EMERGENCY_BROADCAST" <permission android:name="android.permission.RECEIVE_EMERGENCY_BROADCAST"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Allows an application to monitor incoming Bluetooth MAP messages, to record <!-- Allows an application to monitor incoming Bluetooth MAP messages, to record
or perform processing on them. --> or perform processing on them. -->
<!-- @hide --> <!-- @hide -->
<permission android:name="android.permission.RECEIVE_BLUETOOTH_MAP" <permission android:name="android.permission.RECEIVE_BLUETOOTH_MAP"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi @hide Allows an application to execute contacts directory search. <!-- @SystemApi @hide Allows an application to execute contacts directory search.
This should only be used by ContactsProvider. This should only be used by ContactsProvider.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.BIND_DIRECTORY_SEARCH" <permission android:name="android.permission.BIND_DIRECTORY_SEARCH"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- =============================================================== --> <!-- =============================================================== -->
<!-- Permissions for setting the device alarm --> <!-- Permissions for setting the device alarm -->
@@ -857,19 +857,19 @@
<!-- @SystemApi Allows an application to install a location provider into the Location Manager. <!-- @SystemApi Allows an application to install a location provider into the Location Manager.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.INSTALL_LOCATION_PROVIDER" <permission android:name="android.permission.INSTALL_LOCATION_PROVIDER"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi @hide Allows HDMI-CEC service to access device and configuration files. <!-- @SystemApi @hide Allows HDMI-CEC service to access device and configuration files.
This should only be used by HDMI-CEC service. This should only be used by HDMI-CEC service.
--> -->
<permission android:name="android.permission.HDMI_CEC" <permission android:name="android.permission.HDMI_CEC"
android:protectionLevel="signatureOrSystem" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to use location features in hardware, <!-- @SystemApi Allows an application to use location features in hardware,
such as the geofencing api. such as the geofencing api.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.LOCATION_HARDWARE" <permission android:name="android.permission.LOCATION_HARDWARE"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<uses-permission android:name="android.permission.LOCATION_HARDWARE"/> <uses-permission android:name="android.permission.LOCATION_HARDWARE"/>
<!-- @SystemApi Allows an application to create mock location providers for testing. <!-- @SystemApi Allows an application to create mock location providers for testing.
@@ -919,20 +919,20 @@
<!-- @SystemApi @hide Allows applications to read Wi-Fi credential. <!-- @SystemApi @hide Allows applications to read Wi-Fi credential.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.READ_WIFI_CREDENTIAL" <permission android:name="android.permission.READ_WIFI_CREDENTIAL"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi @hide Allow system apps to receive broadcast <!-- @SystemApi @hide Allow system apps to receive broadcast
when a wifi network credential is changed. when a wifi network credential is changed.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.RECEIVE_WIFI_CREDENTIAL_CHANGE" <permission android:name="android.permission.RECEIVE_WIFI_CREDENTIAL_CHANGE"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi @hide Allows an application to modify any wifi configuration, even if created <!-- @SystemApi @hide Allows an application to modify any wifi configuration, even if created
by another application. Once reconfigured the original creator cannot make any further by another application. Once reconfigured the original creator cannot make any further
modifications. modifications.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.OVERRIDE_WIFI_CONFIG" <permission android:name="android.permission.OVERRIDE_WIFI_CONFIG"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @hide --> <!-- @hide -->
<permission android:name="android.permission.ACCESS_WIMAX_STATE" <permission android:name="android.permission.ACCESS_WIMAX_STATE"
@@ -950,7 +950,7 @@
@hide @hide
--> -->
<permission android:name="android.permission.SCORE_NETWORKS" <permission android:name="android.permission.SCORE_NETWORKS"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- ======================================= --> <!-- ======================================= -->
<!-- Permissions for short range, peripheral networks --> <!-- Permissions for short range, peripheral networks -->
@@ -1002,22 +1002,22 @@
<!-- @SystemApi Allows an internal user to use privileged ConnectivityManager APIs. <!-- @SystemApi Allows an internal user to use privileged ConnectivityManager APIs.
@hide --> @hide -->
<permission android:name="android.permission.CONNECTIVITY_INTERNAL" <permission android:name="android.permission.CONNECTIVITY_INTERNAL"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi <!-- @SystemApi
@hide --> @hide -->
<permission android:name="android.permission.RECEIVE_DATA_ACTIVITY_CHANGE" <permission android:name="android.permission.RECEIVE_DATA_ACTIVITY_CHANGE"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows access to the loop radio (Android@Home mesh network) device. <!-- @SystemApi Allows access to the loop radio (Android@Home mesh network) device.
@hide --> @hide -->
<permission android:name="android.permission.LOOP_RADIO" <permission android:name="android.permission.LOOP_RADIO"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Allows sending and receiving handover transfer status from Wifi and Bluetooth <!-- Allows sending and receiving handover transfer status from Wifi and Bluetooth
@hide --> @hide -->
<permission android:name="android.permission.NFC_HANDOVER_STATUS" <permission android:name="android.permission.NFC_HANDOVER_STATUS"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- ================================== --> <!-- ================================== -->
<!-- Permissions for accessing accounts --> <!-- Permissions for accessing accounts -->
@@ -1105,13 +1105,13 @@
<!-- @SystemApi Allows an application to manage preferences and permissions for USB devices <!-- @SystemApi Allows an application to manage preferences and permissions for USB devices
@hide --> @hide -->
<permission android:name="android.permission.MANAGE_USB" <permission android:name="android.permission.MANAGE_USB"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to access the MTP USB kernel driver. <!-- @SystemApi Allows an application to access the MTP USB kernel driver.
For use only by the device side MTP implementation. For use only by the device side MTP implementation.
@hide --> @hide -->
<permission android:name="android.permission.ACCESS_MTP" <permission android:name="android.permission.ACCESS_MTP"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows access to hardware peripherals. Intended only for hardware testing. <!-- @SystemApi Allows access to hardware peripherals. Intended only for hardware testing.
<p>Not for use by third-party applications. <p>Not for use by third-party applications.
@@ -1123,7 +1123,7 @@
<!-- @SystemApi Allows access to FM <!-- @SystemApi Allows access to FM
@hide This is not a third-party API (intended for system apps).--> @hide This is not a third-party API (intended for system apps).-->
<permission android:name="android.permission.ACCESS_FM_RADIO" <permission android:name="android.permission.ACCESS_FM_RADIO"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Allows access to configure network interfaces, configure/use IPSec, etc. <!-- Allows access to configure network interfaces, configure/use IPSec, etc.
@hide --> @hide -->
@@ -1139,19 +1139,19 @@
@hide This should only be used by OEM's TvInputService's. @hide This should only be used by OEM's TvInputService's.
--> -->
<permission android:name="android.permission.TV_INPUT_HARDWARE" <permission android:name="android.permission.TV_INPUT_HARDWARE"
android:protectionLevel="signatureOrSystem" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows to capture a frame of TV input hardware such as <!-- @SystemApi Allows to capture a frame of TV input hardware such as
built-in tuners and HDMI-in's. built-in tuners and HDMI-in's.
@hide <p>Not for use by third-party applications. @hide <p>Not for use by third-party applications.
--> -->
<permission android:name="android.permission.CAPTURE_TV_INPUT" <permission android:name="android.permission.CAPTURE_TV_INPUT"
android:protectionLevel="signatureOrSystem" /> android:protectionLevel="signature|privileged" />
<!-- @hide Allows TvInputService to access DVB device. <!-- @hide Allows TvInputService to access DVB device.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.DVB_DEVICE" <permission android:name="android.permission.DVB_DEVICE"
android:protectionLevel="signatureOrSystem" /> android:protectionLevel="signature|privileged" />
<!-- @hide Allows enabling/disabling OEM unlock <!-- @hide Allows enabling/disabling OEM unlock
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
@@ -1166,7 +1166,7 @@
<!-- @hide Allows system update service to notify device owner about pending updates. <!-- @hide Allows system update service to notify device owner about pending updates.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.NOTIFY_PENDING_SYSTEM_UPDATE" <permission android:name="android.permission.NOTIFY_PENDING_SYSTEM_UPDATE"
android:protectionLevel="signatureOrSystem" /> android:protectionLevel="signature|privileged" />
<!-- =========================================== --> <!-- =========================================== -->
<!-- Permissions associated with camera and image capture --> <!-- Permissions associated with camera and image capture -->
@@ -1177,12 +1177,12 @@
a camera is in use by an application. a camera is in use by an application.
@hide --> @hide -->
<permission android:name="android.permission.CAMERA_DISABLE_TRANSMIT_LED" <permission android:name="android.permission.CAMERA_DISABLE_TRANSMIT_LED"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Allows sending the camera service notifications about system-wide events. <!-- Allows sending the camera service notifications about system-wide events.
@hide --> @hide -->
<permission android:name="android.permission.CAMERA_SEND_SYSTEM_EVENTS" <permission android:name="android.permission.CAMERA_SEND_SYSTEM_EVENTS"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- =========================================== --> <!-- =========================================== -->
<!-- Permissions associated with telephony state --> <!-- Permissions associated with telephony state -->
@@ -1193,17 +1193,17 @@
Does not include placing calls. Does not include placing calls.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.MODIFY_PHONE_STATE" <permission android:name="android.permission.MODIFY_PHONE_STATE"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Allows read only access to precise phone state. <!-- Allows read only access to precise phone state.
@hide Pending API council approval --> @hide Pending API council approval -->
<permission android:name="android.permission.READ_PRECISE_PHONE_STATE" <permission android:name="android.permission.READ_PRECISE_PHONE_STATE"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows read access to privileged phone state. <!-- @SystemApi Allows read access to privileged phone state.
@hide Used internally. --> @hide Used internally. -->
<permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" <permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Protects the ability to register any PhoneAccount with <!-- @SystemApi Protects the ability to register any PhoneAccount with
PhoneAccount#CAPABILITY_SIM_SUBSCRIPTION. This capability indicates that the PhoneAccount PhoneAccount#CAPABILITY_SIM_SUBSCRIPTION. This capability indicates that the PhoneAccount
@@ -1265,7 +1265,7 @@
<!-- @SystemApi Allows an application to write to internal media storage <!-- @SystemApi Allows an application to write to internal media storage
@hide --> @hide -->
<permission android:name="android.permission.WRITE_MEDIA_STORAGE" <permission android:name="android.permission.WRITE_MEDIA_STORAGE"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Allows an application to manage access to documents, usually as part <!-- Allows an application to manage access to documents, usually as part
of a document picker. of a document picker.
@@ -1309,19 +1309,19 @@
@hide @hide
@SystemApi --> @SystemApi -->
<permission android:name="android.permission.REAL_GET_TASKS" <permission android:name="android.permission.REAL_GET_TASKS"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Allows an application to start a task from a ActivityManager#RecentTaskInfo. <!-- Allows an application to start a task from a ActivityManager#RecentTaskInfo.
@hide --> @hide -->
<permission android:name="android.permission.START_TASKS_FROM_RECENTS" <permission android:name="android.permission.START_TASKS_FROM_RECENTS"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi @hide Allows an application to call APIs that allow it to do interactions <!-- @SystemApi @hide Allows an application to call APIs that allow it to do interactions
across the users on the device, using singleton services and across the users on the device, using singleton services and
user-targeted broadcasts. This permission is not available to user-targeted broadcasts. This permission is not available to
third party applications. --> third party applications. -->
<permission android:name="android.permission.INTERACT_ACROSS_USERS" <permission android:name="android.permission.INTERACT_ACROSS_USERS"
android:protectionLevel="signature|system|development" /> android:protectionLevel="signature|privileged|development" />
<!-- @hide Fuller form of {@link android.Manifest.permission#INTERACT_ACROSS_USERS} <!-- @hide Fuller form of {@link android.Manifest.permission#INTERACT_ACROSS_USERS}
that removes restrictions on where broadcasts can be sent and allows other that removes restrictions on where broadcasts can be sent and allows other
@@ -1333,7 +1333,7 @@
users on the device. This permission is not available to users on the device. This permission is not available to
third party applications. --> third party applications. -->
<permission android:name="android.permission.MANAGE_USERS" <permission android:name="android.permission.MANAGE_USERS"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @hide Allows an application to set the profile owners and the device owner. <!-- @hide Allows an application to set the profile owners and the device owner.
This permission is not available to third party applications.--> This permission is not available to third party applications.-->
@@ -1362,7 +1362,7 @@
<!-- @SystemApi @hide Allows an application to create/manage/remove stacks --> <!-- @SystemApi @hide Allows an application to create/manage/remove stacks -->
<permission android:name="android.permission.MANAGE_ACTIVITY_STACKS" <permission android:name="android.permission.MANAGE_ACTIVITY_STACKS"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Allows an application to start any activity, regardless of permission <!-- Allows an application to start any activity, regardless of permission
protection or exported state. protection or exported state.
@@ -1389,7 +1389,7 @@
<!-- @SystemApi @hide Allows an application to retrieve a package's importance. <!-- @SystemApi @hide Allows an application to retrieve a package's importance.
This permission is not available to third party applications. --> This permission is not available to third party applications. -->
<permission android:name="android.permission.GET_PACKAGE_IMPORTANCE" <permission android:name="android.permission.GET_PACKAGE_IMPORTANCE"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- ================================== --> <!-- ================================== -->
<!-- Permissions affecting the display of other applications --> <!-- Permissions affecting the display of other applications -->
@@ -1404,7 +1404,7 @@
<permission android:name="android.permission.SYSTEM_ALERT_WINDOW" <permission android:name="android.permission.SYSTEM_ALERT_WINDOW"
android:label="@string/permlab_systemAlertWindow" android:label="@string/permlab_systemAlertWindow"
android:description="@string/permdesc_systemAlertWindow" android:description="@string/permdesc_systemAlertWindow"
android:protectionLevel="signature|system|appop|pre23" /> android:protectionLevel="signature|preinstalled|appop|pre23" />
<!-- ================================== --> <!-- ================================== -->
<!-- Permissions affecting the system wallpaper --> <!-- Permissions affecting the system wallpaper -->
@@ -1435,7 +1435,7 @@
<!-- @SystemApi Allows applications to set the system time. <!-- @SystemApi Allows applications to set the system time.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.SET_TIME" <permission android:name="android.permission.SET_TIME"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Allows applications to set the system time zone. <!-- Allows applications to set the system time zone.
<p>Protection level: normal <p>Protection level: normal
@@ -1520,7 +1520,7 @@
<!-- @SystemApi Allows an application to modify the current configuration, such <!-- @SystemApi Allows an application to modify the current configuration, such
as locale. --> as locale. -->
<permission android:name="android.permission.CHANGE_CONFIGURATION" <permission android:name="android.permission.CHANGE_CONFIGURATION"
android:protectionLevel="signature|system|development" /> android:protectionLevel="signature|privileged|development" />
<!-- Allows an application to read or write the system settings. --> <!-- Allows an application to read or write the system settings. -->
<permission android:name="android.permission.WRITE_SETTINGS" <permission android:name="android.permission.WRITE_SETTINGS"
@@ -1531,23 +1531,23 @@
<!-- @SystemApi Allows an application to modify the Google service map. <!-- @SystemApi Allows an application to modify the Google service map.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.WRITE_GSERVICES" <permission android:name="android.permission.WRITE_GSERVICES"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to call <!-- @SystemApi Allows an application to call
{@link android.app.ActivityManager#forceStopPackage}. {@link android.app.ActivityManager#forceStopPackage}.
@hide --> @hide -->
<permission android:name="android.permission.FORCE_STOP_PACKAGES" <permission android:name="android.permission.FORCE_STOP_PACKAGES"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi @hide Allows an application to retrieve the content of the active window <!-- @SystemApi @hide Allows an application to retrieve the content of the active window
An active window is the window that has fired an accessibility event. --> An active window is the window that has fired an accessibility event. -->
<permission android:name="android.permission.RETRIEVE_WINDOW_CONTENT" <permission android:name="android.permission.RETRIEVE_WINDOW_CONTENT"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Modify the global animation scaling factor. <!-- @SystemApi Modify the global animation scaling factor.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.SET_ANIMATION_SCALE" <permission android:name="android.permission.SET_ANIMATION_SCALE"
android:protectionLevel="signature|system|development" /> android:protectionLevel="signature|privileged|development" />
<!-- @deprecated This functionality will be removed in the future; please do <!-- @deprecated This functionality will be removed in the future; please do
not use. Allow an application to make its activities persistent. --> not use. Allow an application to make its activities persistent. -->
@@ -1637,7 +1637,7 @@
<!-- @SystemApi Allows applications to write the apn settings. <!-- @SystemApi Allows applications to write the apn settings.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.WRITE_APN_SETTINGS" <permission android:name="android.permission.WRITE_APN_SETTINGS"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Allows applications to change network connectivity state. <!-- Allows applications to change network connectivity state.
<p>Protection level: normal <p>Protection level: normal
@@ -1652,24 +1652,24 @@
<p>Protection level: system|signature <p>Protection level: system|signature
--> -->
<permission android:name="android.permission.CLEAR_APP_CACHE" <permission android:name="android.permission.CLEAR_APP_CACHE"
android:protectionLevel="signatureOrSystem" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to use any media decoder when decoding for playback <!-- @SystemApi Allows an application to use any media decoder when decoding for playback
@hide --> @hide -->
<permission android:name="android.permission.ALLOW_ANY_CODEC_FOR_PLAYBACK" <permission android:name="android.permission.ALLOW_ANY_CODEC_FOR_PLAYBACK"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to install and/or uninstall CA certificates on <!-- @SystemApi Allows an application to install and/or uninstall CA certificates on
behalf of the user. behalf of the user.
@hide --> @hide -->
<permission android:name="android.permission.MANAGE_CA_CERTIFICATES" <permission android:name="android.permission.MANAGE_CA_CERTIFICATES"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to do certain operations needed for <!-- @SystemApi Allows an application to do certain operations needed for
interacting with the recovery (system update) system. interacting with the recovery (system update) system.
@hide --> @hide -->
<permission android:name="android.permission.RECOVERY" <permission android:name="android.permission.RECOVERY"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Allows the system to bind to an application's task services <!-- Allows the system to bind to an application's task services
@hide --> @hide -->
@@ -1683,7 +1683,7 @@
it off to the various individual installer components it off to the various individual installer components
@hide --> @hide -->
<permission android:name="android.permission.UPDATE_CONFIG" <permission android:name="android.permission.UPDATE_CONFIG"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- ========================================= --> <!-- ========================================= -->
<!-- Permissions for special development tools --> <!-- Permissions for special development tools -->
@@ -1693,40 +1693,40 @@
<!-- @SystemApi Allows an application to read or write the secure system settings. <!-- @SystemApi Allows an application to read or write the secure system settings.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.WRITE_SECURE_SETTINGS" <permission android:name="android.permission.WRITE_SECURE_SETTINGS"
android:protectionLevel="signature|system|development" /> android:protectionLevel="signature|privileged|development" />
<!-- @SystemApi Allows an application to retrieve state dump information from system services. <!-- @SystemApi Allows an application to retrieve state dump information from system services.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.DUMP" <permission android:name="android.permission.DUMP"
android:protectionLevel="signature|system|development" /> android:protectionLevel="signature|privileged|development" />
<!-- @SystemApi Allows an application to read the low-level system log files. <!-- @SystemApi Allows an application to read the low-level system log files.
<p>Not for use by third-party applications, because <p>Not for use by third-party applications, because
Log entries can contain the user's private information. --> Log entries can contain the user's private information. -->
<permission android:name="android.permission.READ_LOGS" <permission android:name="android.permission.READ_LOGS"
android:protectionLevel="signature|system|development" /> android:protectionLevel="signature|privileged|development" />
<!-- @SystemApi Configure an application for debugging. <!-- @SystemApi Configure an application for debugging.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.SET_DEBUG_APP" <permission android:name="android.permission.SET_DEBUG_APP"
android:protectionLevel="signature|system|development" /> android:protectionLevel="signature|privileged|development" />
<!-- @SystemApi Allows an application to set the maximum number of (not needed) <!-- @SystemApi Allows an application to set the maximum number of (not needed)
application processes that can be running. application processes that can be running.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.SET_PROCESS_LIMIT" <permission android:name="android.permission.SET_PROCESS_LIMIT"
android:protectionLevel="signature|system|development" /> android:protectionLevel="signature|privileged|development" />
<!-- @SystemApi Allows an application to control whether activities are immediately <!-- @SystemApi Allows an application to control whether activities are immediately
finished when put in the background. finished when put in the background.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.SET_ALWAYS_FINISH" <permission android:name="android.permission.SET_ALWAYS_FINISH"
android:protectionLevel="signature|system|development" /> android:protectionLevel="signature|privileged|development" />
<!-- @SystemApi Allow an application to request that a signal be sent to all persistent processes. <!-- @SystemApi Allow an application to request that a signal be sent to all persistent processes.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.SIGNAL_PERSISTENT_PROCESSES" <permission android:name="android.permission.SIGNAL_PERSISTENT_PROCESSES"
android:protectionLevel="signature|system|development" /> android:protectionLevel="signature|privileged|development" />
<!-- ==================================== --> <!-- ==================================== -->
<!-- Private permissions --> <!-- Private permissions -->
@@ -1742,7 +1742,7 @@
and its icons. and its icons.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.STATUS_BAR" <permission android:name="android.permission.STATUS_BAR"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Allows an application to be the status bar. Currently used only by SystemUI.apk <!-- Allows an application to be the status bar. Currently used only by SystemUI.apk
@hide --> @hide -->
@@ -1760,16 +1760,16 @@
<!-- @SystemApi Allows an application to update device statistics. <!-- @SystemApi Allows an application to update device statistics.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.UPDATE_DEVICE_STATS" <permission android:name="android.permission.UPDATE_DEVICE_STATS"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi @hide Allows an application to collect battery statistics --> <!-- @SystemApi @hide Allows an application to collect battery statistics -->
<permission android:name="android.permission.GET_APP_OPS_STATS" <permission android:name="android.permission.GET_APP_OPS_STATS"
android:protectionLevel="signature|system|development" /> android:protectionLevel="signature|privileged|development" />
<!-- @SystemApi Allows an application to update application operation statistics. Not for <!-- @SystemApi Allows an application to update application operation statistics. Not for
use by third party apps. @hide --> use by third party apps. @hide -->
<permission android:name="android.permission.UPDATE_APP_OPS_STATS" <permission android:name="android.permission.UPDATE_APP_OPS_STATS"
android:protectionLevel="signature|system|installer" /> android:protectionLevel="signature|privileged|installer" />
<!-- @SystemApi Allows an application to open windows that are for use by parts <!-- @SystemApi Allows an application to open windows that are for use by parts
of the system user interface. of the system user interface.
@@ -1831,7 +1831,7 @@
to put the higher-level system there into a shutdown state. to put the higher-level system there into a shutdown state.
@hide --> @hide -->
<permission android:name="android.permission.SHUTDOWN" <permission android:name="android.permission.SHUTDOWN"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to tell the activity manager to temporarily <!-- @SystemApi Allows an application to tell the activity manager to temporarily
stop application switches, putting it into a special mode that stop application switches, putting it into a special mode that
@@ -1839,7 +1839,7 @@
critical UI such as the home screen. critical UI such as the home screen.
@hide --> @hide -->
<permission android:name="android.permission.STOP_APP_SWITCHES" <permission android:name="android.permission.STOP_APP_SWITCHES"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to retrieve private information about <!-- @SystemApi Allows an application to retrieve private information about
the current top activity, such as any assist context it can provide. the current top activity, such as any assist context it can provide.
@@ -1916,7 +1916,7 @@
<p>Protection level: system|signature <p>Protection level: system|signature
--> -->
<permission android:name="android.permission.BIND_WALLPAPER" <permission android:name="android.permission.BIND_WALLPAPER"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Must be required by a {@link android.service.voice.VoiceInteractionService}, <!-- Must be required by a {@link android.service.voice.VoiceInteractionService},
to ensure that only the system can bind to it. to ensure that only the system can bind to it.
@@ -1929,7 +1929,7 @@
to ensure that only the system can interact with it. to ensure that only the system can interact with it.
@hide <p>Not for use by third-party applications.</p> --> @hide <p>Not for use by third-party applications.</p> -->
<permission android:name="android.permission.MANAGE_VOICE_KEYPHRASES" <permission android:name="android.permission.MANAGE_VOICE_KEYPHRASES"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Must be required by a {@link com.android.media.remotedisplay.RemoteDisplayProvider}, <!-- Must be required by a {@link com.android.media.remotedisplay.RemoteDisplayProvider},
to ensure that only the system can bind to it. to ensure that only the system can bind to it.
@@ -1942,13 +1942,13 @@
<p>Protection level: signature <p>Protection level: signature
--> -->
<permission android:name="android.permission.BIND_TV_INPUT" <permission android:name="android.permission.BIND_TV_INPUT"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to modify parental controls <!-- @SystemApi Allows an application to modify parental controls
<p>Not for use by third-party applications. <p>Not for use by third-party applications.
@hide --> @hide -->
<permission android:name="android.permission.MODIFY_PARENTAL_CONTROLS" <permission android:name="android.permission.MODIFY_PARENTAL_CONTROLS"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Must be required by a {@link android.media.routing.MediaRouteService} <!-- Must be required by a {@link android.media.routing.MediaRouteService}
to ensure that only the system can interact with it. to ensure that only the system can interact with it.
@@ -1967,7 +1967,7 @@
<p>Not for use by third-party applications. <p>Not for use by third-party applications.
@hide --> @hide -->
<permission android:name="android.permission.MANAGE_DEVICE_ADMINS" <permission android:name="android.permission.MANAGE_DEVICE_ADMINS"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows low-level access to setting the orientation (actually <!-- @SystemApi Allows low-level access to setting the orientation (actually
rotation) of the screen. rotation) of the screen.
@@ -2009,7 +2009,7 @@
<!-- @SystemApi Allows an application to install packages. <!-- @SystemApi Allows an application to install packages.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.INSTALL_PACKAGES" <permission android:name="android.permission.INSTALL_PACKAGES"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to clear user data. <!-- @SystemApi Allows an application to clear user data.
<p>Not for use by third-party applications <p>Not for use by third-party applications
@@ -2021,23 +2021,23 @@
<!-- @SystemApi Allows an application to delete cache files. <!-- @SystemApi Allows an application to delete cache files.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.DELETE_CACHE_FILES" <permission android:name="android.permission.DELETE_CACHE_FILES"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to delete packages. <!-- @SystemApi Allows an application to delete packages.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.DELETE_PACKAGES" <permission android:name="android.permission.DELETE_PACKAGES"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to move location of installed package. <!-- @SystemApi Allows an application to move location of installed package.
@hide --> @hide -->
<permission android:name="android.permission.MOVE_PACKAGE" <permission android:name="android.permission.MOVE_PACKAGE"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to change whether an application component (other than its own) is <!-- @SystemApi Allows an application to change whether an application component (other than its own) is
enabled or not. enabled or not.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.CHANGE_COMPONENT_ENABLED_STATE" <permission android:name="android.permission.CHANGE_COMPONENT_ENABLED_STATE"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @hide Allows an application to grant or revoke specific permissions. --> <!-- @hide Allows an application to grant or revoke specific permissions. -->
<permission android:name="android.permission.GRANT_REVOKE_PERMISSIONS" <permission android:name="android.permission.GRANT_REVOKE_PERMISSIONS"
@@ -2045,7 +2045,7 @@
<!-- @hide Allows an application to observe permission changes. --> <!-- @hide Allows an application to observe permission changes. -->
<permission android:name="android.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS" <permission android:name="android.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS"
android:protectionLevel="signatureOrSystem" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to use SurfaceFlinger's low level features. <!-- @SystemApi Allows an application to use SurfaceFlinger's low level features.
<p>Not for use by third-party applications. <p>Not for use by third-party applications.
@@ -2058,7 +2058,7 @@
get access to the frame buffer data. get access to the frame buffer data.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.READ_FRAME_BUFFER" <permission android:name="android.permission.READ_FRAME_BUFFER"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Allows an application to use InputFlinger's low level features. <!-- Allows an application to use InputFlinger's low level features.
@hide --> @hide -->
@@ -2081,40 +2081,40 @@
<p>Not for use by third-party applications.</p> <p>Not for use by third-party applications.</p>
@hide --> @hide -->
<permission android:name="android.permission.CONTROL_VPN" <permission android:name="android.permission.CONTROL_VPN"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<uses-permission android:name="android.permission.CONTROL_VPN" /> <uses-permission android:name="android.permission.CONTROL_VPN" />
<!-- @SystemApi Allows an application to capture audio output. <!-- @SystemApi Allows an application to capture audio output.
<p>Not for use by third-party applications.</p> --> <p>Not for use by third-party applications.</p> -->
<permission android:name="android.permission.CAPTURE_AUDIO_OUTPUT" <permission android:name="android.permission.CAPTURE_AUDIO_OUTPUT"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to capture audio for hotword detection. <!-- @SystemApi Allows an application to capture audio for hotword detection.
<p>Not for use by third-party applications.</p> <p>Not for use by third-party applications.</p>
@hide --> @hide -->
<permission android:name="android.permission.CAPTURE_AUDIO_HOTWORD" <permission android:name="android.permission.CAPTURE_AUDIO_HOTWORD"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to modify audio routing and override policy decisions. <!-- @SystemApi Allows an application to modify audio routing and override policy decisions.
<p>Not for use by third-party applications.</p> <p>Not for use by third-party applications.</p>
@hide --> @hide -->
<permission android:name="android.permission.MODIFY_AUDIO_ROUTING" <permission android:name="android.permission.MODIFY_AUDIO_ROUTING"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to capture video output. <!-- @SystemApi Allows an application to capture video output.
<p>Not for use by third-party applications.</p> --> <p>Not for use by third-party applications.</p> -->
<permission android:name="android.permission.CAPTURE_VIDEO_OUTPUT" <permission android:name="android.permission.CAPTURE_VIDEO_OUTPUT"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to capture secure video output. <!-- @SystemApi Allows an application to capture secure video output.
<p>Not for use by third-party applications.</p> --> <p>Not for use by third-party applications.</p> -->
<permission android:name="android.permission.CAPTURE_SECURE_VIDEO_OUTPUT" <permission android:name="android.permission.CAPTURE_SECURE_VIDEO_OUTPUT"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to know what content is playing and control its playback. <!-- @SystemApi Allows an application to know what content is playing and control its playback.
<p>Not for use by third-party applications due to privacy of media consumption</p> --> <p>Not for use by third-party applications due to privacy of media consumption</p> -->
<permission android:name="android.permission.MEDIA_CONTENT_CONTROL" <permission android:name="android.permission.MEDIA_CONTENT_CONTROL"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Required to be able to disable the device (very dangerous!). <!-- @SystemApi Required to be able to disable the device (very dangerous!).
<p>Not for use by third-party applications. <p>Not for use by third-party applications.
@@ -2126,7 +2126,7 @@
<!-- @SystemApi Required to be able to reboot the device. <!-- @SystemApi Required to be able to reboot the device.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.REBOOT" <permission android:name="android.permission.REBOOT"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows low-level access to power management. <!-- @SystemApi Allows low-level access to power management.
<p>Not for use by third-party applications. <p>Not for use by third-party applications.
@@ -2138,7 +2138,7 @@
<!-- Allows access to the PowerManager.userActivity function. <!-- Allows access to the PowerManager.userActivity function.
<p>Not for use by third-party applications. @hide @SystemApi --> <p>Not for use by third-party applications. @hide @SystemApi -->
<permission android:name="android.permission.USER_ACTIVITY" <permission android:name="android.permission.USER_ACTIVITY"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @hide Allows low-level access to tun tap driver --> <!-- @hide Allows low-level access to tun tap driver -->
<permission android:name="android.permission.NET_TUNNELING" <permission android:name="android.permission.NET_TUNNELING"
@@ -2173,45 +2173,45 @@
<!-- @SystemApi Allows an application to broadcast privileged networking requests. <!-- @SystemApi Allows an application to broadcast privileged networking requests.
<p>Not for use by third-party applications. @hide --> <p>Not for use by third-party applications. @hide -->
<permission android:name="android.permission.BROADCAST_NETWORK_PRIVILEGED" <permission android:name="android.permission.BROADCAST_NETWORK_PRIVILEGED"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Not for use by third-party applications. --> <!-- @SystemApi Not for use by third-party applications. -->
<permission android:name="android.permission.MASTER_CLEAR" <permission android:name="android.permission.MASTER_CLEAR"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to call any phone number, including emergency <!-- @SystemApi Allows an application to call any phone number, including emergency
numbers, without going through the Dialer user interface for the user numbers, without going through the Dialer user interface for the user
to confirm the call being placed. to confirm the call being placed.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.CALL_PRIVILEGED" <permission android:name="android.permission.CALL_PRIVILEGED"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to perform CDMA OTA provisioning @hide --> <!-- @SystemApi Allows an application to perform CDMA OTA provisioning @hide -->
<permission android:name="android.permission.PERFORM_CDMA_PROVISIONING" <permission android:name="android.permission.PERFORM_CDMA_PROVISIONING"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to perform SIM Activation @hide --> <!-- @SystemApi Allows an application to perform SIM Activation @hide -->
<permission android:name="android.permission.PERFORM_SIM_ACTIVATION" <permission android:name="android.permission.PERFORM_SIM_ACTIVATION"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows enabling/disabling location update notifications from <!-- @SystemApi Allows enabling/disabling location update notifications from
the radio. the radio.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.CONTROL_LOCATION_UPDATES" <permission android:name="android.permission.CONTROL_LOCATION_UPDATES"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows read/write access to the "properties" table in the checkin <!-- @SystemApi Allows read/write access to the "properties" table in the checkin
database, to change values that get uploaded. database, to change values that get uploaded.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.ACCESS_CHECKIN_PROPERTIES" <permission android:name="android.permission.ACCESS_CHECKIN_PROPERTIES"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to collect component usage <!-- @SystemApi Allows an application to collect component usage
statistics statistics
<p>Declaring the permission implies intention to use the API and the user of the <p>Declaring the permission implies intention to use the API and the user of the
device can grant permission through the Settings application. --> device can grant permission through the Settings application. -->
<permission android:name="android.permission.PACKAGE_USAGE_STATS" <permission android:name="android.permission.PACKAGE_USAGE_STATS"
android:protectionLevel="signature|system|development|appop" /> android:protectionLevel="signature|privileged|development|appop" />
<uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" /> <uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" />
<!-- @hide Allows an application to change the app idle state of an app. <!-- @hide Allows an application to change the app idle state of an app.
@@ -2227,13 +2227,13 @@
<!-- @SystemApi Allows an application to collect battery statistics --> <!-- @SystemApi Allows an application to collect battery statistics -->
<permission android:name="android.permission.BATTERY_STATS" <permission android:name="android.permission.BATTERY_STATS"
android:protectionLevel="signature|system|development" /> android:protectionLevel="signature|privileged|development" />
<!-- @SystemApi Allows an application to control the backup and restore process. <!-- @SystemApi Allows an application to control the backup and restore process.
<p>Not for use by third-party applications. <p>Not for use by third-party applications.
@hide pending API council --> @hide pending API council -->
<permission android:name="android.permission.BACKUP" <permission android:name="android.permission.BACKUP"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Allows a package to launch the secure full-backup confirmation UI. <!-- Allows a package to launch the secure full-backup confirmation UI.
ONLY the system process may hold this permission. ONLY the system process may hold this permission.
@@ -2244,7 +2244,7 @@
<!-- @SystemApi Must be required by a {@link android.widget.RemoteViewsService}, <!-- @SystemApi Must be required by a {@link android.widget.RemoteViewsService},
to ensure that only the system can bind to it. --> to ensure that only the system can bind to it. -->
<permission android:name="android.permission.BIND_REMOTEVIEWS" <permission android:name="android.permission.BIND_REMOTEVIEWS"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to tell the AppWidget service which application <!-- @SystemApi Allows an application to tell the AppWidget service which application
can access AppWidget's data. The normal user flow is that a user can access AppWidget's data. The normal user flow is that a user
@@ -2253,19 +2253,19 @@
An application that has this permission should honor that contract. An application that has this permission should honor that contract.
<p>Not for use by third-party applications. --> <p>Not for use by third-party applications. -->
<permission android:name="android.permission.BIND_APPWIDGET" <permission android:name="android.permission.BIND_APPWIDGET"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Private permission, to restrict who can bring up a dialog to add a new <!-- @SystemApi Private permission, to restrict who can bring up a dialog to add a new
keyguard widget keyguard widget
@hide --> @hide -->
<permission android:name="android.permission.BIND_KEYGUARD_APPWIDGET" <permission android:name="android.permission.BIND_KEYGUARD_APPWIDGET"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Internal permission allowing an application to query/set which <!-- @SystemApi Internal permission allowing an application to query/set which
applications can bind AppWidgets. applications can bind AppWidgets.
@hide --> @hide -->
<permission android:name="android.permission.MODIFY_APPWIDGET_BIND_PERMISSIONS" <permission android:name="android.permission.MODIFY_APPWIDGET_BIND_PERMISSIONS"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Allows applications to change the background data setting. <!-- Allows applications to change the background data setting.
<p>Not for use by third-party applications. <p>Not for use by third-party applications.
@@ -2282,7 +2282,7 @@
it is used by applications to protect themselves from everyone else it is used by applications to protect themselves from everyone else
besides global search. --> besides global search. -->
<permission android:name="android.permission.GLOBAL_SEARCH" <permission android:name="android.permission.GLOBAL_SEARCH"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Internal permission protecting access to the global search <!-- Internal permission protecting access to the global search
system: ensures that only the system can access the provider system: ensures that only the system can access the provider
@@ -2297,28 +2297,28 @@
<!-- @SystemApi Internal permission to allows an application to read indexable data. <!-- @SystemApi Internal permission to allows an application to read indexable data.
@hide --> @hide -->
<permission android:name="android.permission.READ_SEARCH_INDEXABLES" <permission android:name="android.permission.READ_SEARCH_INDEXABLES"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows applications to set a live wallpaper. <!-- @SystemApi Allows applications to set a live wallpaper.
@hide XXX Change to signature once the picker is moved to its @hide XXX Change to signature once the picker is moved to its
own apk as Ghod Intended. --> own apk as Ghod Intended. -->
<permission android:name="android.permission.SET_WALLPAPER_COMPONENT" <permission android:name="android.permission.SET_WALLPAPER_COMPONENT"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows applications to read dream settings and dream state. <!-- @SystemApi Allows applications to read dream settings and dream state.
@hide --> @hide -->
<permission android:name="android.permission.READ_DREAM_STATE" <permission android:name="android.permission.READ_DREAM_STATE"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows applications to write dream settings, and start or stop dreaming. <!-- @SystemApi Allows applications to write dream settings, and start or stop dreaming.
@hide --> @hide -->
<permission android:name="android.permission.WRITE_DREAM_STATE" <permission android:name="android.permission.WRITE_DREAM_STATE"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allow an application to read and write the cache partition. <!-- @SystemApi Allow an application to read and write the cache partition.
@hide --> @hide -->
<permission android:name="android.permission.ACCESS_CACHE_FILESYSTEM" <permission android:name="android.permission.ACCESS_CACHE_FILESYSTEM"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Must be required by default container service so that only <!-- Must be required by default container service so that only
the system can bind to it and use it to copy the system can bind to it and use it to copy
@@ -2332,12 +2332,12 @@
@hide @hide
--> -->
<permission android:name="android.permission.CRYPT_KEEPER" <permission android:name="android.permission.CRYPT_KEEPER"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to read historical network usage for <!-- @SystemApi Allows an application to read historical network usage for
specific networks and applications. @hide --> specific networks and applications. @hide -->
<permission android:name="android.permission.READ_NETWORK_USAGE_HISTORY" <permission android:name="android.permission.READ_NETWORK_USAGE_HISTORY"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Allows an application to manage network policies (such as warning and disable <!-- Allows an application to manage network policies (such as warning and disable
limits) and to define application-specific rules. @hide --> limits) and to define application-specific rules. @hide -->
@@ -2348,7 +2348,7 @@
by system services like download manager and media server. Not for use by by system services like download manager and media server. Not for use by
third party apps. @hide --> third party apps. @hide -->
<permission android:name="android.permission.MODIFY_NETWORK_ACCOUNTING" <permission android:name="android.permission.MODIFY_NETWORK_ACCOUNTING"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- C2DM permission. <!-- C2DM permission.
@hide Used internally. @hide Used internally.
@@ -2361,7 +2361,7 @@
trust it to verify packages. trust it to verify packages.
--> -->
<permission android:name="android.permission.PACKAGE_VERIFICATION_AGENT" <permission android:name="android.permission.PACKAGE_VERIFICATION_AGENT"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Must be required by package verifier receiver, to ensure that only the <!-- Must be required by package verifier receiver, to ensure that only the
system can interact with it. system can interact with it.
@@ -2374,7 +2374,7 @@
PackageManager will trust it to verify intent filters. PackageManager will trust it to verify intent filters.
--> -->
<permission android:name="android.permission.INTENT_FILTER_VERIFICATION_AGENT" <permission android:name="android.permission.INTENT_FILTER_VERIFICATION_AGENT"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Must be required by intent filter verifier receiver, to ensure that only the <!-- Must be required by intent filter verifier receiver, to ensure that only the
system can interact with it. system can interact with it.
@@ -2386,7 +2386,7 @@
<!-- @SystemApi Allows applications to access serial ports via the SerialManager. <!-- @SystemApi Allows applications to access serial ports via the SerialManager.
@hide --> @hide -->
<permission android:name="android.permission.SERIAL_PORT" <permission android:name="android.permission.SERIAL_PORT"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Allows the holder to access content providers from outside an ApplicationThread. <!-- Allows the holder to access content providers from outside an ApplicationThread.
This permission is enforced by the ActivityManagerService on the corresponding APIs, This permission is enforced by the ActivityManagerService on the corresponding APIs,
@@ -2401,13 +2401,13 @@
OTA reboot *not* occur while the lock is held. OTA reboot *not* occur while the lock is held.
@hide --> @hide -->
<permission android:name="android.permission.UPDATE_LOCK" <permission android:name="android.permission.UPDATE_LOCK"
android:protectionLevel="signatureOrSystem" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to read the current set of notifications, including <!-- @SystemApi Allows an application to read the current set of notifications, including
any metadata and intents attached. any metadata and intents attached.
@hide --> @hide -->
<permission android:name="android.permission.ACCESS_NOTIFICATIONS" <permission android:name="android.permission.ACCESS_NOTIFICATIONS"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Marker permission for applications that wish to access notification policy. <!-- Marker permission for applications that wish to access notification policy.
<p>Protection level: normal <p>Protection level: normal
@@ -2439,12 +2439,12 @@
<!-- @SystemApi Allows an application to provide a trust agent. <!-- @SystemApi Allows an application to provide a trust agent.
@hide For security reasons, this is a platform-only permission. --> @hide For security reasons, this is a platform-only permission. -->
<permission android:name="android.permission.PROVIDE_TRUST_AGENT" <permission android:name="android.permission.PROVIDE_TRUST_AGENT"
android:protectionLevel="signatureOrSystem" /> android:protectionLevel="signature|privileged" />
<!-- Allows an application to launch the trust agent settings activity. <!-- Allows an application to launch the trust agent settings activity.
@hide --> @hide -->
<permission android:name="android.permission.LAUNCH_TRUST_AGENT_SETTINGS" <permission android:name="android.permission.LAUNCH_TRUST_AGENT_SETTINGS"
android:protectionLevel="signatureOrSystem" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Must be required by an {@link <!-- @SystemApi Must be required by an {@link
android.service.trust.TrustAgentService}, android.service.trust.TrustAgentService},
@@ -2487,17 +2487,17 @@
carrier setup application to enforce that this permission is required carrier setup application to enforce that this permission is required
@hide This is not a third-party API (intended for OEMs and system apps). --> @hide This is not a third-party API (intended for OEMs and system apps). -->
<permission android:name="android.permission.INVOKE_CARRIER_SETUP" <permission android:name="android.permission.INVOKE_CARRIER_SETUP"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to listen for network condition observations. <!-- @SystemApi Allows an application to listen for network condition observations.
@hide This is not a third-party API (intended for system apps). --> @hide This is not a third-party API (intended for system apps). -->
<permission android:name="android.permission.ACCESS_NETWORK_CONDITIONS" <permission android:name="android.permission.ACCESS_NETWORK_CONDITIONS"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to provision and access DRM certificates <!-- @SystemApi Allows an application to provision and access DRM certificates
@hide This is not a third-party API (intended for system apps). --> @hide This is not a third-party API (intended for system apps). -->
<permission android:name="android.permission.ACCESS_DRM_CERTIFICATES" <permission android:name="android.permission.ACCESS_DRM_CERTIFICATES"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Api Allows an application to manage media projection sessions. <!-- Api Allows an application to manage media projection sessions.
@hide This is not a third-party API (intended for system apps). --> @hide This is not a third-party API (intended for system apps). -->
@@ -2514,11 +2514,11 @@
<!-- @SystemApi Allows an application to remove DRM certificates <!-- @SystemApi Allows an application to remove DRM certificates
@hide This is not a third-party API (intended for system apps). --> @hide This is not a third-party API (intended for system apps). -->
<permission android:name="android.permission.REMOVE_DRM_CERTIFICATES" <permission android:name="android.permission.REMOVE_DRM_CERTIFICATES"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- @deprecated Use {@link android.Manifest.permission#BIND_CARRIER_SERVICES} instead --> <!-- @deprecated Use {@link android.Manifest.permission#BIND_CARRIER_SERVICES} instead -->
<permission android:name="android.permission.BIND_CARRIER_MESSAGING_SERVICE" <permission android:name="android.permission.BIND_CARRIER_MESSAGING_SERVICE"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Allows an application to interact with the currently active <!-- Allows an application to interact with the currently active
{@link android.service.voice.VoiceInteractionService}. {@link android.service.voice.VoiceInteractionService}.
@@ -2540,7 +2540,7 @@
<permission android:name="android.permission.BIND_CARRIER_SERVICES" <permission android:name="android.permission.BIND_CARRIER_SERVICES"
android:label="@string/permlab_bindCarrierServices" android:label="@string/permlab_bindCarrierServices"
android:description="@string/permdesc_bindCarrierServices" android:description="@string/permdesc_bindCarrierServices"
android:protectionLevel="signature|system" /> android:protectionLevel="signature|privileged" />
<!-- Allows an application to query whether DO_NOT_ASK_CREDENTIALS_ON_BOOT <!-- Allows an application to query whether DO_NOT_ASK_CREDENTIALS_ON_BOOT
flag is set. flag is set.
@@ -2556,14 +2556,14 @@
<!-- Allows applications to act as network scorers. @hide @SystemApi--> <!-- Allows applications to act as network scorers. @hide @SystemApi-->
<permission android:name="android.permission.LOCAL_MAC_ADDRESS" <permission android:name="android.permission.LOCAL_MAC_ADDRESS"
android:protectionLevel="signatureOrSystem" /> android:protectionLevel="signature|privileged" />
<!-- Allows the Nfc stack to dispatch Nfc messages to applications. Applications <!-- Allows the Nfc stack to dispatch Nfc messages to applications. Applications
can use this permission to ensure incoming Nfc messages are from the Nfc stack can use this permission to ensure incoming Nfc messages are from the Nfc stack
and not simulated by another application. and not simulated by another application.
@hide --> @hide -->
<permission android:name="android.permission.DISPATCH_NFC_MESSAGE" <permission android:name="android.permission.DISPATCH_NFC_MESSAGE"
android:protectionLevel="signatureOrSystem" /> android:protectionLevel="signature|privileged" />
<!-- The system process is explicitly the only one allowed to launch the <!-- The system process is explicitly the only one allowed to launch the
confirmation UI for full backup/restore --> confirmation UI for full backup/restore -->

View File

@@ -200,7 +200,7 @@
together. --> together. -->
<flag name="signatureOrSystem" value="3" /> <flag name="signatureOrSystem" value="3" />
<!-- Additional flag from base permission type: this permission can also <!-- Additional flag from base permission type: this permission can also
be granted to any applications installed on the system image. be granted to any applications installed as privileged apps on the system image.
Please avoid using this option, as the Please avoid using this option, as the
signature protection level should be sufficient for most needs and signature protection level should be sufficient for most needs and
works regardless of exactly where applications are installed. This works regardless of exactly where applications are installed. This
@@ -208,6 +208,8 @@
vendors have applications built in to a system image which need vendors have applications built in to a system image which need
to share specific features explicitly because they are being built to share specific features explicitly because they are being built
together. --> together. -->
<flag name="privileged" value="0x10" />
<!-- Old synonym for "privileged". -->
<flag name="system" value="0x10" /> <flag name="system" value="0x10" />
<!-- Additional flag from base permission type: this permission can also <!-- Additional flag from base permission type: this permission can also
(optionally) be granted to development applications. --> (optionally) be granted to development applications. -->
@@ -226,6 +228,10 @@
<!-- Additional flag from base permission type: this permission can be automatically <!-- Additional flag from base permission type: this permission can be automatically
granted to system apps that verify packages. --> granted to system apps that verify packages. -->
<flag name="verifier" value="0x200" /> <flag name="verifier" value="0x200" />
<!-- Additional flag from base permission type: this permission can be automatically
granted any application pre-installed on the system image (not just privileged
apps). -->
<flag name="preinstalled" value="0x400" />
</attr> </attr>
<!-- Flags indicating more context for a permission group. --> <!-- Flags indicating more context for a permission group. -->

View File

@@ -8430,7 +8430,7 @@ public class PackageManagerService extends IPackageManager.Stub {
|| (compareSignatures(mPlatformPackage.mSignatures, pkg.mSignatures) || (compareSignatures(mPlatformPackage.mSignatures, pkg.mSignatures)
== PackageManager.SIGNATURE_MATCH); == PackageManager.SIGNATURE_MATCH);
if (!allowed && (bp.protectionLevel if (!allowed && (bp.protectionLevel
& PermissionInfo.PROTECTION_FLAG_SYSTEM) != 0) { & PermissionInfo.PROTECTION_FLAG_PRIVILEGED) != 0) {
if (isSystemApp(pkg)) { if (isSystemApp(pkg)) {
// For updated system applications, a system permission // For updated system applications, a system permission
// is granted only if it had been defined by the original application. // is granted only if it had been defined by the original application.
@@ -8467,31 +8467,39 @@ public class PackageManagerService extends IPackageManager.Stub {
} }
} }
} }
if (!allowed && (bp.protectionLevel if (!allowed) {
& PermissionInfo.PROTECTION_FLAG_PRE23) != 0 if (!allowed && (bp.protectionLevel
&& pkg.applicationInfo.targetSdkVersion < Build.VERSION_CODES.MNC) { & PermissionInfo.PROTECTION_FLAG_PRE23) != 0
// If this was a previously normal/dangerous permission that got moved && pkg.applicationInfo.targetSdkVersion < Build.VERSION_CODES.MNC) {
// to a system permission as part of the runtime permission redesign, then // If this was a previously normal/dangerous permission that got moved
// we still want to blindly grant it to old apps. // to a system permission as part of the runtime permission redesign, then
allowed = true; // we still want to blindly grant it to old apps.
} allowed = true;
if (!allowed && (bp.protectionLevel & PermissionInfo.PROTECTION_FLAG_INSTALLER) != 0 }
&& pkg.packageName.equals(mRequiredInstallerPackage)) { if (!allowed && (bp.protectionLevel & PermissionInfo.PROTECTION_FLAG_INSTALLER) != 0
// If this permission is to be granted to the system installer and && pkg.packageName.equals(mRequiredInstallerPackage)) {
// this app is an installer, then it gets the permission. // If this permission is to be granted to the system installer and
allowed = true; // this app is an installer, then it gets the permission.
} allowed = true;
if (!allowed && (bp.protectionLevel & PermissionInfo.PROTECTION_FLAG_VERIFIER) != 0 }
&& pkg.packageName.equals(mRequiredVerifierPackage)) { if (!allowed && (bp.protectionLevel & PermissionInfo.PROTECTION_FLAG_VERIFIER) != 0
// If this permission is to be granted to the system verifier and && pkg.packageName.equals(mRequiredVerifierPackage)) {
// this app is a verifier, then it gets the permission. // If this permission is to be granted to the system verifier and
allowed = true; // this app is a verifier, then it gets the permission.
} allowed = true;
if (!allowed && (bp.protectionLevel }
& PermissionInfo.PROTECTION_FLAG_DEVELOPMENT) != 0) { if (!allowed && (bp.protectionLevel
// For development permissions, a development permission & PermissionInfo.PROTECTION_FLAG_PREINSTALLED) != 0
// is granted only if it was already granted. && isSystemApp(pkg)) {
allowed = origPermissions.hasInstallPermission(perm); // Any pre-installed system app is allowed to get this permission.
allowed = true;
}
if (!allowed && (bp.protectionLevel
& PermissionInfo.PROTECTION_FLAG_DEVELOPMENT) != 0) {
// For development permissions, a development permission
// is granted only if it was already granted.
allowed = origPermissions.hasInstallPermission(perm);
}
} }
return allowed; return allowed;
} }