summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2023-06-04 02:02:47 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2023-06-04 02:02:47 +0530
commit469700f62703a9e81ea711ebe7af6f9c9a8e21fe (patch)
tree74f076f36993d384c01c80d57bd0ee5be920e463 /app/src/main/java
parentf6e1830647d9fbf91fca603a51566d66069e9def (diff)
feat: add custom dialog title for passphrase cache
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/app/passwordstore/ui/autofill/AutofillDecryptActivity.kt6
-rw-r--r--app/src/main/java/app/passwordstore/ui/crypto/DecryptActivity.kt5
2 files changed, 9 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 {