Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5d1a7b14 authored by kholoud mohamed's avatar kholoud mohamed
Browse files

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
Change-Id: I2b262f3694478631d657cdbf088b6511072d4ff3
parent e1891e1e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ package android {
    field public static final String CONTROL_DEVICE_LIGHTS = "android.permission.CONTROL_DEVICE_LIGHTS";
    field public static final String CONTROL_DEVICE_STATE = "android.permission.CONTROL_DEVICE_STATE";
    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 @Deprecated public static final String MANAGE_ACTIVITY_STACKS = "android.permission.MANAGE_ACTIVITY_STACKS";
    field public static final String MANAGE_ACTIVITY_TASKS = "android.permission.MANAGE_ACTIVITY_TASKS";
    field public static final String MANAGE_CRATES = "android.permission.MANAGE_CRATES";
+5 −0
Original line number Diff line number Diff line
@@ -3994,6 +3994,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. -->
+1 −0
Original line number Diff line number Diff line
@@ -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" />