• Martin Kreichgauer's avatar
    Settings UI: clean up security fingerprint enrollment response handling · 50302d08
    Martin Kreichgauer authored
    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: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#732650}
    50302d08
settings_strings.grdp 389 KB