am bc853c03: Merge "Close file on exception as well" into ics-mr1

* commit 'bc853c0344b2bbe6f94f425cd0fb1d2642c0fa2f':
  Close file on exception as well
This commit is contained in:
Kenny Root
2011-11-10 21:20:28 +00:00
committed by Android Git Automerger

View File

@ -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();
}