am f0d626ec: Merge "[Rlog19] ResearchLog remove unnecessary logSegment{start,end}"

* commit 'f0d626ecfc2fe5123e28622afe87ecd6be8b902e':
  [Rlog19] ResearchLog remove unnecessary logSegment{start,end}
main
Kurt Partridge 2012-12-23 08:30:34 -08:00 committed by Android Git Automerger
commit 7c79713dd8
2 changed files with 5 additions and 0 deletions

View File

@ -110,4 +110,8 @@ public class LogBuffer {
}
return logUnit;
}
public boolean isEmpty() {
return mLogUnits.isEmpty();
}
}

View File

@ -706,6 +706,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
/* package for test */ void publishLogBuffer(final LogBuffer logBuffer,
final ResearchLog researchLog, final boolean isIncludingPrivateData) {
final LogUnit openingLogUnit = new LogUnit();
if (logBuffer.isEmpty()) return;
openingLogUnit.addLogStatement(LOGSTATEMENT_LOG_SEGMENT_OPENING, SystemClock.uptimeMillis(),
isIncludingPrivateData);
researchLog.publish(openingLogUnit, true /* isIncludingPrivateData */);