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

Commit 56e0f961 authored by Steve McKay's avatar Steve McKay
Browse files

Address followup comments on ag/2665451

Test: Manual
Change-Id: I536ffe078ba02f22bba32b42f6aff05d30e8891c
parent a48df2f6
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -152,8 +152,8 @@ public class ArchivesProvider extends DocumentsProvider {
    public @Nullable Bundle getDocumentMetadata(String documentId)
            throws FileNotFoundException {

        Archive archive = getLoaderOrThrow(documentId).get();
        String mimeType = archive.getDocumentType(documentId);
        final Archive archive = getLoaderOrThrow(documentId).get();
        final String mimeType = archive.getDocumentType(documentId);

        if (!MetadataReader.isSupportedMimeType(mimeType)) {
            return null;
@@ -163,11 +163,11 @@ public class ArchivesProvider extends DocumentsProvider {
        try {
            stream = new ParcelFileDescriptor.AutoCloseInputStream(
                    openDocument(documentId, "r", null));
            Bundle metadata = new Bundle();
            final Bundle metadata = new Bundle();
            MetadataReader.getMetadata(metadata, stream, mimeType, null);
            return metadata;
        } catch (IOException e) {
            Log.e(TAG, "An error occurred retrieving the metadata", e);
            Log.e(TAG, "An error occurred retrieving the metadata.", e);
            return null;
        } finally {
            IoUtils.closeQuietly(stream);