OSDN Git Service

DO NOT MERGE: Fix CTS regression
authorSungsoo Lim <sungsoo@google.com>
Mon, 25 Jul 2016 02:53:13 +0000 (11:53 +0900)
committergitbuildkicker <android-build@google.com>
Mon, 1 Aug 2016 21:25:24 +0000 (14:25 -0700)
Bug: 30297223, Bug: 30437363
Change-Id: I7b18af40e4eac2713577204428fbfb96cc346582

media/java/android/media/ExifInterface.java

index c5e978f..74bb55b 100644 (file)
@@ -1330,12 +1330,12 @@ public class ExifInterface {
      * determine whether the image data format is JPEG or not.
      */
     private void loadAttributes() throws IOException {
+        // Initialize mAttributes.
+        for (int i = 0; i < EXIF_TAGS.length; ++i) {
+            mAttributes[i] = new HashMap();
+        }
         try {
             InputStream in = new FileInputStream(mFilename);
-            // Initialize mAttributes.
-            for (int i = 0; i < EXIF_TAGS.length; ++i) {
-                mAttributes[i] = new HashMap();
-            }
             getJpegAttributes(in);
         } catch (IOException e) {
             // Ignore exceptions in order to keep the compatibility with the old versions of