diff options
| author | Julian Mancini <dooper@google.com> | 2017-08-31 21:11:16 +0000 |
|---|---|---|
| committer | android-build-merger <android-build-merger@google.com> | 2017-08-31 21:11:16 +0000 |
| commit | 831458a65ab2930d58e896110931e836ea2cc501 (patch) | |
| tree | 1b14cea40046b3808210acf998da24d423d704ea /core/java | |
| parent | 5e83878e76d2e73b5920f988403973fce831fa39 (diff) | |
| parent | 30175b958eca1663a5c55e3ae6a20be3fc4b7705 (diff) | |
Remove PDF Thumbnail functionality
am: 30175b958e
Change-Id: Id58212dce0b51eada2a31936f1614d773d89ecad
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/com/android/internal/content/FileSystemProvider.java | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/core/java/com/android/internal/content/FileSystemProvider.java b/core/java/com/android/internal/content/FileSystemProvider.java index 17a598a00ca9..4b80a5ff03de 100644 --- a/core/java/com/android/internal/content/FileSystemProvider.java +++ b/core/java/com/android/internal/content/FileSystemProvider.java @@ -28,7 +28,6 @@ import android.database.MatrixCursor.RowBuilder; import android.graphics.Point; import android.net.Uri; import android.os.Binder; -import android.os.Build; import android.os.Bundle; import android.os.CancellationSignal; import android.os.FileObserver; @@ -74,7 +73,6 @@ public abstract class FileSystemProvider extends DocumentsProvider { private Handler mHandler; - private static final String MIMETYPE_PDF = "application/pdf"; private static final String MIMETYPE_JPEG = "image/jpeg"; @@ -425,13 +423,6 @@ public abstract class FileSystemProvider extends DocumentsProvider { String documentId, Point sizeHint, CancellationSignal signal) throws FileNotFoundException { final File file = getFileForDocId(documentId); - if (getTypeForFile(file).equals(MIMETYPE_PDF)) { - try { - return PdfUtils.openPdfThumbnail(file, sizeHint); - } catch (Exception e) { - Log.v(TAG, "Could not load PDF's thumbnail", e); - } - } return DocumentsContract.openImageThumbnail(file); } @@ -461,10 +452,7 @@ public abstract class FileSystemProvider extends DocumentsProvider { final String mimeType = getTypeForFile(file); final String displayName = file.getName(); - // As of right now, we aren't sure on the performance affect of loading all PDF Thumbnails - // Until a solution is found, it will be behind a debuggable flag. - if (mimeType.startsWith("image/") - || (mimeType.equals(MIMETYPE_PDF) && Build.IS_DEBUGGABLE)) { + if (mimeType.startsWith("image/")) { flags |= Document.FLAG_SUPPORTS_THUMBNAIL; } |
