skyline/app/src/main/java/emu
lynxnb b7548e51cf Use AndroidX use extension function instead of Kotlin built-in one
The Kotlin built-in `use` extension function applies to `AutoCloseable` only, and throws an error if the object it's being called on is not an `AutoCloseable`. This causes `OnScreenView` to fail to inflate on SDK < 31 as it retrieved the current theme primary color with a `TypedArray`, which only implements `AutoCloseable` since SDK 31 (Android 12).
The AndroidX core library provides a `use` extension function that applies to `TypeArray` instead of `AutoCloseable` so the fix is just a simple import.
2023-05-02 12:27:57 +01:00
..
skyline Use AndroidX use extension function instead of Kotlin built-in one 2023-05-02 12:27:57 +01:00