commit | 6f13c43619a3bb777443cb56ee40a9a20aaa9d57 | [log] [tgz] |
---|---|---|
author | Amith Yamasani <yamasani@google.com> | Wed Jun 06 16:54:49 2018 -0700 |
committer | android-build-merger <android-build-merger@google.com> | Wed Jun 06 16:54:49 2018 -0700 |
tree | 9579d514237288b9d42992356420278f8f591857 | |
parent | 6823c8a822167a2a362aaae7ee36644c6de0e309 [diff] | |
parent | 9f1885dee8fe5cbce8f7150ab8b26df6d363ac34 [diff] |
Merge "DO NOT MERGE Fix security exception due to incorrect flags" into pi-dev am: 9f1885dee8 Change-Id: Idb0ba52a58231ce9ede97b158a1cb38d1a9633ae
diff --git a/services/usage/java/com/android/server/usage/UsageStatsService.java b/services/usage/java/com/android/server/usage/UsageStatsService.java index a7d3f78..e6584c5 100644 --- a/services/usage/java/com/android/server/usage/UsageStatsService.java +++ b/services/usage/java/com/android/server/usage/UsageStatsService.java
@@ -710,7 +710,7 @@ 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);