summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author kholoud mohamed <kholoudm@google.com> 2021-04-09 13:45:17 +0100
committer kholoud mohamed <kholoudm@google.com> 2021-04-28 10:32:03 +0100
commitf01ffd8b53e9155f53b0c529aecc2481a999d4f1 (patch)
tree454c34cc4032febb1620a41925c4af855fed9f38
parent3164fcbb4cd50b02452aa99cb1a171e44705ac13 (diff)
Add a new permission to install testOnly apps
Added a new permission INSTALL_TEST_ONLY_PACKAGE and granted it to shell, this will allow installing testOnly apps from a testAPI. Test: N/A Bug: 183716601 Merged-In: I047a4013fb3462db3487eab2d1635ea75ae29264 Change-Id: I047a4013fb3462db3487eab2d1635ea75ae29264
-rw-r--r--core/api/test-current.txt1
-rw-r--r--core/res/AndroidManifest.xml7
-rw-r--r--packages/Shell/AndroidManifest.xml1
3 files changed, 9 insertions, 0 deletions
diff --git a/core/api/test-current.txt b/core/api/test-current.txt
index fd6d47e56b52..ebee9ded1619 100644
--- a/core/api/test-current.txt
+++ b/core/api/test-current.txt
@@ -14,6 +14,7 @@ package android {
field public static final String CONTROL_DEVICE_LIGHTS = "android.permission.CONTROL_DEVICE_LIGHTS";
field public static final String FORCE_DEVICE_POLICY_MANAGER_LOGS = "android.permission.FORCE_DEVICE_POLICY_MANAGER_LOGS";
field public static final String FORCE_STOP_PACKAGES = "android.permission.FORCE_STOP_PACKAGES";
+ field public static final String INSTALL_TEST_ONLY_PACKAGE = "android.permission.INSTALL_TEST_ONLY_PACKAGE";
field public static final String KEEP_UNINSTALLED_PACKAGES = "android.permission.KEEP_UNINSTALLED_PACKAGES";
field public static final String MANAGE_ACTIVITY_STACKS = "android.permission.MANAGE_ACTIVITY_STACKS";
field public static final String MANAGE_CRATES = "android.permission.MANAGE_CRATES";
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index cc4e2bb59787..357f427b428c 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -3792,6 +3792,13 @@
<permission android:name="com.android.permission.USE_INSTALLER_V2"
android:protectionLevel="signature|verifier" />
+ <!-- @TestApi Allows a testOnly application to get installed.
+ <p>Not for use by third-party applications.
+ @hide
+ -->
+ <permission android:name="android.permission.INSTALL_TEST_ONLY_PACKAGE"
+ android:protectionLevel="signature" />
+
<!-- @SystemApi @TestApi Allows an application to clear user data.
<p>Not for use by third-party applications
@hide
diff --git a/packages/Shell/AndroidManifest.xml b/packages/Shell/AndroidManifest.xml
index 4a64d6b2ff95..27df92f0832b 100644
--- a/packages/Shell/AndroidManifest.xml
+++ b/packages/Shell/AndroidManifest.xml
@@ -155,6 +155,7 @@
<uses-permission android:name="android.permission.INSTALL_PACKAGES" />
<!-- TODO(b/152310230): remove once APIs are confirmed to be sufficient -->
<uses-permission android:name="com.android.permission.USE_INSTALLER_V2" />
+ <uses-permission android:name="android.permission.INSTALL_TEST_ONLY_PACKAGE" />
<uses-permission android:name="android.permission.MOVE_PACKAGE" />
<uses-permission android:name="android.permission.KEEP_UNINSTALLED_PACKAGES" />
<uses-permission android:name="android.permission.CLEAR_APP_USER_DATA" />