mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-09-02 07:15:21 +00:00
Fix Autofill ANR when entry has no TOTP (#1746)
This commit is contained in:
@@ -143,6 +143,7 @@ object AutofillPreferences {
|
|||||||
// Always give priority to a username stored in the encrypted extras
|
// Always give priority to a username stored in the encrypted extras
|
||||||
val username =
|
val username =
|
||||||
entry.username ?: directoryStructure.getUsernameFor(file) ?: context.getDefaultUsername()
|
entry.username ?: directoryStructure.getUsernameFor(file) ?: context.getDefaultUsername()
|
||||||
return Credentials(username, entry.password, runBlocking { entry.totp.first() })
|
val totp = if (entry.hasTotp()) runBlocking { entry.totp.first() } else null
|
||||||
|
return Credentials(username, entry.password, totp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user