Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@qwwdfsad
Copy link
Member

No description provided.

yoonseopshin and others added 4 commits December 20, 2021 10:14
…#3101)

* Fix Dispatchers.Main not being fully initialized on Android

If `unitTests.returnDefaultValues=true` is set, then
`Looper.getMainLooper()` may return `null`. The type system of
Kotlin is tricked to believe that the method can't ever return
`null`, so doesn't check for it anywhere. As a result, despite not
being fully initialized, `Dispatchers.Main` is considered
correct.

This was not an issue before, as it only surfaced when
`Dispatchers.Main` was used. However, now, `Main` is the source of
time for delays, so any delay will throw something
incomprehensible if this happens.
@qwwdfsad qwwdfsad merged commit c51f795 into master Dec 22, 2021
@qwwdfsad qwwdfsad deleted the version-1.6.0 branch December 22, 2021 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants