fix: check feature flag before biometric auth

This commit is contained in:
Harsh Shandilya 2023-05-13 15:24:48 +05:30 committed by GitHub
parent 789efc46a3
commit 29ca93854a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -72,7 +72,7 @@ class AutofillDecryptActivity : BasePgpActivity() {
requireKeysExist {
val gpgIdentifiers = getGpgIdentifiers("") ?: return@requireKeysExist
if (
BiometricAuthenticator.canAuthenticate(this) && features.isEnabled(EnableGPGPassphraseCache)
features.isEnabled(EnableGPGPassphraseCache) && BiometricAuthenticator.canAuthenticate(this)
) {
BiometricAuthenticator.authenticate(this) { authResult ->
if (authResult is BiometricAuthenticator.Result.Success) {

View file

@ -69,8 +69,8 @@ class DecryptActivity : BasePgpActivity() {
}
}
if (
BiometricAuthenticator.canAuthenticate(this@DecryptActivity) &&
features.isEnabled(EnableGPGPassphraseCache)
features.isEnabled(EnableGPGPassphraseCache) &&
BiometricAuthenticator.canAuthenticate(this@DecryptActivity)
) {
BiometricAuthenticator.authenticate(this@DecryptActivity) { authResult ->
requireKeysExist { decrypt(isError = false, authResult) }