Merge "Check for null HAT and add logging" into rvc-dev am: 90b27662ed am: 6fdc18adb7

Change-Id: I1d50aa84335dfb2a2752aa9b382c86397823d722
This commit is contained in:
Kevin Chyn
2020-04-29 04:23:17 +00:00
committed by Automerger Merge Worker

View File

@@ -1504,11 +1504,17 @@ public class BiometricService extends SystemService {
try {
switch (reason) {
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_CONFIRM_NOT_REQUIRED:
if (mCurrentAuthSession.mTokenEscrow != null) {
mKeyStore.addAuthToken(mCurrentAuthSession.mTokenEscrow);
} else {
Slog.e(TAG, "mTokenEscrow is null");
}
mCurrentAuthSession.mClientReceiver.onAuthenticationSucceeded(
Utils.getAuthenticationTypeForResult(reason));