am 211103d7: [Rlog58a] Fix privacy leak of word in logUnitStart
* commit '211103d7fecc3d6df116ec677ae88cb6d70cce86': [Rlog58a] Fix privacy leak of word in logUnitStartmain
commit
ef243ffa1a
|
@ -133,7 +133,7 @@ import java.util.Map;
|
||||||
// will not have been opened for writing.
|
// will not have been opened for writing.
|
||||||
if (jsonWriter == null) {
|
if (jsonWriter == null) {
|
||||||
jsonWriter = researchLog.getValidJsonWriterLocked();
|
jsonWriter = researchLog.getValidJsonWriterLocked();
|
||||||
outputLogUnitStart(jsonWriter);
|
outputLogUnitStart(jsonWriter, isIncludingPrivateData);
|
||||||
}
|
}
|
||||||
outputLogStatementToLocked(jsonWriter, mLogStatementList.get(i), mValuesList.get(i),
|
outputLogStatementToLocked(jsonWriter, mLogStatementList.get(i), mValuesList.get(i),
|
||||||
mTimeList.get(i));
|
mTimeList.get(i));
|
||||||
|
@ -169,11 +169,14 @@ import java.util.Map;
|
||||||
private static final String LOG_UNIT_BEGIN_KEY = "logUnitStart";
|
private static final String LOG_UNIT_BEGIN_KEY = "logUnitStart";
|
||||||
private static final String LOG_UNIT_END_KEY = "logUnitEnd";
|
private static final String LOG_UNIT_END_KEY = "logUnitEnd";
|
||||||
|
|
||||||
private void outputLogUnitStart(final JsonWriter jsonWriter) {
|
private void outputLogUnitStart(final JsonWriter jsonWriter,
|
||||||
|
final boolean isIncludingPrivateData) {
|
||||||
try {
|
try {
|
||||||
jsonWriter.beginObject();
|
jsonWriter.beginObject();
|
||||||
jsonWriter.name(CURRENT_TIME_KEY).value(System.currentTimeMillis());
|
jsonWriter.name(CURRENT_TIME_KEY).value(System.currentTimeMillis());
|
||||||
|
if (isIncludingPrivateData) {
|
||||||
jsonWriter.name(WORD_KEY).value(getWord());
|
jsonWriter.name(WORD_KEY).value(getWord());
|
||||||
|
}
|
||||||
jsonWriter.name(EVENT_TYPE_KEY).value(LOG_UNIT_BEGIN_KEY);
|
jsonWriter.name(EVENT_TYPE_KEY).value(LOG_UNIT_BEGIN_KEY);
|
||||||
jsonWriter.endObject();
|
jsonWriter.endObject();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
Loading…
Reference in New Issue