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

Commit f6c8169a authored by Amith Yamasani's avatar Amith Yamasani Committed by Android Git Automerger
Browse files

am 26d8d1d5: Merge "Fix singleUser provider grants" into lmp-mr1-dev automerge: 775d104d

* commit '26d8d1d5':
  Fix singleUser provider grants
parents 22254f50 26d8d1d5
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;
        }