From 9b37d1a99ecdb088470e9d1d5fa59618b13aaa67 Mon Sep 17 00:00:00 2001 From: Arian Date: Thu, 14 Mar 2024 13:50:54 +0100 Subject: [PATCH] sm8450-common: udfps: Add comments about setFingerDown usage Change-Id: Ifb0394a887cdabdad20208b5deb2386e7cc7f55a --- udfps/UdfpsHandler.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/udfps/UdfpsHandler.cpp b/udfps/UdfpsHandler.cpp index 4357835..eabbc31 100644 --- a/udfps/UdfpsHandler.cpp +++ b/udfps/UdfpsHandler.cpp @@ -176,18 +176,22 @@ class XiaomiSm8450UdfpsHander : public UdfpsHandler { void onFingerDown(uint32_t /*x*/, uint32_t /*y*/, float /*minor*/, float /*major*/) { LOG(INFO) << __func__; + // Ensure touchscreen is aware of the press state, ideally this is not needed setFingerDown(true); } void onFingerUp() { LOG(INFO) << __func__; + // Ensure touchscreen is aware of the press state, ideally this is not needed setFingerDown(false); } void onAcquired(int32_t result, int32_t vendorCode) { LOG(INFO) << __func__ << " result: " << result << " vendorCode: " << vendorCode; if (result == FINGERPRINT_ACQUIRED_GOOD) { + // Set finger as up to disable HBM already, even if the finger is still pressed setFingerDown(false); + if (!enrolling) { setFodStatus(FOD_STATUS_OFF); }