aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorHarsh Shandilya <msfjarvis@gmail.com>2020-05-06 01:58:05 +0530
committerGitHub <noreply@github.com>2020-05-06 01:58:05 +0530
commitfeab56994d874df21f68eeddfca8d8a7ecbf75d2 (patch)
treed940093f1c27f6227cab0349153edb145291f171 /app/src/main/java
parentf99a14d95b7f9df482585f043ce1263662e66132 (diff)
PasswordEntry: add more potential fields for username (#764)
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/PasswordEntry.kt15
1 files changed, 13 insertions, 2 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/PasswordEntry.kt b/app/src/main/java/com/zeapo/pwdstore/PasswordEntry.kt
index c75fb02d..002c381d 100644
--- a/app/src/main/java/com/zeapo/pwdstore/PasswordEntry.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/PasswordEntry.kt
@@ -5,6 +5,8 @@
package com.zeapo.pwdstore
import android.net.Uri
+import androidx.annotation.VisibleForTesting
+import androidx.annotation.VisibleForTesting.PRIVATE
import java.io.ByteArrayOutputStream
import java.io.UnsupportedEncodingException
@@ -162,7 +164,16 @@ class PasswordEntry(private val content: String) {
}
companion object {
-
- private val USERNAME_FIELDS = arrayOf("login:", "username:")
+ @VisibleForTesting(otherwise = PRIVATE)
+ val USERNAME_FIELDS = arrayOf(
+ "login:",
+ "username:",
+ "account:",
+ "email:",
+ "name:",
+ "handle:",
+ "id:",
+ "identity:"
+ )
}
}