diff options
author | Kenny Root <kroot@google.com> | 2011-11-10 13:18:24 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-11-10 13:18:24 -0800 |
commit | bc853c0344b2bbe6f94f425cd0fb1d2642c0fa2f (patch) | |
tree | 450347121b12945af2c21b7375050dd401ecdab6 /services | |
parent | faa81c82103e89a3f2c86c4e737d9beb7e557402 (diff) | |
parent | 62539e9efa02c4037d3310a8b4f16f0085cd8c37 (diff) | |
download | frameworks_base-bc853c0344b2bbe6f94f425cd0fb1d2642c0fa2f.zip frameworks_base-bc853c0344b2bbe6f94f425cd0fb1d2642c0fa2f.tar.gz frameworks_base-bc853c0344b2bbe6f94f425cd0fb1d2642c0fa2f.tar.bz2 |
Merge "Close file on exception as well" into ics-mr1
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/pm/Settings.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/services/java/com/android/server/pm/Settings.java b/services/java/com/android/server/pm/Settings.java index bfe6613..36442a0 100644 --- a/services/java/com/android/server/pm/Settings.java +++ b/services/java/com/android/server/pm/Settings.java @@ -63,6 +63,8 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; +import libcore.io.IoUtils; + /** * Holds information about dynamic settings. */ @@ -998,8 +1000,8 @@ final class Settings { FileUtils.sync(fstr); str.close(); journal.commit(); - } - catch (Exception e) { + } catch (Exception e) { + IoUtils.closeQuietly(str); journal.rollback(); } |