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

Skip to content
Commit adfd4fa3 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Update eventTime to prevent stale events

Generate a new motionevent for each injection to ensure that eventtime
remains up to date.

In the InputDispatcher benchmarks, if the eventTime is not updated, then
the test will be stuck, because dispatcher will just drop all events.
To hit this condition, the benchmark must be ran for a sufficiently long
amount of time so that isStaleEvent returns true.
At that point, the benchmark for injectMotion will be stuck, because all
events are dropped, and we cannot consume anything.

The setDownTime api is unsupportedAppUsage in the Java layer, so we
shouldn't remove it.

Bug: none
Test: flame:/data/benchmarktest64/inputflinger_benchmarks #
./inputflinger_benchmarks --benchmark_min_time=10

Change-Id: I1eb93ca9ddac52562e0da50de355d5cdc584c893
parent a81d409c
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