Merge "Adds caller check to getAllPackages()" into pi-dev am: 7905a07048 am: 9069025b9d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13618271 Change-Id: Ibb65b9ccc6d195ed36ecf9e65e9311f786fb8dcf
This commit is contained in:
@@ -6376,6 +6376,7 @@ public class PackageManagerService extends IPackageManager.Stub
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> getAllPackages() {
|
public List<String> getAllPackages() {
|
||||||
|
enforceSystemOrRootOrShell("getAllPackages is limited to privileged callers");
|
||||||
final int callingUid = Binder.getCallingUid();
|
final int callingUid = Binder.getCallingUid();
|
||||||
final int callingUserId = UserHandle.getUserId(callingUid);
|
final int callingUserId = UserHandle.getUserId(callingUid);
|
||||||
synchronized (mPackages) {
|
synchronized (mPackages) {
|
||||||
|
|||||||
Reference in New Issue
Block a user