diff options
author | Ruben Brunk <rubenbrunk@google.com> | 2013-01-15 17:23:40 -0800 |
---|---|---|
committer | Ruben Brunk <rubenbrunk@google.com> | 2013-01-15 17:27:03 -0800 |
commit | ec965b6ca57d3422e50bc1a476e0ff046f768ef5 (patch) | |
tree | 75606afb16a33aa925ffe305db58b24f76ecc671 /gallerycommon/src/com/android/gallery3d/exif | |
parent | 9095cf465e3dc55d26cc4f4cc45dc60442868f14 (diff) | |
download | android_packages_apps_Snap-ec965b6ca57d3422e50bc1a476e0ff046f768ef5.tar.gz android_packages_apps_Snap-ec965b6ca57d3422e50bc1a476e0ff046f768ef5.tar.bz2 android_packages_apps_Snap-ec965b6ca57d3422e50bc1a476e0ff046f768ef5.zip |
Fix exif data saving for picasa images.
Bug: 7910836
Change-Id: I8ec1a1ab379c35b0602689a8f7850f5c861e0189
Diffstat (limited to 'gallerycommon/src/com/android/gallery3d/exif')
-rw-r--r-- | gallerycommon/src/com/android/gallery3d/exif/ExifParser.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gallerycommon/src/com/android/gallery3d/exif/ExifParser.java b/gallerycommon/src/com/android/gallery3d/exif/ExifParser.java index a1ce13e69..1e4803f68 100644 --- a/gallerycommon/src/com/android/gallery3d/exif/ExifParser.java +++ b/gallerycommon/src/com/android/gallery3d/exif/ExifParser.java @@ -179,6 +179,9 @@ public class ExifParser { private ExifParser(InputStream inputStream, int options) throws IOException, ExifInvalidFormatException { + if (inputStream == null) { + throw new IOException("Null argument inputStream to ExifParser"); + } mContainExifData = seekTiffData(inputStream); mTiffStream = new CountedDataInputStream(inputStream); mOptions = options; @@ -682,7 +685,6 @@ public class ExifParser { private boolean seekTiffData(InputStream inputStream) throws IOException, ExifInvalidFormatException { CountedDataInputStream dataStream = new CountedDataInputStream(inputStream); - if (dataStream.readShort() != JpegHeader.SOI) { throw new ExifInvalidFormatException("Invalid JPEG format"); } |