diff options
author | Ray Chen <raychen@google.com> | 2010-03-12 11:38:04 -0800 |
---|---|---|
committer | Ray Chen <raychen@google.com> | 2010-03-15 10:45:35 -0700 |
commit | 74d4843641ca1f810e27989873697cba1f41338a (patch) | |
tree | 622138e7132ebacb6ac8b72a6dcea70a1c78d6f4 /media | |
parent | 7d740861415523feb239d94d805fa985835663c0 (diff) | |
download | frameworks_base-74d4843641ca1f810e27989873697cba1f41338a.zip frameworks_base-74d4843641ca1f810e27989873697cba1f41338a.tar.gz frameworks_base-74d4843641ca1f810e27989873697cba1f41338a.tar.bz2 |
Fix #2509370 ThumbnailUtils.createThumbnailFromEXIF crashes media provider.
Change-Id: Ia2cd00fb0fbdb32e9fb89b4d33ad3c1410eb40d3
Diffstat (limited to 'media')
-rw-r--r-- | media/java/android/media/ThumbnailUtils.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/media/java/android/media/ThumbnailUtils.java b/media/java/android/media/ThumbnailUtils.java index 23f850a..5062e87 100644 --- a/media/java/android/media/ThumbnailUtils.java +++ b/media/java/android/media/ThumbnailUtils.java @@ -568,7 +568,7 @@ public class ThumbnailUtils { fullThumbWidth = fullOptions.outWidth / fullOptions.inSampleSize; // Choose the larger thumbnail as the returning sizedThumbBitmap. - if (exifThumbWidth >= fullThumbWidth) { + if (thumbData != null && exifThumbWidth >= fullThumbWidth) { int width = exifOptions.outWidth; int height = exifOptions.outHeight; exifOptions.inJustDecodeBounds = false; |