From 35d2d78e672934acc27d19d2bfa23a773b944b3e Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Tue, 15 Dec 2020 13:16:19 +0100 Subject: [PATCH] synaptics: Delay verify operation completion until finger remoal We used to return early in the case where the print matched in order to report the result more quickly. However, with the early reporting mechanism and the fprintd side implementation of it, this is not necessary anymore. As such, only stop the "verify" and "identify" operations when the finger is removed (or the operation is cancelled, which is actually what will happen currently). --- libfprint/drivers/synaptics/synaptics.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/libfprint/drivers/synaptics/synaptics.c b/libfprint/drivers/synaptics/synaptics.c index 61abe84a..27021517 100644 --- a/libfprint/drivers/synaptics/synaptics.c +++ b/libfprint/drivers/synaptics/synaptics.c @@ -663,7 +663,7 @@ verify_msg_cb (FpiDeviceSynaptics *self, fp_info ("Verify was successful! for user: %s finger: %d score: %f", verify_resp->user_id, verify_resp->finger_id, verify_resp->match_result); fpi_device_verify_report (device, FPI_MATCH_SUCCESS, NULL, NULL); - fpi_device_verify_complete (device, NULL); + verify_complete_after_finger_removal (self); break; } } @@ -789,15 +789,11 @@ identify_msg_cb (FpiDeviceSynaptics *self, &index); if (found) - { - fpi_device_identify_report (device, g_ptr_array_index (prints, index), print, NULL); - fpi_device_identify_complete (device, NULL); - } + fpi_device_identify_report (device, g_ptr_array_index (prints, index), print, NULL); else - { - fpi_device_identify_report (device, NULL, print, NULL); - identify_complete_after_finger_removal (self); - } + fpi_device_identify_report (device, NULL, print, NULL); + + identify_complete_after_finger_removal (self); } } }