mirror of
https://github.com/Michatec/Radio.git
synced 2026-06-15 12:03:22 +02:00
fix(android): resolve compilation error in TV feature detection
Update the Android TV feature check to use the instance-based `packageManager` instead of the static `PackageManager` class. This ensures the `hasSystemFeature` method is called correctly on the available context instance.
This commit is contained in:
@@ -37,7 +37,7 @@ class MainActivity : AppCompatActivity() {
|
||||
|
||||
// Check if the device running the app is an Android TV instance
|
||||
private val isAndroidTV: Boolean by lazy {
|
||||
PackageManager.hasSystemFeature(PackageManager.FEATURE_LEANBACK)
|
||||
packageManager.hasSystemFeature(PackageManager.FEATURE_LEANBACK)
|
||||
}
|
||||
|
||||
// request notification permission (for Android 13+)
|
||||
|
||||
Reference in New Issue
Block a user