Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 937bf9be authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Check for null HAT and add logging

Bug: 154364967

Test: atest com.android.server.biometrics
Change-Id: I1212715828a0588adc2771fbac0b1fb68fd9e13d
Merged-In: I7dfe5dd8e740eef0fc74cd2e68a19dc35eb2c49e
parent 04369a94
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -1504,11 +1504,17 @@ public class BiometricService extends SystemService {
        try {
            switch (reason) {
                case BiometricPrompt.DISMISSED_REASON_CREDENTIAL_CONFIRMED:
                    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));