Merge "Add back enforceReadPermission for getmetadata" into snap-temp-L95100000592394136

This commit is contained in:
android-build-team Robot
2020-06-10 00:36:45 +00:00
committed by Android (Google) Code Review

View File

@@ -1260,6 +1260,7 @@ public abstract class DocumentsProvider extends ContentProvider {
out.putParcelable(DocumentsContract.EXTRA_RESULT, path);
} else if (METHOD_GET_DOCUMENT_METADATA.equals(method)) {
enforceReadPermissionInner(documentUri, getCallingPackage(), null);
return getDocumentMetadata(documentId);
} else {
throw new UnsupportedOperationException("Method not supported " + method);