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

Commit 7905a070 authored by Patrick Baumann's avatar Patrick Baumann Committed by Android (Google) Code Review
Browse files

Merge "Adds caller check to getAllPackages()" into pi-dev

parents 52e9d8f4 f7efdb42
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5792,6 +5792,7 @@ public class PackageManagerService extends IPackageManager.Stub
    @Override
    public List<String> getAllPackages() {
        enforceSystemOrRootOrShell("getAllPackages is limited to privileged callers");
        final int callingUid = Binder.getCallingUid();
        final int callingUserId = UserHandle.getUserId(callingUid);
        synchronized (mPackages) {