Merge "Enfore cross user permission to getPackagesForUid" into sc-dev
This commit is contained in:
@@ -3622,6 +3622,8 @@ public class PackageManagerService extends IPackageManager.Stub
|
||||
final boolean isCallerInstantApp = getInstantAppPackageName(callingUid) != null;
|
||||
final int userId = UserHandle.getUserId(uid);
|
||||
final int appId = UserHandle.getAppId(uid);
|
||||
enforceCrossUserPermission(callingUid, userId,
|
||||
/* requireFullPermission */ false, /* checkShell */ false, "getPackagesForUid");
|
||||
return getPackagesForUidInternalBody(callingUid, userId, appId, isCallerInstantApp);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user