Add test to ensure values outside the abs axis range are accepted
Although it is not explicitly mentioned in the evdev protocol docs, it
may make sense to send values outside of the min and max range for
absolute axes in some cases. For example, a positional axis value
outside its range may indicate a touch point outside the min and max
range that maps to the touchscreen's display. For the pressure axis,
having a max may not make sense, as there is no theoretical maximum for
pressure, outside of what the sensor can detect.
We add a test to ensure that we accept these values that are outside of
their range reported in input_abs_info.
Bug: 295125932
Test: atest inputflinger_tests
Change-Id: Ifa88bec96dea92a44be82d2c761bd30f5c5d5123
diff --git a/services/inputflinger/tests/UinputDevice.h b/services/inputflinger/tests/UinputDevice.h
index 5b07465..e7010c3 100644
--- a/services/inputflinger/tests/UinputDevice.h
+++ b/services/inputflinger/tests/UinputDevice.h
@@ -189,6 +189,7 @@
void sendTrackingId(int32_t trackingId);
void sendDown(const Point& point);
void sendMove(const Point& point);
+ void sendPressure(int32_t pressure);
void sendPointerUp();
void sendUp();
void sendToolType(int32_t toolType);