Merge "Fixed event flushing to handle when mDirectServiceInterface is not ready yet." into qt-r1-dev

This commit is contained in:
TreeHugger Robot
2019-06-24 18:42:45 +00:00
committed by Android (Google) Code Review

View File

@@ -428,14 +428,16 @@ public final class MainContentCaptureSession extends ContentCaptureSession {
}
final int flushFrequencyMs;
if (reason == FLUSH_REASON_IDLE_TIMEOUT) {
flushFrequencyMs = mManager.mOptions.idleFlushingFrequencyMs;
} else if (reason == FLUSH_REASON_TEXT_CHANGE_TIMEOUT) {
if (reason == FLUSH_REASON_TEXT_CHANGE_TIMEOUT) {
flushFrequencyMs = mManager.mOptions.textChangeFlushingFrequencyMs;
} else {
Log.e(TAG, "handleScheduleFlush(" + getDebugState(reason) + "): not called with a "
+ "timeout reason.");
return;
if (reason != FLUSH_REASON_IDLE_TIMEOUT) {
if (sDebug) {
Log.d(TAG, "handleScheduleFlush(" + getDebugState(reason) + "): not a timeout "
+ "reason because mDirectServiceInterface is not ready yet");
}
}
flushFrequencyMs = mManager.mOptions.idleFlushingFrequencyMs;
}
mNextFlush = System.currentTimeMillis() + flushFrequencyMs;