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 | be3c601accdbe98e4ded1b501a2c9a6e118b4fc0 (patch) | |
tree | a6a2adf453284323785806a8e644e6af7b1d8dfc /tests | |
parent | 6c89e5f7f752f6e468f880189dd3267eb96f4058 (diff) | |
download | android_packages_apps_Gallery2-be3c601accdbe98e4ded1b501a2c9a6e118b4fc0.tar.gz android_packages_apps_Gallery2-be3c601accdbe98e4ded1b501a2c9a6e118b4fc0.tar.bz2 android_packages_apps_Gallery2-be3c601accdbe98e4ded1b501a2c9a6e118b4fc0.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); |