Skip biometrics check if unavailable when linking a device.

This commit is contained in:
Michelle Tang
2024-06-06 12:09:00 -07:00
committed by Alex Hart
parent d9c42a4135
commit 13dd59f226
2 changed files with 9 additions and 1 deletions

View File

@@ -35,6 +35,10 @@ class BiometricDeviceAuthentication(
private val DISALLOWED_BIOMETRIC_VERSIONS = setOf(28, 29)
}
fun canAuthenticate(): Boolean {
return biometricManager.canAuthenticate(ALLOWED_AUTHENTICATORS) == BiometricManager.BIOMETRIC_SUCCESS
}
fun authenticate(context: Context, force: Boolean, showConfirmDeviceCredentialIntent: () -> Unit): Boolean {
val isKeyGuardSecure = ServiceUtil.getKeyguardManager(context).isKeyguardSecure