samsung: hidl: fingerprint: call notify on cancel

Change-Id: Idb1b3200e571c546441fa9c0cfd1a1728e165a96
tirimbino
Jan Altensen 5 years ago
parent 16d1a36299
commit 41de6a3dac
No known key found for this signature in database
GPG Key ID: 3E45BB95F7AD33DA
  1. 4
      hidl/fingerprint/Android.mk
  2. 13
      hidl/fingerprint/BiometricsFingerprint.cpp

@ -31,6 +31,10 @@ LOCAL_SHARED_LIBRARIES := \
libutils \
android.hardware.biometrics.fingerprint@2.1
ifeq ($(TARGET_SEC_FP_CALL_NOTIFY_ON_CANCEL),true)
LOCAL_CFLAGS += -DCALL_NOTIFY_ON_CANCEL
endif
ifeq ($(TARGET_SEC_FP_USES_PERCENTAGE_SAMPLES),true)
LOCAL_CFLAGS += -DUSES_PERCENTAGE_SAMPLES
endif

@ -173,7 +173,18 @@ Return<uint64_t> BiometricsFingerprint::getAuthenticatorId() {
}
Return<RequestStatus> BiometricsFingerprint::cancel() {
return ErrorFilter(ss_fingerprint_cancel());
int32_t ret = ss_fingerprint_cancel();
#ifdef CALL_NOTIFY_ON_CANCEL
if (ret == 0) {
fingerprint_msg_t msg{};
msg.type = FINGERPRINT_ERROR;
msg.data.error = FINGERPRINT_ERROR_CANCELED;
notify(&msg);
}
#endif
return ErrorFilter(ret);
}
Return<RequestStatus> BiometricsFingerprint::enumerate() {

Loading…
Cancel
Save