Merge "Check for null HAT and add logging" into rvc-dev

This commit is contained in:
Kevin Chyn
2020-04-29 03:53:35 +00:00
committed by Android (Google) Code Review

View File

@@ -1504,11 +1504,17 @@ public class BiometricService extends SystemService {
try { try {
switch (reason) { switch (reason) {
case BiometricPrompt.DISMISSED_REASON_CREDENTIAL_CONFIRMED: case BiometricPrompt.DISMISSED_REASON_CREDENTIAL_CONFIRMED:
mKeyStore.addAuthToken(credentialAttestation); if (credentialAttestation != null) {
mKeyStore.addAuthToken(credentialAttestation);
} else {
Slog.e(TAG, "Credential confirmed but attestation is null");
}
case BiometricPrompt.DISMISSED_REASON_BIOMETRIC_CONFIRMED: case BiometricPrompt.DISMISSED_REASON_BIOMETRIC_CONFIRMED:
case BiometricPrompt.DISMISSED_REASON_BIOMETRIC_CONFIRM_NOT_REQUIRED: case BiometricPrompt.DISMISSED_REASON_BIOMETRIC_CONFIRM_NOT_REQUIRED:
if (mCurrentAuthSession.mTokenEscrow != null) { if (mCurrentAuthSession.mTokenEscrow != null) {
mKeyStore.addAuthToken(mCurrentAuthSession.mTokenEscrow); mKeyStore.addAuthToken(mCurrentAuthSession.mTokenEscrow);
} else {
Slog.e(TAG, "mTokenEscrow is null");
} }
mCurrentAuthSession.mClientReceiver.onAuthenticationSucceeded( mCurrentAuthSession.mClientReceiver.onAuthenticationSucceeded(
Utils.getAuthenticationTypeForResult(reason)); Utils.getAuthenticationTypeForResult(reason));