aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorFabian Henneke <FabianHenneke@users.noreply.github.com>2020-07-30 10:29:01 +0200
committerGitHub <noreply@github.com>2020-07-30 13:59:01 +0530
commit3afeff45d8bd5fff66e1d0fa2c15fa2527487af1 (patch)
tree7aef187653ee2b8dd4a8606cbffe708e03b7e409 /app/src/main
parent8481491994f51127aa04aebcd26904ad904d6a77 (diff)
Fix two SMS Autofill crashes (#985)
SMS OTP Autofill currently crashes for two reasons: 1. Tasks.await has a precondition of not running on the UI thread. 2. Exceptions thrown from Tasks are always wrapped into ExecutionExceptions and need to be unwrapped before they can be identified as ResolvableApiException. This commit addresses both issues by making waitForSms a proper coroutine using withContext and a custom wrapper around Task<T> that relies on suspendCoroutine and automatically unwraps exceptions.
Diffstat (limited to 'app/src/main')
0 files changed, 0 insertions, 0 deletions