summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mihir Patel <mkpatel@google.com> 2019-08-09 14:00:42 -0700
committer Mihir Patel <mkpatel@google.com> 2019-08-09 14:10:30 -0700
commit52ed9ee0387fa4faa91deff970dde779e2ff2f9f (patch)
treed87f61763537e6ceded4ca71894fe297bdce890e
parentf84ff34a31d3279789231c88eea2df296b4ddfe0 (diff)
Fixing a bug where content capture sessions with child sessions could get stuck in a state where no event flushing other than forced flushes would occur
Fixes: 139202268 Test: atest CtsContentCaptureServiceTestCases Change-Id: I21e9d4db2402fe5210b7d938dac2f12e7557c146
-rw-r--r--core/java/android/view/contentcapture/MainContentCaptureSession.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/java/android/view/contentcapture/MainContentCaptureSession.java b/core/java/android/view/contentcapture/MainContentCaptureSession.java
index cee79439d1b3..1e7440bd5a43 100644
--- a/core/java/android/view/contentcapture/MainContentCaptureSession.java
+++ b/core/java/android/view/contentcapture/MainContentCaptureSession.java
@@ -480,6 +480,8 @@ public final class MainContentCaptureSession extends ContentCaptureSession {
return;
}
+ mNextFlushForTextChanged = false;
+
final int numberEvents = mEvents.size();
final String reasonString = getFlushReasonAsString(reason);
if (sDebug) {
@@ -495,10 +497,6 @@ public final class MainContentCaptureSession extends ContentCaptureSession {
try {
mHandler.removeMessages(MSG_FLUSH);
- if (reason == FLUSH_REASON_TEXT_CHANGE_TIMEOUT) {
- mNextFlushForTextChanged = false;
- }
-
final ParceledListSlice<ContentCaptureEvent> events = clearEvents();
mDirectServiceInterface.sendEvents(events, reason, mManager.mOptions);
} catch (RemoteException e) {