Android TV: OTA-update (knop, periodieke check, receiver) alleen in appliance-build.

This commit is contained in:
Jos Vooges | STH 2026-09-27 22:45:13 +02:00
parent a5ee125fb2
commit 8de18d2c48

View file

@ -199,12 +199,13 @@ fun McNav() {
} }
DisposableEffect(Unit) { DisposableEffect(Unit) {
if (!BuildConfig.APPLIANCE_BUILD) return@DisposableEffect onDispose { }
val receiver = OtaInstallReceiver.register(context) val receiver = OtaInstallReceiver.register(context)
onDispose { runCatching { context.unregisterReceiver(receiver) } } onDispose { runCatching { context.unregisterReceiver(receiver) } }
} }
LaunchedEffect(authed, hasProfile) { LaunchedEffect(authed, hasProfile) {
if (!authed || !hasProfile) return@LaunchedEffect if (!BuildConfig.APPLIANCE_BUILD || !authed || !hasProfile) return@LaunchedEffect
while (true) { while (true) {
runCatching { runCatching {
val check = AppUpdateInstaller.check(api) val check = AppUpdateInstaller.check(api)
@ -2545,6 +2546,8 @@ private fun SettingsScreen(
) )
} }
} }
// OTA alleen op de X88 (appliance); store-builds updaten via normale installatie.
if (BuildConfig.APPLIANCE_BUILD) {
Spacer(Modifier.height(10.dp)) Spacer(Modifier.height(10.dp))
SettingsActionRow( SettingsActionRow(
title = when { title = when {
@ -2592,6 +2595,7 @@ private fun SettingsScreen(
} }
}, },
) )
}
if (isOwner) { if (isOwner) {
Spacer(Modifier.height(10.dp)) Spacer(Modifier.height(10.dp))
SettingsActionRow( SettingsActionRow(