• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

frameworks/base


Commit MetaInfo

Revision81a958fc287bc8b1c0601960f466828f4abb0c2c (tree)
Time2016-11-04 05:59:59
AuthorSungsoo <sungsoo@goog...>
Commitergitbuildkicker

Log Message

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

Bug: 32068647, Bug: 30936376
Change-Id: I22fa2384348c890ca726d2b1632cd54e59d25a8f
(cherry picked from commit cb17930077de640411407636eebc000e2d06dd9c)

Change Summary

Incremental Difference

--- a/media/java/android/media/ExifInterface.java
+++ b/media/java/android/media/ExifInterface.java
@@ -1335,8 +1335,9 @@ public class ExifInterface {
13351335 for (int i = 0; i < EXIF_TAGS.length; ++i) {
13361336 mAttributes[i] = new HashMap();
13371337 }
1338+ InputStream in = null;
13381339 try {
1339- InputStream in = new FileInputStream(mFilename);
1340+ in = new FileInputStream(mFilename);
13401341 getJpegAttributes(in);
13411342 mIsSupportedFile = true;
13421343 } catch (IOException e) {
@@ -1349,6 +1350,7 @@ public class ExifInterface {
13491350 if (DEBUG) {
13501351 printAttributes();
13511352 }
1353+ IoUtils.closeQuietly(in);
13521354 }
13531355 }
13541356