From 44edf478c11d0b8a2097ede05f634a18dac7df38 Mon Sep 17 00:00:00 2001 From: Arian Date: Thu, 14 Mar 2024 13:38:56 +0100 Subject: [PATCH] sm8450-common: udfps: Correct vendorCodes Change-Id: I39f37f278e39487c21d96e05ee331c4960d5e2be --- udfps/UdfpsHandler.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/udfps/UdfpsHandler.cpp b/udfps/UdfpsHandler.cpp index cc73c17..c57bf48 100644 --- a/udfps/UdfpsHandler.cpp +++ b/udfps/UdfpsHandler.cpp @@ -113,11 +113,14 @@ class XiaomiSm8450UdfpsHander : public UdfpsHandler { if (!enrolling) { setFodStatus(FOD_STATUS_OFF); } - } else if (vendorCode == 21 || vendorCode == 23) { - /* - * vendorCode = 21 waiting for fingerprint authentication - * vendorCode = 23 waiting for fingerprint enroll - */ + } + + /* vendorCode + * 21: waiting for finger + * 22: finger down + * 23: finger up + */ + if (vendorCode == 21) { setFodStatus(FOD_STATUS_ON); } }