Add unit tests for external stylus fusion

Add unit tests to demystify the external stylus fusion process and to
document its current behavior.

A fused external stylus reports pressure through a separate input
device. That pressure information is then fused with touches from the
touchscreen.

Bug: 246394583
Test: atest inputflinger_tests
Change-Id: I289e4470eb9383bc9e203bff8f76609b0d533e51
diff --git a/services/inputflinger/reader/mapper/TouchInputMapper.h b/services/inputflinger/reader/mapper/TouchInputMapper.h
index d5e4d5a..34cecf9 100644
--- a/services/inputflinger/reader/mapper/TouchInputMapper.h
+++ b/services/inputflinger/reader/mapper/TouchInputMapper.h
@@ -27,6 +27,13 @@
 
 namespace android {
 
+// Maximum amount of latency to add to touch events while waiting for data from an
+// external stylus.
+static constexpr nsecs_t EXTERNAL_STYLUS_DATA_TIMEOUT = ms2ns(72);
+
+// Maximum amount of time to wait on touch data before pushing out new pressure data.
+static constexpr nsecs_t TOUCH_DATA_TIMEOUT = ms2ns(20);
+
 /* Raw axis information from the driver. */
 struct RawPointerAxes {
     RawAbsoluteAxisInfo x{};