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

Commit 0e758099 authored by Diksha Gohlyan's avatar Diksha Gohlyan
Browse files

Check Read permissions when getDocumentMetadata

Test: not tested
Bug: 151095863

Change-Id: I4f04f08f76d039196c2c67bac80d4a46ebec87f2
parent aa9d95ed
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1274,6 +1274,8 @@ public abstract class DocumentsProvider extends ContentProvider {

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