Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3cd2d582 authored by Kevin Chyn's avatar Kevin Chyn Committed by android-build-merger
Browse files

Merge "Add onAcquired log back" into oc-dev

am: 238d6b95

Change-Id: Ica053c357b46078857c006b58c1fed92876df06b
parents 8b60a757 238d6b95
Loading
Loading
Loading
Loading
+17 −0
Original line number Original line Diff line number Diff line
@@ -268,6 +268,7 @@ void BiometricsFingerprint::notify(const fingerprint_msg_t *msg) {
        case FINGERPRINT_ERROR: {
        case FINGERPRINT_ERROR: {
                int32_t vendorCode = 0;
                int32_t vendorCode = 0;
                FingerprintError result = VendorErrorFilter(msg->data.error, &vendorCode);
                FingerprintError result = VendorErrorFilter(msg->data.error, &vendorCode);
                ALOGD("onError(%d)", result);
                if (!thisPtr->mClientCallback->onError(devId, result, vendorCode).isOk()) {
                if (!thisPtr->mClientCallback->onError(devId, result, vendorCode).isOk()) {
                    ALOGE("failed to invoke fingerprint onError callback");
                    ALOGE("failed to invoke fingerprint onError callback");
                }
                }
@@ -277,12 +278,17 @@ void BiometricsFingerprint::notify(const fingerprint_msg_t *msg) {
                int32_t vendorCode = 0;
                int32_t vendorCode = 0;
                FingerprintAcquiredInfo result =
                FingerprintAcquiredInfo result =
                    VendorAcquiredFilter(msg->data.acquired.acquired_info, &vendorCode);
                    VendorAcquiredFilter(msg->data.acquired.acquired_info, &vendorCode);
                ALOGD("onAcquired(%d)", result);
                if (!thisPtr->mClientCallback->onAcquired(devId, result, vendorCode).isOk()) {
                if (!thisPtr->mClientCallback->onAcquired(devId, result, vendorCode).isOk()) {
                    ALOGE("failed to invoke fingerprint onAcquired callback");
                    ALOGE("failed to invoke fingerprint onAcquired callback");
                }
                }
            }
            }
            break;
            break;
        case FINGERPRINT_TEMPLATE_ENROLLING:
        case FINGERPRINT_TEMPLATE_ENROLLING:
            ALOGD("onEnrollResult(fid=%d, gid=%d, rem=%d)",
                msg->data.enroll.finger.fid,
                msg->data.enroll.finger.gid,
                msg->data.enroll.samples_remaining);
            if (!thisPtr->mClientCallback->onEnrollResult(devId,
            if (!thisPtr->mClientCallback->onEnrollResult(devId,
                    msg->data.enroll.finger.fid,
                    msg->data.enroll.finger.fid,
                    msg->data.enroll.finger.gid,
                    msg->data.enroll.finger.gid,
@@ -291,6 +297,10 @@ void BiometricsFingerprint::notify(const fingerprint_msg_t *msg) {
            }
            }
            break;
            break;
        case FINGERPRINT_TEMPLATE_REMOVED:
        case FINGERPRINT_TEMPLATE_REMOVED:
            ALOGD("onRemove(fid=%d, gid=%d, rem=%d)",
                msg->data.removed.finger.fid,
                msg->data.removed.finger.gid,
                msg->data.removed.remaining_templates);
            if (!thisPtr->mClientCallback->onRemoved(devId,
            if (!thisPtr->mClientCallback->onRemoved(devId,
                    msg->data.removed.finger.fid,
                    msg->data.removed.finger.fid,
                    msg->data.removed.finger.gid,
                    msg->data.removed.finger.gid,
@@ -300,6 +310,9 @@ void BiometricsFingerprint::notify(const fingerprint_msg_t *msg) {
            break;
            break;
        case FINGERPRINT_AUTHENTICATED:
        case FINGERPRINT_AUTHENTICATED:
            if (msg->data.authenticated.finger.fid != 0) {
            if (msg->data.authenticated.finger.fid != 0) {
                ALOGD("onAuthenticated(fid=%d, gid=%d)",
                    msg->data.authenticated.finger.fid,
                    msg->data.authenticated.finger.gid);
                const uint8_t* hat =
                const uint8_t* hat =
                    reinterpret_cast<const uint8_t *>(&msg->data.authenticated.hat);
                    reinterpret_cast<const uint8_t *>(&msg->data.authenticated.hat);
                const hidl_vec<uint8_t> token(
                const hidl_vec<uint8_t> token(
@@ -321,6 +334,10 @@ void BiometricsFingerprint::notify(const fingerprint_msg_t *msg) {
            }
            }
            break;
            break;
        case FINGERPRINT_TEMPLATE_ENUMERATING:
        case FINGERPRINT_TEMPLATE_ENUMERATING:
            ALOGD("onEnumerate(fid=%d, gid=%d, rem=%d)",
                msg->data.enumerated.finger.fid,
                msg->data.enumerated.finger.gid,
                msg->data.enumerated.remaining_templates);
            if (!thisPtr->mClientCallback->onEnumerate(devId,
            if (!thisPtr->mClientCallback->onEnumerate(devId,
                    msg->data.enumerated.finger.fid,
                    msg->data.enumerated.finger.fid,
                    msg->data.enumerated.finger.gid,
                    msg->data.enumerated.finger.gid,