Add new INSTALL_DPC_PACKAGES permission

Add a new permission that allows the holder to install a DPC package
without requiring user action.

Test: N/A
Bug: 204416562
Bug: 188410712
Change-Id: Ib0ef022d0af41562eeef89a027b23d9692488933
This commit is contained in:
kholoud mohamed
2021-10-28 12:22:02 +01:00
committed by Kholoud Mohamed
parent 0101805b69
commit ab6940d4d4
3 changed files with 12 additions and 0 deletions

View File

@@ -118,6 +118,7 @@ package android {
field public static final String HDMI_CEC = "android.permission.HDMI_CEC";
field @Deprecated public static final String HIDE_NON_SYSTEM_OVERLAY_WINDOWS = "android.permission.HIDE_NON_SYSTEM_OVERLAY_WINDOWS";
field public static final String INJECT_EVENTS = "android.permission.INJECT_EVENTS";
field public static final String INSTALL_DPC_PACKAGES = "android.permission.INSTALL_DPC_PACKAGES";
field public static final String INSTALL_DYNAMIC_SYSTEM = "android.permission.INSTALL_DYNAMIC_SYSTEM";
field public static final String INSTALL_GRANT_RUNTIME_PERMISSIONS = "android.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS";
field public static final String INSTALL_LOCATION_TIME_ZONE_PROVIDER_SERVICE = "android.permission.INSTALL_LOCATION_TIME_ZONE_PROVIDER_SERVICE";

View File

@@ -4215,6 +4215,16 @@
<permission android:name="android.permission.INSTALL_TEST_ONLY_PACKAGE"
android:protectionLevel="signature" />
<!-- @SystemApi Allows an application to install DPCs only, an application is
considered a DPC if it has a {@link android.app.admin.DeviceAdminReceiver}
protected by {@link android.Manifest.permission#BIND_DEVICE_ADMIN).
This is a limited version of
{@link android.Manifest.permission#INSTALL_PACKAGES}.
@hide
-->
<permission android:name="android.permission.INSTALL_DPC_PACKAGES"
android:protectionLevel="signature|role" />
<!-- Allows an application to use System Data Loaders.
<p>Not for use by third-party applications.
@hide

View File

@@ -162,6 +162,7 @@
<uses-permission android:name="android.permission.SET_ORIENTATION" />
<uses-permission android:name="android.permission.INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.INSTALL_PACKAGE_UPDATES" />
<uses-permission android:name="android.permission.INSTALL_DPC_PACKAGES" />
<uses-permission android:name="com.android.permission.USE_INSTALLER_V2" />
<uses-permission android:name="android.permission.INSTALL_TEST_ONLY_PACKAGE" />
<uses-permission android:name="com.android.permission.USE_SYSTEM_DATA_LOADERS" />