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

Commit 2d55bda4 authored by Patrick Baumann's avatar Patrick Baumann Committed by Automerger Merge Worker
Browse files

Merge "Adds caller check to getAllPackages()" into rvc-qpr-dev am: ec4ba204

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13617976

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iceb77ee1f663833202421151654151893b68ea72
parents d3bf1aa2 ec4ba204
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -206,6 +206,12 @@ public class Process {
     */
    public static final int SE_UID = 1068;

    /**
     * Defines the UID/GID for the iorapd.
     * @hide
     */
    public static final int IORAPD_UID = 1071;

    /**
     * Defines the UID/GID for the NetworkStack app.
     * @hide
+4 −0
Original line number Diff line number Diff line
@@ -6205,6 +6205,10 @@ public class PackageManagerService extends IPackageManager.Stub
    @Override
    public List<String> getAllPackages() {
        // Allow iorapd to call this method.
        if (Binder.getCallingUid() != Process.IORAPD_UID) {
            enforceSystemOrRootOrShell("getAllPackages is limited to privileged callers");
        }
        final int callingUid = Binder.getCallingUid();
        final int callingUserId = UserHandle.getUserId(callingUid);
        synchronized (mLock) {