diff options
Diffstat (limited to 'app/src')
3 files changed, 10 insertions, 2 deletions
diff --git a/app/src/main/java/app/passwordstore/ui/autofill/AutofillDecryptActivity.kt b/app/src/main/java/app/passwordstore/ui/autofill/AutofillDecryptActivity.kt index 023822a4..959728cd 100644 --- a/app/src/main/java/app/passwordstore/ui/autofill/AutofillDecryptActivity.kt +++ b/app/src/main/java/app/passwordstore/ui/autofill/AutofillDecryptActivity.kt @@ -12,6 +12,7 @@ import android.os.Build import android.os.Bundle import android.view.autofill.AutofillManager import androidx.lifecycle.lifecycleScope +import app.passwordstore.R import app.passwordstore.data.crypto.GPGPassphraseCache import app.passwordstore.data.passfile.PasswordEntry import app.passwordstore.ui.crypto.BasePgpActivity @@ -73,7 +74,10 @@ class AutofillDecryptActivity : BasePgpActivity() { if ( features.isEnabled(EnableGPGPassphraseCache) && BiometricAuthenticator.canAuthenticate(this) ) { - BiometricAuthenticator.authenticate(this) { authResult -> + BiometricAuthenticator.authenticate( + this, + R.string.biometric_prompt_title_gpg_passphrase_cache, + ) { authResult -> if (authResult is BiometricAuthenticator.Result.Success) { lifecycleScope.launch { val cachedPassphrase = diff --git a/app/src/main/java/app/passwordstore/ui/crypto/DecryptActivity.kt b/app/src/main/java/app/passwordstore/ui/crypto/DecryptActivity.kt index 56ba382c..552332f1 100644 --- a/app/src/main/java/app/passwordstore/ui/crypto/DecryptActivity.kt +++ b/app/src/main/java/app/passwordstore/ui/crypto/DecryptActivity.kt @@ -70,7 +70,10 @@ class DecryptActivity : BasePgpActivity() { features.isEnabled(EnableGPGPassphraseCache) && BiometricAuthenticator.canAuthenticate(this@DecryptActivity) ) { - BiometricAuthenticator.authenticate(this@DecryptActivity) { authResult -> + BiometricAuthenticator.authenticate( + this@DecryptActivity, + R.string.biometric_prompt_title_gpg_passphrase_cache, + ) { authResult -> requireKeysExist { decrypt(isError = false, authResult) } } } else { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 9dc739ad..38b7dbc3 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -373,4 +373,5 @@ <string name="pgp_key_manager_no_keys_guidance">Import a key using the add button below</string> <string name="no_keys_imported_dialog_title">No keys imported</string> <string name="no_keys_imported_dialog_message">There are no PGP keys imported in the app yet, press the button below to pick a key file</string> + <string name="biometric_prompt_title_gpg_passphrase_cache">Unlock passphrase cache</string> </resources> |