From 1b69dece94261b05ff2f5a10f364871053bebfac Mon Sep 17 00:00:00 2001 From: Curtis Belmonte Date: Wed, 14 Jul 2021 15:44:49 -0700 Subject: [PATCH] Don't also skip fingerprint in SUW when skipping face Ensures that each biometric enroll intro activity handles an activity result of RESULT_SKIP by calling the appropriate skip handler, rather than just finishing. This fixes an issue where skipping face setup from some Setup Wizard states would skip fingerprint setup as well. Test: Manually skipped face setup from each screen during SUW Bug: 193367620 Change-Id: If9ef9f19f8e967093f17dde98093a506400d7c09 --- .../biometrics/BiometricEnrollIntroduction.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/com/android/settings/biometrics/BiometricEnrollIntroduction.java b/src/com/android/settings/biometrics/BiometricEnrollIntroduction.java index c073c3c2eac..8d18b1af05e 100644 --- a/src/com/android/settings/biometrics/BiometricEnrollIntroduction.java +++ b/src/com/android/settings/biometrics/BiometricEnrollIntroduction.java @@ -284,8 +284,10 @@ public abstract class BiometricEnrollIntroduction extends BiometricEnrollBase @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == BIOMETRIC_FIND_SENSOR_REQUEST) { - if (resultCode == RESULT_FINISHED || resultCode == RESULT_SKIP - || resultCode == RESULT_TIMEOUT) { + if (resultCode == RESULT_SKIP || resultCode == RESULT_FINISHED) { + onSkipButtonClick(mFooterBarMixin.getSecondaryButtonView()); + return; + } else if (resultCode == RESULT_TIMEOUT) { setResult(resultCode, data); finish(); return; @@ -335,7 +337,9 @@ public abstract class BiometricEnrollIntroduction extends BiometricEnrollBase overridePendingTransition(R.anim.sud_slide_back_in, R.anim.sud_slide_back_out); } else if (requestCode == ENROLL_NEXT_BIOMETRIC_REQUEST) { Log.d(TAG, "ENROLL_NEXT_BIOMETRIC_REQUEST, result: " + resultCode); - if (resultCode != RESULT_CANCELED) { + if (resultCode == RESULT_SKIP || resultCode == RESULT_FINISHED) { + onSkipButtonClick(mFooterBarMixin.getSecondaryButtonView()); + } else if (resultCode != RESULT_CANCELED) { setResult(resultCode, data); finish(); }