From 466e1766e7981d24422beeffbe9f29e6747ae340 Mon Sep 17 00:00:00 2001 From: micky387 Date: Tue, 21 Jun 2022 13:47:23 +0200 Subject: [PATCH] sm7125-common: fingerprint: Send onFingerUp() on postEnroll and cancel FP Change-Id: I1b788b43d421853afd42dd1b2a4b75b644498a3f --- fingerprint/BiometricsFingerprint.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fingerprint/BiometricsFingerprint.cpp b/fingerprint/BiometricsFingerprint.cpp index e748b68..64bb2da 100644 --- a/fingerprint/BiometricsFingerprint.cpp +++ b/fingerprint/BiometricsFingerprint.cpp @@ -178,7 +178,6 @@ Return BiometricsFingerprint::ErrorFilter(int32_t error) { // Translate from errors returned by traditional HAL (see fingerprint.h) to // HIDL-compliant FingerprintError. FingerprintError BiometricsFingerprint::VendorErrorFilter(int32_t error, int32_t* vendorCode) { - *vendorCode = 0; switch (error) { case FINGERPRINT_ERROR_HW_UNAVAILABLE: return FingerprintError::ERROR_HW_UNAVAILABLE; @@ -209,7 +208,6 @@ FingerprintError BiometricsFingerprint::VendorErrorFilter(int32_t error, int32_t // to HIDL-compliant FingerprintAcquiredInfo. FingerprintAcquiredInfo BiometricsFingerprint::VendorAcquiredFilter(int32_t info, int32_t* vendorCode) { - *vendorCode = 0; switch (info) { case FINGERPRINT_ACQUIRED_GOOD: return FingerprintAcquiredInfo::ACQUIRED_GOOD; @@ -261,6 +259,7 @@ Return BiometricsFingerprint::enroll(const hidl_array BiometricsFingerprint::postEnroll() { + getInstance()->onFingerUp(); return ErrorFilter(ss_fingerprint_post_enroll()); } @@ -270,6 +269,7 @@ Return BiometricsFingerprint::getAuthenticatorId() { Return BiometricsFingerprint::cancel() { int32_t ret = ss_fingerprint_cancel(); + getInstance()->onFingerUp(); #ifdef CALL_NOTIFY_ON_CANCEL if (ret == 0) { @@ -440,13 +440,13 @@ void BiometricsFingerprint::notify(const fingerprint_msg_t* msg) { const uint8_t* hat = reinterpret_cast(&msg->data.authenticated.hat); const hidl_vec token( std::vector(hat, hat + sizeof(msg->data.authenticated.hat))); - set(HBM_PATH, "0"); if (!thisPtr->mClientCallback ->onAuthenticated(devId, msg->data.authenticated.finger.fid, msg->data.authenticated.finger.gid, token) .isOk()) { LOG(ERROR) << "failed to invoke fingerprint onAuthenticated callback"; } + getInstance()->onFingerUp(); } else { // Not a recognized fingerprint if (!thisPtr->mClientCallback