Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7cce975a authored by TYM Tsai's avatar TYM Tsai
Browse files

Flush Content Capture context updated event immediately

Since setLocusContext() usually manually set/reset by developer to update
the app state, it makes sense to trigger a flushing to deliver the
update events immediately.

Bug: 191169236
Test: manual, check the events flush immediately
Test: atest CtsContentCaptureServiceTestCases
Change-Id: I0c367ec083b96d60600ca375c2d70c53224e9b62
parent dc07d29b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -760,7 +760,7 @@ public final class MainContentCaptureSession extends ContentCaptureSession {

    void notifyContextUpdated(int sessionId, @Nullable ContentCaptureContext context) {
        mHandler.post(() -> sendEvent(new ContentCaptureEvent(sessionId, TYPE_CONTEXT_UPDATED)
                .setClientContext(context)));
                .setClientContext(context), FORCE_FLUSH));
    }

    @Override