Pass RawEvent latency from InputReader to InputListener
To keep track of the lower-level latency like touch driver latency, keep
track of the time when eventhub reads the events.
This information will be stored inside RawEvent as it is being read.
Next, this information will be passed to the InputListener. The InputListener will
report this data to LatencyTracker, which will aggregate this
information in order to get end-to-end touch latency.
Different mappers process the input_event events differently. So a
mapper-specific approach is used here.
Bug: 169866723
Test: atest inputflinger_tests
Change-Id: I5e4e90b3251351327022c467af99a6d84f82164e
diff --git a/services/inputflinger/reader/mapper/InputMapper.h b/services/inputflinger/reader/mapper/InputMapper.h
index 1cc5979..8719f3a 100644
--- a/services/inputflinger/reader/mapper/InputMapper.h
+++ b/services/inputflinger/reader/mapper/InputMapper.h
@@ -67,7 +67,7 @@
virtual void cancelVibrate(int32_t token);
virtual bool isVibrating();
virtual std::vector<int32_t> getVibratorIds();
- virtual void cancelTouch(nsecs_t when);
+ virtual void cancelTouch(nsecs_t when, nsecs_t readTime);
virtual bool enableSensor(InputDeviceSensorType sensorType,
std::chrono::microseconds samplingPeriod,
std::chrono::microseconds maxBatchReportLatency);