Merge "Check user validity before retrying authentication"

This commit is contained in:
Pavel Grafov
2021-11-30 14:48:00 +00:00
committed by Android (Google) Code Review

View File

@@ -108,6 +108,10 @@ public class ConfirmDeviceCredentialActivity extends FragmentActivity {
if (errorCode == BiometricPrompt.BIOMETRIC_ERROR_USER_CANCELED
|| errorCode == BiometricPrompt.BIOMETRIC_ERROR_CANCELED) {
finish();
} else if (mUserManager.getUserInfo(mUserId) == null) {
// This can happen when profile gets wiped due to too many failed auth attempts.
Log.i(TAG, "Finishing, user no longer valid: " + mUserId);
finish();
} else {
// All other errors go to some version of CC
showConfirmCredentials();