summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/UserPreference.kt4
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.kt9
2 files changed, 11 insertions, 2 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt b/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt
index d40c0802..0b0c9459 100644
--- a/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt
@@ -92,10 +92,12 @@ class UserPreference : AppCompatActivity() {
val autoFillAppsPreference = findPreference<Preference>("autofill_apps")
val autoFillDefaultPreference = findPreference<CheckBoxPreference>("autofill_default")
val autoFillAlwaysShowDialogPreference = findPreference<CheckBoxPreference>("autofill_always")
+ val autoFillShowFullNamePreference = findPreference<CheckBoxPreference>("autofill_full_path")
autofillDependencies = listOf(
autoFillAppsPreference,
autoFillDefaultPreference,
- autoFillAlwaysShowDialogPreference
+ autoFillAlwaysShowDialogPreference,
+ autoFillShowFullNamePreference
)
// Misc preferences
diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.kt b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.kt
index 5862fa91..100ce145 100644
--- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.kt
@@ -412,7 +412,14 @@ class AutofillService : AccessibilityService() {
// make it optional (or make height a setting for the same effect)
val itemNames = arrayOfNulls<CharSequence>(items.size + 2)
for (i in items.indices) {
- itemNames[i] = items[i].name.replace(".gpg", "")
+ if (settings!!.getBoolean("autofill_full_path", false)) {
+ itemNames[i] = items[i].path.replace(".gpg", "")
+ .replace(
+ PasswordRepository.getRepositoryDirectory(applicationContext).toString() + "/",
+ "")
+ } else {
+ itemNames[i] = items[i].name.replace(".gpg", "")
+ }
}
itemNames[items.size] = getString(R.string.autofill_pick)
itemNames[items.size + 1] = getString(R.string.autofill_pick_and_match)