Merge "[TestPrep11] Only use mHasWrittenData to control JsonWriter#endArray() call"
This commit is contained in:
commit
64c34122f2
1 changed files with 5 additions and 9 deletions
|
@ -107,16 +107,12 @@ public class ResearchLog {
|
|||
try {
|
||||
if (mHasWrittenData) {
|
||||
mJsonWriter.endArray();
|
||||
mJsonWriter.flush();
|
||||
mJsonWriter.close();
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "wrote log to " + mFile);
|
||||
}
|
||||
mHasWrittenData = false;
|
||||
} else {
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "close() called, but no data, not outputting");
|
||||
}
|
||||
}
|
||||
mJsonWriter.flush();
|
||||
mJsonWriter.close();
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "wrote log to " + mFile);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.d(TAG, "error when closing ResearchLog:", e);
|
||||
|
|
Loading…
Reference in a new issue