OSDN Git Service

Wire thumbnails in archives in ExternalStorageProvider.
authorTomasz Mikolajewski <mtomasz@google.com>
Tue, 22 Dec 2015 02:14:35 +0000 (11:14 +0900)
committerTomasz Mikolajewski <mtomasz@google.com>
Tue, 22 Dec 2015 04:00:04 +0000 (13:00 +0900)
Bug: 20176812
Change-Id: Ibf421df1c26583b4b7c3a8516eac79ea0ef31ec3

packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java

index bc09f3a..c6e5531 100644 (file)
@@ -579,6 +579,10 @@ public class ExternalStorageProvider extends DocumentsProvider {
     public AssetFileDescriptor openDocumentThumbnail(
             String documentId, Point sizeHint, CancellationSignal signal)
             throws FileNotFoundException {
+        if (mArchiveHelper.isArchivedDocument(documentId)) {
+            return mArchiveHelper.openDocumentThumbnail(documentId, sizeHint, signal);
+        }
+
         final File file = getFileForDocId(documentId);
         return DocumentsContract.openImageThumbnail(file);
     }