aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt
index cd96e3d1..d878f0a8 100644
--- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt
@@ -609,10 +609,9 @@ class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound {
AutofillPreferences.directoryStructure(applicationContext)
val entry = PasswordEntry(content)
returnIntent.putExtra("PASSWORD", entry.password)
- returnIntent.putExtra(
- "USERNAME",
- directoryStructure.getUsernameFor(file)
- )
+ val username = PasswordEntry(content).username
+ ?: directoryStructure.getUsernameFor(file)
+ returnIntent.putExtra("USERNAME", username)
}
setResult(RESULT_OK, returnIntent)