diff options
author | Earl Ou <shunhsingou@google.com> | 2012-10-19 20:23:28 +0800 |
---|---|---|
committer | Earl Ou <shunhsingou@google.com> | 2012-11-07 09:38:51 +0800 |
commit | 24bc9e24af37b2d0564a2503e32910b8ff82b96b (patch) | |
tree | dd3c41b3b4abf35265cc4dfb7aeb2c724a7ed5e1 /tests | |
parent | b7dbeb1619552baed1489d8a6417e4a40873130a (diff) | |
download | android_packages_apps_Snap-24bc9e24af37b2d0564a2503e32910b8ff82b96b.tar.gz android_packages_apps_Snap-24bc9e24af37b2d0564a2503e32910b8ff82b96b.tar.bz2 android_packages_apps_Snap-24bc9e24af37b2d0564a2503e32910b8ff82b96b.zip |
ignore image with invalid thumbnail type in Exif test
Change-Id: I6fc3a2dde4caf881b3b63aa95f1997ee9ccd4dbc
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/android/gallery3d/exif/ExifReaderTest.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/src/com/android/gallery3d/exif/ExifReaderTest.java b/tests/src/com/android/gallery3d/exif/ExifReaderTest.java index 404946252..9916cd3ab 100644 --- a/tests/src/com/android/gallery3d/exif/ExifReaderTest.java +++ b/tests/src/com/android/gallery3d/exif/ExifReaderTest.java @@ -49,13 +49,13 @@ public class ExifReaderTest extends ExifXmlDataTestCase { private void checkThumbnail(ExifData exifData) { IfdData ifd1 = exifData.getIfdData(IfdId.TYPE_IFD_1); if (ifd1 != null) { - if (ifd1.getTag(ExifTag.TAG_COMPRESSION).getUnsignedShort(0) == - ExifTag.Compression.JPEG) { + int type = ifd1.getTag(ExifTag.TAG_COMPRESSION).getUnsignedShort(0); + if (type == ExifTag.Compression.JPEG) { assertTrue(getImageTitle(), exifData.hasCompressedThumbnail()); byte[] thumbnail = exifData.getCompressedThumbnail(); assertTrue(getImageTitle(), BitmapFactory.decodeByteArray(thumbnail, 0, thumbnail.length) != null); - } else { + } else if (type == ExifTag.Compression.UNCOMPRESSION) { // Try to check the strip count with the formula provided by EXIF spec. int planarType = ExifTag.PlanarConfiguration.CHUNKY; ExifTag planarTag = ifd1.getTag(ExifTag.TAG_PLANAR_CONFIGURATION); |