mirror of
https://github.com/android-password-store/Android-Password-Store.git
synced 2025-09-06 04:51:38 +02:00
AutofillDecryptActivity: Show toast on Main dispatcher (#717)
Without this the activity will crash rather than display the error Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
b94b52a42d
commit
0e1dd641d2
|
@ -212,11 +212,13 @@ class AutofillDecryptActivity : Activity(), CoroutineScope {
|
|||
OpenPgpApi.RESULT_CODE_ERROR -> {
|
||||
val error = result.getParcelableExtra<OpenPgpError>(OpenPgpApi.RESULT_ERROR)
|
||||
if (error != null) {
|
||||
Toast.makeText(
|
||||
applicationContext,
|
||||
"Error from OpenKeyChain: ${error.message}",
|
||||
Toast.LENGTH_LONG
|
||||
).show()
|
||||
withContext(Dispatchers.Main) {
|
||||
Toast.makeText(
|
||||
applicationContext,
|
||||
"Error from OpenKeyChain: ${error.message}",
|
||||
Toast.LENGTH_LONG
|
||||
).show()
|
||||
}
|
||||
e { "OpenPgpApi ACTION_DECRYPT_VERIFY failed (${error.errorId}): ${error.message}" }
|
||||
}
|
||||
null
|
||||
|
|
Loading…
Reference in a new issue