OSDN Git Service

[Fingerprint] Send RESULT_CANCELED when back from Add another
authorMaurice Lam <yukl@google.com>
Fri, 17 Jul 2015 20:16:40 +0000 (13:16 -0700)
committerMaurice Lam <yukl@google.com>
Tue, 21 Jul 2015 22:23:11 +0000 (15:23 -0700)
commitda433902d41baec2c1fdbe35ad853d2d7ce7bc1d
tree75f220f15560b55457b64ea5ed5eae7c64eb4ed1
parentd85fafce30f6fb71ea9de9de3c6d8aafc99dba33
[Fingerprint] Send RESULT_CANCELED when back from Add another

Forward the result in the enrolling screen from the finish screen,
so that if the user presses back in "Add another" after enrolling
the first fingerprint, it will return RESULT_CANCELED instead of
RESULT_FINISHED, and go back to find sensor screen.

This results in the following behavioral changes:
- RESULT_FINISHED will only be sent if the user presses "Done" in
  FingerprintEnrollFinish. If the user clicks back in
  FingerprintEnrollEnrolling, they will always go back to the
  previous screen with RESULT_CANCELED, which would either be
  FindSensor or FingerprintSettings.
- If the user presses back in FingerprintEnrollFinish, which is only
  possible outside of Setup Wizard, they will be back in Find Sensor,
  and pressing next will enroll an additional fingerprint.
  - Edge case: if the user enrolled the maximum number of
    fingerprints, and presses back, they will be bounced all the way
    back to Settings > Security.

Bug: 22552741
Change-Id: Ifc5e8a9150491b4303e01ebd0fc17b6d39dd372d
src/com/android/settings/fingerprint/FingerprintEnrollEnrolling.java
src/com/android/settings/fingerprint/FingerprintEnrollFindSensor.java
src/com/android/settings/fingerprint/FingerprintEnrollFinish.java