From 5a3220527f46554e6975445097554a883bfbe3f8 Mon Sep 17 00:00:00 2001 From: Fabian Henneke Date: Wed, 15 Apr 2020 17:13:19 +0200 Subject: Respect encrypted username when filling Autofill generated entry --- app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt | 7 +++---- 1 file 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) -- cgit v1.2.3