Skip to content

Debloat your Android TV, install apps, browse and transfer files on it, all from your phone. Just 3 MB, no tracking, no root, no PC.

Remote: icon keys like Google TV's phone remote, Menu back, a stronger tick

jesse-agent-23222f2ebaa08ab
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e33c2d2..f8f4ca9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,7 +21,8 @@ until this file has a section for its version.
- **New:** Dock up to four apps on the Remote, one tap to open. [#120](../../pull/120)
- **Improved:** TV-only apps get a clear letter tile in their banner's colours. [#131](../../pull/131)
- **Improved:** Restart TV sits in the Remote's top bar and waits with you. [#120](../../pull/120)
-- **Improved:** Sleep and Menu leave the Remote, making room for the dock. [#120](../../pull/120)
+- **New:** The Remote has icon keys like Google TV's phone remote, with Menu. [#PR](../../pull/PR)
+- **Improved:** Sleep leaves the Remote, making room for the dock. [#120](../../pull/120)
- **Fixed:** Menus and the TV header no longer turn purple without dynamic colour. [#119](../../pull/119)
## 0.7.0 — 2026-10-25
diff --git a/README.md b/README.md
index 6f22895..0a128c1 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ Debloat your Android TV, install apps, and browse and transfer files on it, all
<table>
<tr>
<td width="25%"><img src="docs/screenshots/tv-page.png" alt="A TV's page: the TV at a glance, its vitals, and the Install, Debloat and Send buttons"></td>
- <td width="25%"><img src="docs/screenshots/remote.png" alt="The Remote: a D-pad, Back and Home, a dock of four TV apps, volume, Play/Pause and typing on the TV"></td>
+ <td width="25%"><img src="docs/screenshots/remote.png" alt="The Remote: a D-pad, icon keys for Back, Home, Menu, mute and volume, a dock of four TV apps and typing on the TV"></td>
<td width="25%"><img src="docs/screenshots/debloat.png" alt="Debloat: the TV's model on top, then the apps it will turn off, each with its package name"></td>
<td width="25%"><img src="docs/screenshots/install.png" alt="Updating Netflix on the TV from an APK on the phone"></td>
</tr>
@@ -84,7 +84,7 @@ Tellyscope is a phone app that talks to your Android TV, Google TV or Fire TV ov
- **TV tweaks.** **Block ads with Private DNS** sends the TV's address lookups to an ad-blocking DNS provider (AdGuard by default, or any other you type in). Tellyscope then checks the TV can still look addresses up, and puts the old setting back if not. It needs Android 9 or newer. **Faster animations** makes menus move at twice the speed. Both land in History with an Undo. **Clear caches** frees space by clearing every app's temporary files; app data and sign-ins stay. **Take screenshot** saves what the TV shows to your phone.
- **Connection requests.** When another device asks to debug the TV, Tellyscope shows the TV's "Allow debugging?" prompt on your phone, with the device's key fingerprint, so you can **Allow** or **Deny** it without the remote. **Always allow this device** appears when the TV's own prompt offers it.
- **Files.** Send a file from your phone into the TV's Download or Movies folder, or save one from there to your phone. Two buttons under the TV pick the folder, and stay pinned under the bar as you scroll. An empty folder says so in the middle of the page. A file with the same name gets a " (1)" instead of being overwritten, and a cancelled copy leaves nothing half-written behind.
-- **Remote.** A D-pad, Back, Home, volume, Play/Pause and typing on the TV. **Add to dock** puts up to four of the TV's apps under Back and Home, each one tap from opening on the TV. Long-press one to change or remove it, or keep holding and move it to reorder. An app uninstalled from the TV leaves the dock by itself, and a snackbar says so. The restart button in the top bar asks first, then waits for the TV to come back: **Hide** keeps the wait in the top bar, and after a minute **Retry** waits another one.
+- **Remote.** A D-pad and icon keys for Back, Home, Menu, mute and volume, laid out like Google TV's phone remote, plus typing on the TV. Each key gives a short tick; **Vibrate on key press** in Settings turns it off. The D-pad's centre pauses a playing video. **Add to dock** puts up to four of the TV's apps under the volume keys, each one tap from opening on the TV. Long-press one to change or remove it, or keep holding and move it to reorder. An app uninstalled from the TV leaves the dock by itself, and a snackbar says so. The restart button in the top bar asks first, then waits for the TV to come back: **Hide** keeps the wait in the top bar, and after a minute **Retry** waits another one.
## Setting up your TV
diff --git a/adb/src/main/kotlin/app/tellyscope/adb/Remote.kt b/adb/src/main/kotlin/app/tellyscope/adb/Remote.kt
index 6c20927..91e77d9 100644
--- a/adb/src/main/kotlin/app/tellyscope/adb/Remote.kt
+++ b/adb/src/main/kotlin/app/tellyscope/adb/Remote.kt
@@ -15,6 +15,7 @@ enum class RemoteKey(val code: Int, val repeats: Boolean = false) {
OK(23),
BACK(4),
HOME(3),
+ MENU(82),
PLAY_PAUSE(85),
VOLUME_UP(24, repeats = true),
VOLUME_DOWN(25, repeats = true),
diff --git a/app/src/main/java/app/tellyscope/MainActivity.kt b/app/src/main/java/app/tellyscope/MainActivity.kt
index 3567e77..b90c0e3 100644
--- a/app/src/main/java/app/tellyscope/MainActivity.kt
+++ b/app/src/main/java/app/tellyscope/MainActivity.kt
@@ -43,6 +43,7 @@ import app.tellyscope.data.AdbDeviceSource
import app.tellyscope.data.AndroidPhoneStorage
import app.tellyscope.data.FakeDeviceSource
import app.tellyscope.data.FoldBook
+import app.tellyscope.data.KeyHaptics
import app.tellyscope.data.UpdateCheck
import app.tellyscope.ui.AdvancedScreen
import app.tellyscope.ui.Copy
@@ -98,6 +99,7 @@ class MainActivity : ComponentActivity() {
AndroidPhoneStorage(applicationContext),
updates = if (scenario != null) null else updateCheck(),
folds = FoldBook(File(filesDir, "folds.properties")),
+ keyHaptics = KeyHaptics(File(filesDir, "remote.properties")),
appFacts = AppFacts(installedVersion(), "${Build.MANUFACTURER} ${Build.MODEL}, Android ${Build.VERSION.RELEASE}"),
)
}
@@ -238,6 +240,8 @@ fun TellyscopeApp(vm: TellyscopeViewModel) {
checkUpdates = state.checkUpdates,
alphaBuild = state.alphaBuild,
onCheckUpdates = vm::setCheckUpdates,
+ keyHaptics = state.keyHaptics,
+ onKeyHaptics = vm::setKeyHaptics,
onReport = { vm.openReport(ReportKind.Problem) },
back = { settings = false },
snackbar = snackbar,
diff --git a/app/src/main/java/app/tellyscope/data/KeyHaptics.kt b/app/src/main/java/app/tellyscope/data/KeyHaptics.kt
new file mode 100644
index 0000000..095f4e9
--- /dev/null
+++ b/app/src/main/java/app/tellyscope/data/KeyHaptics.kt
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-3.0-only
+
+package app.tellyscope.data
+
+import java.io.File
+import java.util.Properties
+
+/** Whether a Remote key press vibrates, kept in [file]. On until the user turns it off. */
+class KeyHaptics(private val file: File) {
+ @get:Synchronized @set:Synchronized
+ var on: Boolean
+ get() = props().getProperty("off") != "true"
+ set(on) {
+ val p = props().apply { if (on) remove("off") else setProperty("off", "true") }
+ runCatching {
+ file.parentFile?.mkdirs()
+ file.outputStream().use { p.store(it, null) }
+ }
+ }
+
+ private fun props() = Properties().apply {
+ runCatching { file.takeIf { it.exists() }?.inputStream()?.use(::load) }
+ }
+}
diff --git a/app/src/main/java/app/tellyscope/ui/RemoteScreen.kt b/app/src/main/java/app/tellyscope/ui/RemoteScreen.kt
index b6c7be7..2105ebe 100644
--- a/app/src/main/java/app/tellyscope/ui/RemoteScreen.kt
+++ b/app/src/main/java/app/tellyscope/ui/RemoteScreen.kt
@@ -30,6 +30,7 @@ import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.CircleShape
+import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.KeyboardActions
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.foundation.verticalScroll
@@ -37,12 +38,12 @@ import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.automirrored.filled.Send
import androidx.compose.material.icons.filled.Add
-import androidx.compose.material.icons.filled.Home
+import androidx.compose.material.icons.filled.Menu
import androidx.compose.material.icons.filled.KeyboardArrowDown
import androidx.compose.material.icons.filled.KeyboardArrowLeft
import androidx.compose.material.icons.filled.KeyboardArrowRight
import androidx.compose.material.icons.filled.KeyboardArrowUp
-import androidx.compose.material.icons.filled.PlayArrow
+import androidx.compose.material.icons.outlined.Home
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.Button
import androidx.compose.material3.Card
@@ -72,6 +73,7 @@ import androidx.compose.material3.TopAppBar
import androidx.compose.material3.ripple
import androidx.compose.material3.toShape
import androidx.compose.runtime.Composable
+import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.getValue
import androidx.compose.runtime.key
import androidx.compose.runtime.mutableFloatStateOf
@@ -81,6 +83,7 @@ import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.rememberUpdatedState
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
+import androidx.compose.runtime.staticCompositionLocalOf
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.alpha
@@ -108,6 +111,7 @@ import androidx.compose.ui.semantics.role
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.text.style.TextOverflow
+import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.IntOffset
import androidx.compose.ui.unit.dp
import androidx.compose.ui.zIndex
@@ -186,7 +190,8 @@ fun RemoteScreen(
TopAppBar(
title = { if (restart != null && hidden == stage) RestartStatus(late = restart.phase(state.now) != Restart.Phase.Waiting, onClick = { hidden = null }) else Text("Remote") },
navigationIcon = {
- IconButton(onClick = actions.back) { Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = "Back to the TV's page") }
+ // A chevron, not an arrow, so it can't be mistaken for the TV's Back key.
+ IconButton(onClick = actions.back) { Icon(Icons.Default.KeyboardArrowDown, contentDescription = "Back to the TV's page") }
},
actions = {
IconButton(onClick = { confirmReboot = true }, enabled = live) { Icon(RemoteIcons.RestartAlt, contentDescription = "Restart TV") }
@@ -204,33 +209,36 @@ fun RemoteScreen(
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
- Column(
+ CompositionLocalProvider(LocalKeyHaptics provides state.keyHaptics) { Column(
Modifier.alpha(if (live) 1f else 0.38f),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.spacedBy(20.dp),
) {
DPad(live, actions.press)
- // Two keys where there were three: Menu went, and its room stays in case it comes back.
- Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceEvenly) {
- RoundKey(RemoteKey.BACK, "Back", live, actions.press) { Icon(Icons.AutoMirrored.Filled.ArrowBack, null) }
- RoundKey(RemoteKey.HOME, "Home", live, actions.press) { Icon(Icons.Default.Home, null) }
+ Box(Modifier.fillMaxWidth(), contentAlignment = Alignment.Center) {
+ RoundKey(RemoteKey.BACK, "Back", live, actions.press, Modifier.align(Alignment.CenterStart)) { Icon(Icons.AutoMirrored.Filled.ArrowBack, null) }
+ RoundKey(RemoteKey.HOME, "Home", live, actions.press, size = 80.dp) { Icon(Icons.Outlined.Home, null, Modifier.size(32.dp)) }
+ RoundKey(RemoteKey.MENU, "Menu", live, actions.press, Modifier.align(Alignment.CenterEnd)) { Icon(Icons.Default.Menu, null) }
}
- // Clear space above and below, so a thumb aiming at Back, Home or Vol doesn't open an app.
- DockSection(state.device.dock, state.device.apps, name(device), live, actions, Modifier.padding(vertical = 4.dp))
- Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(8.dp)) {
- PillKey(RemoteKey.VOLUME_DOWN, "Volume down", live, actions.press, Modifier.weight(1f)) { Text("Vol −") }
- PillKey(RemoteKey.MUTE, "Mute", live, actions.press, Modifier.weight(1f)) { Text("Mute") }
- PillKey(RemoteKey.VOLUME_UP, "Volume up", live, actions.press, Modifier.weight(1f)) { Text("Vol +") }
- }
- PillKey(RemoteKey.PLAY_PAUSE, "Play or pause", live, actions.press, Modifier.fillMaxWidth()) {
- Row(verticalAlignment = Alignment.CenterVertically) {
- Icon(Icons.Default.PlayArrow, null)
- Spacer(Modifier.width(8.dp))
- Text("Play / Pause")
+ Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(16.dp), verticalAlignment = Alignment.CenterVertically) {
+ RoundKey(RemoteKey.MUTE, "Mute or unmute", live, actions.press) { Icon(RemoteIcons.VolumeOff, null) }
+ // One split pill: two halves of the same key, so the gap stays narrow.
+ Row(Modifier.weight(1f), horizontalArrangement = Arrangement.spacedBy(4.dp)) {
+ val (outer, inner) = 32.dp to 4.dp
+ KeySurface(
+ RemoteKey.VOLUME_DOWN, "Volume down", live, actions.press, RoundedCornerShape(outer, inner, inner, outer),
+ MaterialTheme.colorScheme.secondaryContainer, Modifier.weight(1f).height(64.dp),
+ ) { Icon(RemoteIcons.VolumeDown, null) }
+ KeySurface(
+ RemoteKey.VOLUME_UP, "Volume up", live, actions.press, RoundedCornerShape(inner, outer, outer, inner),
+ MaterialTheme.colorScheme.secondaryContainer, Modifier.weight(1f).height(64.dp),
+ ) { Icon(RemoteIcons.VolumeUp, null) }
}
}
+ // Clear space above and below, so a thumb aiming at a volume key doesn't open an app.
+ DockSection(state.device.dock, state.device.apps, name(device), live, actions, Modifier.padding(vertical = 4.dp))
Keyboard(live, actions.type)
- }
+ } }
}
}
}
@@ -257,30 +265,25 @@ private fun DPad(enabled: Boolean, press: suspend (RemoteKey) -> Boolean) {
KeySurface(
RemoteKey.OK, "OK", enabled, press, CircleShape, MaterialTheme.colorScheme.primary,
Modifier.size(112.dp).align(Alignment.Center),
- ) {
- Text("OK", style = MaterialTheme.typography.headlineSmall, color = MaterialTheme.colorScheme.onPrimary)
- }
+ ) {}
}
}
}
+/** An icon-only key; [label] is what TalkBack reads. */
@Composable
-private fun RoundKey(key: RemoteKey, label: String, enabled: Boolean, press: suspend (RemoteKey) -> Boolean, icon: @Composable () -> Unit) {
- Column(horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(4.dp)) {
- KeySurface(key, label, enabled, press, CircleShape, MaterialTheme.colorScheme.secondaryContainer, Modifier.size(64.dp), icon)
- Text(label, style = MaterialTheme.typography.labelLarge, color = MaterialTheme.colorScheme.onSurfaceVariant)
- }
-}
-
-@Composable
-private fun PillKey(
+private fun RoundKey(
key: RemoteKey,
label: String,
enabled: Boolean,
press: suspend (RemoteKey) -> Boolean,
modifier: Modifier = Modifier,
- content: @Composable () -> Unit,
-) = KeySurface(key, label, enabled, press, MaterialTheme.shapes.extraLarge, MaterialTheme.colorScheme.secondaryContainer, modifier.height(56.dp), content)
+ size: Dp = 64.dp,
+ icon: @Composable () -> Unit,
+) = KeySurface(key, label, enabled, press, CircleShape, MaterialTheme.colorScheme.secondaryContainer, modifier.size(size), icon)
+
+/** Off in Settings, a key press doesn't vibrate. */
+private val LocalKeyHaptics = staticCompositionLocalOf { true }
/**
* One remote key. Not a Button: a held [RemoteKey.repeats] key has to keep sending until the
@@ -299,6 +302,7 @@ private fun KeySurface(
) {
val scope = rememberCoroutineScope()
val haptic = LocalHapticFeedback.current
+ val haptics = LocalKeyHaptics.current
val interactions = remember { MutableInteractionSource() }
Surface(
shape = shape,
@@ -311,13 +315,13 @@ private fun KeySurface(
contentDescription = label
if (enabled) onClick { scope.launch { press(key) }; true }
}
- .pointerInput(key, enabled) {
+ .pointerInput(key, enabled, haptics) {
if (!enabled) return@pointerInput
awaitEachGesture {
val down = awaitFirstDown()
val p = PressInteraction.Press(down.position)
interactions.tryEmit(p)
- haptic.performHapticFeedback(HapticFeedbackType.TextHandleMove)
+ if (haptics) haptic.performHapticFeedback(HapticFeedbackType.VirtualKey)
var held = true
scope.launch { repeatWhileHeld(key, { held }, press) }
waitForUpOrCancellation()
@@ -695,6 +699,22 @@ private object RemoteIcons {
"M2 4.27L5.11 7.38C3.29 8.12 2 9.91 2 12C2 14.76 4.24 17 7 17L11 17L11 15.1L7 15.1C5.29 15.1 3.9 13.71 3.9 12C3.9 10.41 5.11 9.1 6.66 8.93" +
"L8.73 11L8 11L8 13L10.73 13L13 15.27L13 17L14.73 17L18.74 21L20 19.74L3.27 3L2 4.27Z",
)
+ val VolumeUp = icon(
+ "VolumeUp",
+ "M3 9L3 15L7 15L12 20L12 4L7 9Z M16.5 12C16.5 10.23 15.48 8.71 14 7.97L14 16.02C15.48 15.29 16.5 13.77 16.5 12Z" +
+ "M14 3.23L14 5.29C16.89 6.15 19 8.83 19 12C19 15.17 16.89 17.85 14 18.71L14 20.77C18.01 19.86 21 16.28 21 12C21 7.72 18.01 4.14 14 3.23Z",
+ )
+ val VolumeDown = icon(
+ "VolumeDown",
+ "M18.5 12C18.5 10.23 17.48 8.71 16 7.97L16 16.02C17.48 15.29 18.5 13.77 18.5 12Z M5 9L5 15L9 15L14 20L14 4L9 9Z",
+ )
+ val VolumeOff = icon(
+ "VolumeOff",
+ "M16.5 12C16.5 10.23 15.48 8.71 14 7.97L14 10.18L16.45 12.63C16.48 12.43 16.5 12.22 16.5 12Z" +
+ "M19 12C19 12.94 18.8 13.82 18.46 14.64L19.97 16.15C20.63 14.91 21 13.5 21 12C21 7.72 18.01 4.14 14 3.23L14 5.29C16.89 6.15 19 8.83 19 12Z" +
+ "M4.27 3L3 4.27L7.73 9L3 9L3 15L7 15L12 20L12 13.27L16.25 17.52C15.58 18.04 14.83 18.45 14 18.7L14 20.76C15.38 20.45 16.63 19.81 17.69 18.95" +
+ "L19.73 21L21 19.73L12 10.73L4.27 3Z M12 4L9.91 6.09L12 8.18L12 4Z",
+ )
val SwapHoriz = icon("SwapHoriz", "M6.99 11L3 15L6.99 19L6.99 16L14 16L14 14L6.99 14L6.99 11Z M21 9L17.01 5L17.01 8L10 8L10 10L17.01 10L17.01 13L21 9Z")
val RemoveCircle = icon(
"RemoveCircle",
diff --git a/app/src/main/java/app/tellyscope/ui/SettingsScreen.kt b/app/src/main/java/app/tellyscope/ui/SettingsScreen.kt
index 4d53eb6..6d539dc 100644
--- a/app/src/main/java/app/tellyscope/ui/SettingsScreen.kt
+++ b/app/src/main/java/app/tellyscope/ui/SettingsScreen.kt
@@ -80,6 +80,8 @@ fun SettingsScreen(
alphaBuild: Boolean,
onCheckUpdates: (Boolean) -> Unit,
back: () -> Unit,
+ keyHaptics: Boolean = true,
+ onKeyHaptics: (Boolean) -> Unit = {},
onReport: () -> Unit = {},
snackbar: SnackbarHostState = remember { SnackbarHostState() },
) {
@@ -124,6 +126,20 @@ fun SettingsScreen(
Switch(checked = checkUpdates, onCheckedChange = null)
}
if (checkUpdates != null) HorizontalDivider(color = MaterialTheme.colorScheme.surface)
+ Row(
+ Modifier.fillMaxWidth()
+ .toggleable(keyHaptics, role = Role.Switch, onValueChange = onKeyHaptics)
+ .padding(16.dp),
+ verticalAlignment = Alignment.CenterVertically,
+ ) {
+ Column(Modifier.weight(1f)) {
+ Text("Vibrate on key press", style = MaterialTheme.typography.titleSmall)
+ Text("A short tick for each key on the Remote.", style = MaterialTheme.typography.bodyMedium)
+ }
+ Spacer(Modifier.width(16.dp))
+ Switch(checked = keyHaptics, onCheckedChange = null)
+ }
+ HorizontalDivider(color = MaterialTheme.colorScheme.surface)
Row(Modifier.fillMaxWidth().clickable(onClick = onReport).padding(16.dp), verticalAlignment = Alignment.CenterVertically) {
Icon(BugReport, contentDescription = null, tint = MaterialTheme.colorScheme.onSurfaceVariant)
Spacer(Modifier.width(16.dp))
diff --git a/app/src/main/java/app/tellyscope/ui/TellyscopeViewModel.kt b/app/src/main/java/app/tellyscope/ui/TellyscopeViewModel.kt
index 85c561f..f53bd3d 100644
--- a/app/src/main/java/app/tellyscope/ui/TellyscopeViewModel.kt
+++ b/app/src/main/java/app/tellyscope/ui/TellyscopeViewModel.kt
@@ -30,6 +30,7 @@ import app.tellyscope.data.DeviceState
import app.tellyscope.data.Dock
import app.tellyscope.data.Docked
import app.tellyscope.data.HistoryEntry
+import app.tellyscope.data.KeyHaptics
import app.tellyscope.data.NetworkInfo
import app.tellyscope.data.NotAnApp
import app.tellyscope.data.PhoneStorage
@@ -169,6 +170,8 @@ data class UiState(
val alphaBuild: Boolean = false,
/** A newer release to offer; cleared once the user answers. */
val update: Update? = null,
+ /** A Remote key press vibrates. */
+ val keyHaptics: Boolean = true,
/** The Apps tabs whose System section the user folded away. */
val foldedSystem: Set<AppsTab> = emptySet(),
/** The report screen; null when it's closed. */
@@ -225,6 +228,7 @@ class TellyscopeViewModel(
private val clock: () -> Long = System::currentTimeMillis,
private val updates: UpdateCheck? = null,
private val folds: FoldBook? = null,
+ private val keyHaptics: KeyHaptics? = null,
/** This build and phone, for reports. */
private val appFacts: AppFacts = AppFacts("unknown", "unknown phone"),
) : ViewModel() {
@@ -283,6 +287,9 @@ class TellyscopeViewModel(
updates?.let { u ->
viewModelScope.launch(Dispatchers.IO) { _state.update { it.copy(checkUpdates = u.enabled, alphaBuild = u.alpha) } }
}
+ keyHaptics?.let { k ->
+ viewModelScope.launch(Dispatchers.IO) { _state.update { it.copy(keyHaptics = k.on) } }
+ }
folds?.let { f ->
viewModelScope.launch(Dispatchers.IO) {
val folded = f.folded().mapNotNull { name -> AppsTab.entries.firstOrNull { it.name == name } }.toSet()
@@ -970,6 +977,11 @@ class TellyscopeViewModel(
viewModelScope.launch(Dispatchers.IO) { u.enabled = on }
}
+ fun setKeyHaptics(on: Boolean) {
+ _state.update { it.copy(keyHaptics = on) }
+ viewModelScope.launch(Dispatchers.IO) { keyHaptics?.on = on }
+ }
+
/** Disables the ticked suggestions one by one, each recorded in History with its own undo. */
fun disableSuggested(packages: List<String>) {
val id = _state.value.selectedId ?: return
diff --git a/app/src/test/java/app/tellyscope/ScreenshotTest.kt b/app/src/test/java/app/tellyscope/ScreenshotTest.kt
index 8ab58ee..6f4b071 100644
--- a/app/src/test/java/app/tellyscope/ScreenshotTest.kt
+++ b/app/src/test/java/app/tellyscope/ScreenshotTest.kt
@@ -940,6 +940,16 @@ class ScreenshotTest {
@Test fun remote_dark() = shot("12_remote", dark = true) { RemoteScreen(remoteState(), RemoteActions()) }
+ @Test fun remoteKeysAreIconsWithSpokenNames() {
+ compose.setContent { TellyscopeTheme(dynamic = false) { RemoteScreen(remoteState(), RemoteActions()) } }
+ listOf("OK", "Back", "Home", "Menu", "Mute or unmute", "Volume down", "Volume up").forEach {
+ compose.onNodeWithContentDescription(it).assertExists()
+ }
+ // Play/Pause went: the D-pad's centre pauses a video.
+ compose.onNodeWithContentDescription("Play or pause").assertDoesNotExist()
+ compose.onNodeWithText("OK").assertDoesNotExist()
+ }
+
/**
* The apps' own icons, for the README's Remote shot only. Test resources, so they never reach the
* APK; the names and logos belong to their owners (see NOTICE).