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

Commit a2dff5f2 authored by Olivier Nshimiye's avatar Olivier Nshimiye Committed by Android (Google) Code Review
Browse files

Merge "Remove the userId before doing authority check in case of...

Merge "Remove the userId before doing authority check in case of cross-profiles uri checks" into main
parents 1b740560 13bebff1
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1124,12 +1124,13 @@ public abstract class DocumentsProvider extends ContentProvider {
        }

        final Uri documentUri = extraUri;
        final String authority = documentUri.getAuthority();
        final String authorityWithoutUserId = getAuthorityWithoutUserId(documentUri.getAuthority());
        final String documentId = DocumentsContract.getDocumentId(documentUri);

        if (!mAuthority.equals(authority)) {
        if (!mAuthority.equals(authorityWithoutUserId)) {
            throw new SecurityException(
                    "Requested authority " + authority + " doesn't match provider " + mAuthority);
                    "Requested authority " + authorityWithoutUserId + " doesn't match provider "
                            + mAuthority);
        }

        if (METHOD_IS_CHILD_DOCUMENT.equals(method)) {