summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorRay Chen <raychen@google.com>2010-03-12 11:38:04 -0800
committerRay Chen <raychen@google.com>2010-03-15 10:45:35 -0700
commit74d4843641ca1f810e27989873697cba1f41338a (patch)
tree622138e7132ebacb6ac8b72a6dcea70a1c78d6f4 /media
parent7d740861415523feb239d94d805fa985835663c0 (diff)
downloadframeworks_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.java2
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;