Merge "DO NOT MERGE Fix security exception due to incorrect flags" into pi-dev

This commit is contained in:
TreeHugger Robot
2018-06-06 23:35:13 +00:00
committed by Android (Google) Code Review

View File

@@ -710,7 +710,7 @@ public class UsageStatsService extends SystemService implements
final int callingUid = Binder.getCallingUid();
final int callingUserId = UserHandle.getUserId(callingUid);
if (mPackageManagerInternal.getPackageUid(pkg, PackageManager.MATCH_ANY_USER,
if (mPackageManagerInternal.getPackageUid(pkg, /*flags=*/ 0,
callingUserId) != callingUid) {
throw new SecurityException("Calling uid " + pkg + " cannot query events"
+ "for package " + pkg);