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