Android TV: OTA-update (knop, periodieke check, receiver) alleen in appliance-build.
This commit is contained in:
parent
a5ee125fb2
commit
8de18d2c48
1 changed files with 5 additions and 1 deletions
|
|
@ -199,12 +199,13 @@ fun McNav() {
|
|||
}
|
||||
|
||||
DisposableEffect(Unit) {
|
||||
if (!BuildConfig.APPLIANCE_BUILD) return@DisposableEffect onDispose { }
|
||||
val receiver = OtaInstallReceiver.register(context)
|
||||
onDispose { runCatching { context.unregisterReceiver(receiver) } }
|
||||
}
|
||||
|
||||
LaunchedEffect(authed, hasProfile) {
|
||||
if (!authed || !hasProfile) return@LaunchedEffect
|
||||
if (!BuildConfig.APPLIANCE_BUILD || !authed || !hasProfile) return@LaunchedEffect
|
||||
while (true) {
|
||||
runCatching {
|
||||
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))
|
||||
SettingsActionRow(
|
||||
title = when {
|
||||
|
|
@ -2592,6 +2595,7 @@ private fun SettingsScreen(
|
|||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
if (isOwner) {
|
||||
Spacer(Modifier.height(10.dp))
|
||||
SettingsActionRow(
|
||||
|
|
|
|||
Loading…
Reference in a new issue