From fd03aaaed975c034bc5645815fb6f9077ac2b0a2 Mon Sep 17 00:00:00 2001 From: Bruno Martins Date: Wed, 19 Feb 2025 22:26:59 +0000 Subject: [PATCH] fingerprint: Do not notify AIDL HAL about touch events As previously noticed with uff fingerprint HIDL HAL, Oplus makes use of touch down/up events for product testing. With the most recent AIDL HAL, entering the code paths for factory tests breaks fingerprint registration. By setting halHandlesDisplayTouches prop to true, the framework will skip passing the display touch events in ISession#onPointerDown and ISession#onPointerUp down to the HAL. Change-Id: I194719f27c182d044c0f4e349c3e0ef032361fbd --- fingerprint/shims/SensorPropsShim.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fingerprint/shims/SensorPropsShim.cpp b/fingerprint/shims/SensorPropsShim.cpp index 89f0dda..c5ca8ba 100644 --- a/fingerprint/shims/SensorPropsShim.cpp +++ b/fingerprint/shims/SensorPropsShim.cpp @@ -61,6 +61,10 @@ SensorProps SensorPropsInit(SensorProps props) { } } + props.halHandlesDisplayTouches = + props.sensorType == FingerprintSensorType::UNDER_DISPLAY_OPTICAL || + props.sensorType == FingerprintSensorType::UNDER_DISPLAY_ULTRASONIC; + return props; } } // anonymous namespace