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

Commit 6683494c authored by insight.lee's avatar insight.lee Committed by android-build-merger
Browse files

Merge "Allow ManagedProvisioning to silently uninstall apps"

am: cfc68b66

Change-Id: I2fed72cf026733b8976b4b8a113d1eb0db27fcaa
parents a7d45cf3 cfc68b66
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
package com.android.server.pm;
import static android.Manifest.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS;
import static android.Manifest.permission.READ_EXTERNAL_STORAGE;
import static android.Manifest.permission.WRITE_EXTERNAL_STORAGE;
import static android.Manifest.permission.WRITE_MEDIA_STORAGE;
@@ -15627,6 +15628,14 @@ public class PackageManagerService extends IPackageManager.Stub {
                callingUid == getPackageUid(mStorageManagerPackage, 0, callingUserId)) {
            return true;
        }
        // Allow caller having MANAGE_PROFILE_AND_DEVICE_OWNERS permission to silently
        // uninstall for device owner provisioning.
        if (checkUidPermission(MANAGE_PROFILE_AND_DEVICE_OWNERS, callingUid)
                == PERMISSION_GRANTED) {
            return true;
        }
        return false;
    }