am 64c34122: Merge "[TestPrep11] Only use mHasWrittenData to control JsonWriter#endArray() call"

* commit '64c34122f26f58a621ca9e2f9258ab47d99a1178':
  [TestPrep11] Only use mHasWrittenData to control JsonWriter#endArray() call
main
Kurt Partridge 2013-02-26 16:43:21 -08:00 committed by Android Git Automerger
commit 14de0d22ab
1 changed files with 5 additions and 9 deletions

View File

@ -107,16 +107,12 @@ public class ResearchLog {
try { try {
if (mHasWrittenData) { if (mHasWrittenData) {
mJsonWriter.endArray(); mJsonWriter.endArray();
mJsonWriter.flush();
mJsonWriter.close();
if (DEBUG) {
Log.d(TAG, "wrote log to " + mFile);
}
mHasWrittenData = false; mHasWrittenData = false;
} else { }
if (DEBUG) { mJsonWriter.flush();
Log.d(TAG, "close() called, but no data, not outputting"); mJsonWriter.close();
} if (DEBUG) {
Log.d(TAG, "wrote log to " + mFile);
} }
} catch (Exception e) { } catch (Exception e) {
Log.d(TAG, "error when closing ResearchLog:", e); Log.d(TAG, "error when closing ResearchLog:", e);