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

Skip to content
Commit bb7a0208 authored by Prabir Pradhan's avatar Prabir Pradhan
Browse files

InputTracer: Separate the threading logic into a wrapper backend

InputTracer writes to the tracing backend interface. However, since
perfetto expects events to be written from a single thread, InputTracer
would write the events from a separate thread.

To simplify the logic inside InputTracer, remove the threading logic.
Instead, we introduce the ThreadingBackend class, which wraps around an
abitrary backend and forwards events to the inner backend from a new
thread.

Another benefit of this is that we no longer have to use the threaded
backend for tests, which makes the tracing part of InputDispatcher_test
deterministic.

Bug: 210460522
Test: atest inputflinger_tests
Change-Id: If7bbc912c05bc975ec9585f0a0ebce68683925bb
parent c8693d4c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment