Merge "Adds caller check to getAllPackages()" into pi-dev am: 7905a07048
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13618271 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I329f1ec46c79da6892e3e444317e7b0b2e77d62a
This commit is contained in:
@@ -6334,6 +6334,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) {
|
||||
|
||||
Reference in New Issue
Block a user