Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Dispatchers.Main not being fully initialized on Android and Swing (…
…#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.
- Loading branch information
1 parent
69bc2a3
commit bbb175b
Showing
3 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters