Require two samples to enroll an new fingerprint template

Settings app doesn't handle the case well when the fingerprint sensor only
needs one touch to finish enrolling. Instead, we change the fingerprint
HAL to require two touches.
The finger ID associated with the last touch would be the one that will be recorded.

Bug fix: Switched back to STATE_IDLE after completing enrollment.
Reference:
https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fingerprint.h#164

Bug: 69594238
Change-Id: I39f0da23d6ffea6003d05a5e75b0048e60289fac
Signed-off-by: Weilun Du <wdu@google.com>
1 file changed