Merge "DO NOT MERGE Fix security exception due to incorrect flags" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
9f1885dee8
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user