Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 761a1ed3 authored by Sungsoo's avatar Sungsoo Committed by android-build-merger
Browse files

DO NOT MERGE) ExifInterface: Close the file when an exception happens

am: cb179300

Change-Id: I4b8f9270f75800e1390c3a840b41316c20ea4aa8
parents 13fdd922 cb179300
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -1335,8 +1335,9 @@ public class ExifInterface {
        for (int i = 0; i < EXIF_TAGS.length; ++i) {
        for (int i = 0; i < EXIF_TAGS.length; ++i) {
            mAttributes[i] = new HashMap();
            mAttributes[i] = new HashMap();
        }
        }
        InputStream in = null;
        try {
        try {
            InputStream in = new FileInputStream(mFilename);
            in = new FileInputStream(mFilename);
            getJpegAttributes(in);
            getJpegAttributes(in);
            mIsSupportedFile = true;
            mIsSupportedFile = true;
        } catch (IOException e) {
        } catch (IOException e) {
@@ -1349,6 +1350,7 @@ public class ExifInterface {
            if (DEBUG) {
            if (DEBUG) {
                printAttributes();
                printAttributes();
            }
            }
            IoUtils.closeQuietly(in);
        }
        }
    }
    }