mirror of
https://github.com/skyline-emu/skyline.git
synced 2025-01-22 12:31:15 +01:00
b7548e51cf
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.