Change-Id: Idb1b3200e571c546441fa9c0cfd1a1728e165a96
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
}
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() {