Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 775d104d authored by Amith Yamasani's avatar Amith Yamasani Committed by Android (Google) Code Review
Browse files

Merge "Fix singleUser provider grants" into lmp-mr1-dev

parents 7b1b0f63 7d2d4fd5
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -515,7 +515,10 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
        }

        // last chance, check against any uri grants
        if (context.checkUriPermission(uri, pid, uid, Intent.FLAG_GRANT_READ_URI_PERMISSION)
        final int callingUserId = UserHandle.getUserId(uid);
        final Uri userUri = (mSingleUser && !UserHandle.isSameUser(mMyUid, uid))
                ? maybeAddUserId(uri, callingUserId) : uri;
        if (context.checkUriPermission(userUri, pid, uid, Intent.FLAG_GRANT_READ_URI_PERMISSION)
                == PERMISSION_GRANTED) {
            return;
        }