Skip to content

Commit 5c6912c

Browse files
Dianne HackbornAndroid (Google) Code Review
authored andcommitted
Merge "Fix permission check on ContentProvider to be multi-user aware." into jb-mr1-dev
2 parents 14e883b + 0d8af78 commit 5c6912c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/java/android/content/ContentProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ private void enforceReadPermission(Uri uri) throws SecurityException {
279279
final int uid = Binder.getCallingUid();
280280
String missingPerm = null;
281281

282-
if (uid == mMyUid) {
282+
if (UserHandle.isSameApp(uid, mMyUid)) {
283283
return;
284284
}
285285

@@ -340,7 +340,7 @@ private void enforceWritePermission(Uri uri) throws SecurityException {
340340
final int uid = Binder.getCallingUid();
341341
String missingPerm = null;
342342

343-
if (uid == mMyUid) {
343+
if (UserHandle.isSameApp(uid, mMyUid)) {
344344
return;
345345
}
346346

0 commit comments

Comments
 (0)