aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2023-11-29 19:39:25 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2023-11-29 19:39:25 +0530
commit891455d7a7f618d2aac81fa742ffaef6dfbf7195 (patch)
tree42a1a6cf5ae14be5a5a03c7396819e66714ce705 /app/src/main/java
parent9b7175a555dd919fa3b029f92fb01110727989c0 (diff)
fix: gate passphrase cache behind authenticator availability
Fixes #2783
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/app/passwordstore/ui/settings/PGPSettings.kt2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/src/main/java/app/passwordstore/ui/settings/PGPSettings.kt b/app/src/main/java/app/passwordstore/ui/settings/PGPSettings.kt
index c5625612..e2b7e5a8 100644
--- a/app/src/main/java/app/passwordstore/ui/settings/PGPSettings.kt
+++ b/app/src/main/java/app/passwordstore/ui/settings/PGPSettings.kt
@@ -8,6 +8,7 @@ package app.passwordstore.ui.settings
import androidx.fragment.app.FragmentActivity
import app.passwordstore.R
import app.passwordstore.ui.pgp.PGPKeyListActivity
+import app.passwordstore.util.auth.BiometricAuthenticator
import app.passwordstore.util.extensions.launchActivity
import app.passwordstore.util.features.Feature
import app.passwordstore.util.settings.PreferenceKeys
@@ -33,6 +34,7 @@ class PGPSettings(private val activity: FragmentActivity) : SettingsProvider {
persistent = true
}
switch(Feature.EnablePGPPassphraseCache.configKey) {
+ enabled = BiometricAuthenticator.canAuthenticate(activity)
titleRes = R.string.pref_passphrase_cache_title
summaryRes = R.string.pref_passphrase_cache_summary
defaultValue = false