mirror of
https://github.com/android-password-store/Android-Password-Store.git
synced 2025-09-06 17:04:09 +02:00
Fix Autofill ANR when entry has no TOTP (#1746)
This commit is contained in:
parent
acc448ce74
commit
d8b5880215
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue