From 7db9651375996b44f616204811616cd971ed4b6c Mon Sep 17 00:00:00 2001 From: anonymix007 <48598263+anonymix007@users.noreply.github.com> Date: Wed, 23 Oct 2024 15:52:35 +0900 Subject: [PATCH] hidl: biometrics: fingerprint: Fix UDFPS enrollment and authentication - Without this screen would light up for just a few seconds, matching would be unreliable and often error out with GF_ERROR_ACQUIRED_IMAGER_DIRTY or GF_ERROR_TOO_FAST Change-Id: Ibc02d111224dc0921bf91c7b69330dcda2c7dc8f Signed-off-by: Omkar Chandorkar --- hidl/biometrics/fingerprint/BiometricsFingerprint.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hidl/biometrics/fingerprint/BiometricsFingerprint.cpp b/hidl/biometrics/fingerprint/BiometricsFingerprint.cpp index 96e06eb..0d4a50e 100644 --- a/hidl/biometrics/fingerprint/BiometricsFingerprint.cpp +++ b/hidl/biometrics/fingerprint/BiometricsFingerprint.cpp @@ -328,8 +328,10 @@ void BiometricsFingerprint::notify(const fingerprint_msg_t* msg) { if (thisPtr->mUdfpsHandler) { thisPtr->mUdfpsHandler->onAcquired(static_cast(result), vendorCode); } - if (!thisPtr->mClientCallback->onAcquired(devId, result, vendorCode).isOk()) { - ALOGE("failed to invoke fingerprint onAcquired callback"); + if (result != FingerprintAcquiredInfo::ACQUIRED_VENDOR) { + if (!thisPtr->mClientCallback->onAcquired(devId, result, vendorCode).isOk()) { + ALOGE("failed to invoke fingerprint onAcquired callback"); + } } } break; case FINGERPRINT_TEMPLATE_ENROLLING: