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

Commit c9464617 authored by Diksha Gohlyan's avatar Diksha Gohlyan
Browse files

Check Read permissions when getDocumentMetadata

Test: manually tested
Bug: 151095863

Change-Id: I4f04f08f76d039196c2c67bac80d4a46ebec87f2
(cherry picked from commit 0e758099)
parent 246360bf
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -1144,6 +1144,8 @@ public abstract class DocumentsProvider extends ContentProvider {


            out.putParcelable(DocumentsContract.EXTRA_RESULT, path);
            out.putParcelable(DocumentsContract.EXTRA_RESULT, path);
        } else if (METHOD_GET_DOCUMENT_METADATA.equals(method)) {
        } else if (METHOD_GET_DOCUMENT_METADATA.equals(method)) {
            enforceReadPermissionInner(documentUri, getCallingPackage(),
                    getCallingAttributionTag(), null);
            return getDocumentMetadata(documentId);
            return getDocumentMetadata(documentId);
        } else {
        } else {
            throw new UnsupportedOperationException("Method not supported " + method);
            throw new UnsupportedOperationException("Method not supported " + method);