StreamVault is a TV-first free IPTV player for Android TV built with Kotlin, Jetpack Compose, Room, Hilt, and Media3.
Kotlin iptv-player
Harden Downloads remote navigation checks
David Nashash634703c61c9b
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.mdindex eef77373..2cd60f82 100644--- a/docs/CHANGELOG.md+++ b/docs/CHANGELOG.md@@ -17,6 +17,7 @@ All notable product changes are recorded in this document.- Improved playback interruption diagnostics to distinguish rebuffering from dropped frames and track interruption durations more accurately.### Fixed+- Fixed TV remote navigation on Downloads so playback and delete actions, confirmation buttons, and items remain reachable and focused.- Fixed interruptions during on-demand playback when an idle connection closes, by retrying the interrupted download in place.- Fixed Android TV guide publication failing when the platform rejects SQL filters on programme queries.- Fixed eligible live MPEG-TS channels remaining unavailable after an Android TV-input video surface was recreated; playback now makes one safe recovery attempt.diff --git a/feature/system/src/androidTest/assets/ui-goldens/downloads_completed.png b/feature/system/src/androidTest/assets/ui-goldens/downloads_completed.pngindex 646dfedf..75d435ec 100644Binary files a/feature/system/src/androidTest/assets/ui-goldens/downloads_completed.png and b/feature/system/src/androidTest/assets/ui-goldens/downloads_completed.png differdiff --git a/feature/system/src/androidTest/java/com/streamvault/feature/system/DownloadsRemoteNavigationTest.kt b/feature/system/src/androidTest/java/com/streamvault/feature/system/DownloadsRemoteNavigationTest.ktindex 96fb6738..80466027 100644--- a/feature/system/src/androidTest/java/com/streamvault/feature/system/DownloadsRemoteNavigationTest.kt+++ b/feature/system/src/androidTest/java/com/streamvault/feature/system/DownloadsRemoteNavigationTest.kt@@ -1,5 +1,6 @@package com.streamvault.feature.system+import android.view.KeyEvent as AndroidKeyEventimport androidx.compose.foundation.layout.Columnimport androidx.compose.foundation.layout.fillMaxSizeimport androidx.compose.runtime.getValue@@ -11,6 +12,7 @@ import androidx.compose.ui.input.key.Keyimport androidx.compose.ui.semantics.SemanticsActionsimport androidx.compose.ui.test.ExperimentalTestApiimport androidx.compose.ui.test.assertIsFocused+import androidx.compose.ui.test.assertIsDisplayedimport androidx.compose.ui.test.captureToImageimport androidx.compose.ui.test.hasClickActionimport androidx.compose.ui.test.hasAnyAncestor@@ -21,9 +23,11 @@ import androidx.compose.ui.test.junit4.createComposeRuleimport androidx.compose.ui.test.onRootimport androidx.compose.ui.test.performKeyInputimport androidx.compose.ui.test.performSemanticsAction+import androidx.compose.ui.test.performScrollToimport androidx.compose.ui.test.pressKeyimport androidx.tv.material3.MaterialThemeimport androidx.test.ext.junit.runners.AndroidJUnit4+import androidx.test.platform.app.InstrumentationRegistryimport com.google.common.truth.Truth.assertThatimport com.streamvault.core.ui.theme.StreamVaultThemeimport com.streamvault.domain.model.DownloadContentType@@ -53,9 +57,8 @@ class DownloadsRemoteNavigationTest {focus("Change download folder")press(Key.DirectionDown)- repeat(2) {- if (!isFocused("Delete")) press(Key.DirectionRight)- }+ press(Key.DirectionDown)+ if (!isFocused("Delete")) press(Key.DirectionRight)composeRule.onNode(hasText("Delete") and hasClickAction()).assertIsFocused()press(Key.Enter)@@ -272,9 +275,13 @@ class DownloadsRemoteNavigationTest {private fun focus(text: String, index: Int? = null) {val matcher = hasText(text) and hasClickAction()- (if (index == null) composeRule.onNode(matcher) else composeRule.onAllNodes(matcher)[index])- .performSemanticsAction(SemanticsActions.RequestFocus)+ val target = if (index == null) composeRule.onNode(matcher) else composeRule.onAllNodes(matcher)[index]+ if (runCatching { target.assertIsDisplayed() }.isFailure) target.performScrollTo()+ // Exit Android touch mode as a physical TV remote does before requesting focus.+ InstrumentationRegistry.getInstrumentation().sendKeyDownUpSync(AndroidKeyEvent.KEYCODE_DPAD_DOWN)+ target.performSemanticsAction(SemanticsActions.RequestFocus)composeRule.waitForIdle()+ target.assertIsFocused()}private fun press(key: Key) {