Settings UI: clean up security fingerprint enrollment response handling
The onEnrolling_() method and its EnrollmentStatus argument type were conflating two logically separate events: fingerprint sample status updates ("sensor was touched") and handling the final enrollment response. Splitting the type in two (SampleResponse / EnrollmentResponse), and handle them in separate methods simplifies the code. Also improve error handling in both cases: - failure status codes in a SampleResponse cause a "try again" message in the enrollment sheet to be shown - CTAP2 errors on the EnrollmentResponse make the dialog proceed to the error sheet Bug: 974046 Change-Id: Ib8492aae493374f84b368bb6eca6b9eb439af685 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1999268 Commit-Queue: Martin Kreichgauer <martinkr@google.com> Reviewed-by:Demetrios Papadopoulos <dpapad@chromium.org> Cr-Commit-Position: refs/heads/master@{#732650}
Showing
Please register or sign in to comment