• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
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

修订版596ffb80bb55a91f80a029c947d09f0911c616a3 (tree)
时间2016-12-13 05:00:56
作者Sungsoo <sungsoo@goog...>
CommiterJessica Wagantall

Log Message

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

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

更改概述

差异

--- 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