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

Commit 1d2618fb authored by Jackal Guo's avatar Jackal Guo Committed by Automerger Merge Worker
Browse files

Merge "Enfore cross-user permission to getPackagesForUid" into sc-dev am: ca139c0f

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I81d57b13b7cbdf9f8911f9acf5ca495d37debc0f
parents e83e85ad ca139c0f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -9167,6 +9167,11 @@ public class PackageManagerService extends IPackageManager.Stub
     */
    @Override
    public String[] getPackagesForUid(int uid) {
        final int callingUid = Binder.getCallingUid();
        final int userId = UserHandle.getUserId(uid);
        enforceCrossUserOrProfilePermission(callingUid, userId,
                /* requireFullPermission */ false,
                /* checkShell */ false, "getPackagesForUid");
        return snapshotComputer().getPackagesForUid(uid);
    }