[PM-13387] Skip unneeded confirmation button when using passive biometrics such as face unlock (#4064)

This commit is contained in:
Víctor 2024-10-15 15:52:15 +02:00 committed by GitHub
parent efbf84238d
commit 12afbea83e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -133,6 +133,7 @@ class BiometricsManagerImpl(
.setDescription(activity.getString(R.string.biometrics_direction)) .setDescription(activity.getString(R.string.biometrics_direction))
.setAllowedAuthenticators(Authenticators.BIOMETRIC_STRONG) .setAllowedAuthenticators(Authenticators.BIOMETRIC_STRONG)
.setNegativeButtonText(activity.getString(R.string.cancel)) .setNegativeButtonText(activity.getString(R.string.cancel))
.setConfirmationRequired(false)
biometricPrompt.authenticate( biometricPrompt.authenticate(
promptInfoBuilder.build(), promptInfoBuilder.build(),
BiometricPrompt.CryptoObject(it), BiometricPrompt.CryptoObject(it),
@ -144,6 +145,7 @@ class BiometricsManagerImpl(
.setAllowedAuthenticators( .setAllowedAuthenticators(
Authenticators.BIOMETRIC_STRONG or Authenticators.DEVICE_CREDENTIAL, Authenticators.BIOMETRIC_STRONG or Authenticators.DEVICE_CREDENTIAL,
) )
.setConfirmationRequired(false)
biometricPrompt.authenticate(promptInfoBuilder.build()) biometricPrompt.authenticate(promptInfoBuilder.build())
} }
} }