diff options
| author | 2021-02-08 17:40:18 +0000 | |
|---|---|---|
| committer | 2021-02-10 17:58:50 +0000 | |
| commit | 9b6b3d94456b82146d1641b3fcc8639a0172e288 (patch) | |
| tree | 5a6be2fc51e0aad4962e9613fcd32be157ae4cfd | |
| parent | 4512e77b7c2abd979822c7da0eb0bc3e26be8ede (diff) | |
Add new permission KEEP_UNINSTALLED_PACKAGES
Created a new permission KEEP_UNINSTALLED_PACKAGES and
granted it to shell, this new permission will be used to expose
PM#setKeepUninstalledPackages as a testAPI, this is needed
to enable the new testing infrastructure to reinstall
removed packages between test runs as part of the state resetting.
Bug: 179682115
Test: atest PermissionPolicyTest#platformPermissionPolicyIsUnaltered
Merged-In: I2b262f3694478631d657cdbf088b6511072d4ff3
Change-Id: I2b262f3694478631d657cdbf088b6511072d4ff3
| -rw-r--r-- | core/api/test-current.txt | 1 | ||||
| -rw-r--r-- | core/res/AndroidManifest.xml | 5 | ||||
| -rw-r--r-- | packages/Shell/AndroidManifest.xml | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/core/api/test-current.txt b/core/api/test-current.txt index 668b5883cbfb..786eab212aed 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -12,6 +12,7 @@ package android { field public static final String CONFIGURE_DISPLAY_BRIGHTNESS = "android.permission.CONFIGURE_DISPLAY_BRIGHTNESS"; field public static final String CONTROL_DEVICE_LIGHTS = "android.permission.CONTROL_DEVICE_LIGHTS"; field public static final String FORCE_STOP_PACKAGES = "android.permission.FORCE_STOP_PACKAGES"; + 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"; field public static final String MANAGE_ROLLBACKS = "android.permission.MANAGE_ROLLBACKS"; diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index af6b97318103..43c87892c97b 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -3797,6 +3797,11 @@ <permission android:name="android.permission.MOVE_PACKAGE" android:protectionLevel="signature|privileged" /> + <!-- @TestApi Allows an application to keep uninstalled packages as apks. + @hide --> + <permission android:name="android.permission.KEEP_UNINSTALLED_PACKAGES" + android:protectionLevel="signature" /> + <!-- Allows an application to change whether an application component (other than its own) is enabled or not. <p>Not for use by third-party applications. --> diff --git a/packages/Shell/AndroidManifest.xml b/packages/Shell/AndroidManifest.xml index 39be9cbff40d..e6f726a76302 100644 --- a/packages/Shell/AndroidManifest.xml +++ b/packages/Shell/AndroidManifest.xml @@ -87,6 +87,7 @@ <!-- 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.MOVE_PACKAGE" /> + <uses-permission android:name="android.permission.KEEP_UNINSTALLED_PACKAGES" /> <uses-permission android:name="android.permission.CLEAR_APP_USER_DATA" /> <uses-permission android:name="android.permission.CLEAR_APP_CACHE" /> <uses-permission android:name="android.permission.ACCESS_INSTANT_APPS" /> |