Merge "[Rlog19] ResearchLog remove unnecessary logSegment{start,end}"
commit
f0d626ecfc
|
@ -110,4 +110,8 @@ public class LogBuffer {
|
||||||
}
|
}
|
||||||
return logUnit;
|
return logUnit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return mLogUnits.isEmpty();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -706,6 +706,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
|
||||||
/* package for test */ void publishLogBuffer(final LogBuffer logBuffer,
|
/* package for test */ void publishLogBuffer(final LogBuffer logBuffer,
|
||||||
final ResearchLog researchLog, final boolean isIncludingPrivateData) {
|
final ResearchLog researchLog, final boolean isIncludingPrivateData) {
|
||||||
final LogUnit openingLogUnit = new LogUnit();
|
final LogUnit openingLogUnit = new LogUnit();
|
||||||
|
if (logBuffer.isEmpty()) return;
|
||||||
openingLogUnit.addLogStatement(LOGSTATEMENT_LOG_SEGMENT_OPENING, SystemClock.uptimeMillis(),
|
openingLogUnit.addLogStatement(LOGSTATEMENT_LOG_SEGMENT_OPENING, SystemClock.uptimeMillis(),
|
||||||
isIncludingPrivateData);
|
isIncludingPrivateData);
|
||||||
researchLog.publish(openingLogUnit, true /* isIncludingPrivateData */);
|
researchLog.publish(openingLogUnit, true /* isIncludingPrivateData */);
|
||||||
|
|
Loading…
Reference in New Issue