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.

With no default home, only the TV's own launchers stay locked

jesse-agent-2325d5412f6fdb0
diff --git a/README.md b/README.md
index 13d9a9d..2015b6d 100644
--- a/README.md
+++ b/README.md
@@ -72,7 +72,7 @@ Tellyscope is a phone app that talks to your Android TV, Google TV or Fire TV ov
- **The main jobs up front.** Big **Install app**, **Debloat** and **Send file** tiles sit right under the vitals. Debloat shows a count while the TV's list still has apps on, or while apps Tellyscope turned off are back on, often after a TV update. When there's nothing left, it opens Apps instead. Below the tiles, one line says how many apps on the TV's list are off. If any came back on, a red line says so. Below that are the TV's Android version, when it last updated, and **Check for updates**, which opens the TV's own update screen. The Apps tab has an **Install app** button, and Files has **Upload files**.
- **Advanced.** Every number in one place: memory, storage, CPU, temperature, uptime and screen state, CPU and RAM by app, processes, network and data used, and the TV's address.
- **Apps.** Every app on the TV with its real name and icon, under three buttons: **Running** (what's using memory now), **Installed** (only the apps you put on the TV) and **Built-in** (what came with it). The buttons stay pinned under the bar as you scroll. Stop, disable or turn back on any app that isn't protected; each button says what it will do and asks first. Apps you installed yourself also offer **Uninstall**, which asks in a dialog that names the app and says it can't be undone. On Running and Built-in, the protected apps sit last under **System**, which folds away with a tap and stays folded until you open it again. **Search apps** sits under the buttons and pins with them. Tap it and the field moves to the top, the TV and the buttons step aside, and every matching app shows in one list. ← or Back brings them back.
-- **Another home screen.** On a TV with the Play Store whose Home is still its own launcher, Apps shows a card that offers a better home screen, and Tweaks keeps **Choose one** after **Not now** puts the card away for that TV. Neither shows once Home opens a launcher you added. Tellyscope isn't affiliated with any of the launchers it recommends. Pick one of four recommended launchers (Projectivy, AT4K, Dispatch or the open-source FLauncher), and Tellyscope opens its Play Store page on the TV, waits for the install and then offers to make it Home. If the Store doesn't open, it says so and offers another launcher or a retry. With a second launcher such as Projectivy installed, its row in Apps offers **Set as default launcher**. Tellyscope makes it Home, checks that Home really opens it, and only then disables the old launcher, so the TV can't switch back by itself. The one exception: a stock launcher that outranks the rest, e.g. Android TV Home, is turned off first and turned back on if Home still doesn't open the new one. One Undo in History turns the old launcher back on and makes it Home again. Later, the new launcher's row offers **Switch home back to** the one it replaced, or the TV's own if there was no switch: it's turned back on if it's off and made Home, and the added launcher stays, free to uninstall. For a launcher that keeps Home with its own accessibility service, such as Projectivy (the ones marked in [`launchers.json`](app/src/main/assets/launchers.json)), Set as default then asks separately whether to turn that service on, for TVs whose Home button opens their own launcher whatever the default is: **Turn it on** or **Switch without it**. Without it, the TV's page says Home may still open the TV's own launcher, with **Got it** and **Turn on**, and the launcher's row keeps **Turn on**. Undo and Switch home back turn it off again, and any other accessibility services stay as they were. The added launcher on Home also offers **Uninstall**: its confirm lists the steps, then Tellyscope switches Home back (turning the service off) and uninstalls it only if that worked. Only the launcher on Home is protected; another one you installed, such as FLauncher while Projectivy is Home, can be disabled or uninstalled. Settings and other apps that only answer Home as a fallback are never offered as launchers. On Google TV, the Apps row and the Live tab are part of the old launcher and go with it.
+- **Another home screen.** On a TV with the Play Store whose Home is still its own launcher, Apps shows a card that offers a better home screen, and Tweaks keeps **Choose one** after **Not now** puts the card away for that TV. Neither shows once a launcher you added is on the TV, whether or not it's Home. Tellyscope isn't affiliated with any of the launchers it recommends. Pick one of four recommended launchers (Projectivy, AT4K, Dispatch or the open-source FLauncher), and Tellyscope opens its Play Store page on the TV, waits for the install and then offers to make it Home. If the Store doesn't open, it says so and offers another launcher or a retry. With a second launcher such as Projectivy installed, its row in Apps offers **Set as default launcher**. Tellyscope makes it Home, checks that Home really opens it, and only then disables the old launcher, so the TV can't switch back by itself. The one exception: a stock launcher that outranks the rest, e.g. Android TV Home, is turned off first and turned back on if Home still doesn't open the new one. One Undo in History turns the old launcher back on and makes it Home again. Later, the new launcher's row offers **Switch home back to** the one it replaced, or the TV's own if there was no switch: it's turned back on if it's off and made Home, and the added launcher stays, free to uninstall. For a launcher that keeps Home with its own accessibility service, such as Projectivy (the ones marked in [`launchers.json`](app/src/main/assets/launchers.json)), Set as default then asks separately whether to turn that service on, for TVs whose Home button opens their own launcher whatever the default is: **Turn it on** or **Switch without it**. Without it, the TV's page says Home may still open the TV's own launcher, with **Got it** and **Turn on**, and the launcher's row keeps **Turn on**. Undo and Switch home back turn it off again, and any other accessibility services stay as they were. The added launcher on Home also offers **Uninstall**: its confirm lists the steps, then Tellyscope switches Home back (turning the service off) and uninstalls it only if that worked. Only the launcher on Home is protected; another one you installed, such as FLauncher while Projectivy is Home, can be disabled or uninstalled. Installing a second launcher can leave the TV with no default home screen. Then only the TV's own launcher is protected, and each one you installed offers **Set as default launcher** and **Uninstall**. Settings and other apps that only answer Home as a fallback are never offered as launchers. On Google TV, the Apps row and the Live tab are part of the old launcher and go with it.
- **Debloat.** It finds your TV among 300+ tested clean-up lists (adapted from [cleanyourtv](https://github.com/Gathin23/cleanyourtv)) and opens on every app it will turn off, with the model on top. With no list for the model, it shows apps from the maker's other lists, none ticked. With none for the maker either, you tick the TV's own apps by hand; the ones it needs aren't shown. **Not this TV?** searches every list. Your pick is remembered, and the TV's page then says how many of the list's apps are still on. Apps are pre-ticked only when the TV runs the Android version the list was tested on; untick anything you use, and you confirm before anything is disabled. If you'd rather not trust our lists, point the app at your own fork of them under **Advanced** in Settings (see [CONTRIBUTING](CONTRIBUTING.md#using-your-own-lists)).
<img src="docs/screenshots/clean-home.jpg" alt="A TV home screen after debloating: the inputs and the user's own apps, with no ads or suggestions" width="100%">
diff --git a/adb/src/main/kotlin/app/tellyscope/adb/Actions.kt b/adb/src/main/kotlin/app/tellyscope/adb/Actions.kt
index 9b3fc5e..dc65aaa 100644
--- a/adb/src/main/kotlin/app/tellyscope/adb/Actions.kt
+++ b/adb/src/main/kotlin/app/tellyscope/adb/Actions.kt
@@ -21,7 +21,11 @@ sealed interface HomeResult {
}
/** The launcher Home opens now, and the other launchers that could take its place. */
-data class HomeOptions(val current: String, val others: Set<String>)
+/**
+ * [current] is Home; [others] are the launchers that can take over. With no default home, [current]
+ * is the TV's own launcher, the one the others would replace, and [default] is false.
+ */
+data class HomeOptions(val current: String, val others: Set<String>, val default: Boolean = true)
class Actions(private val shell: AdbShell) {
@@ -57,18 +61,24 @@ class Actions(private val shell: AdbShell) {
private suspend fun userPackages() = Parsers.packages(shell.shell(Commands.USER_PACKAGES).output).map { it.name }.toSet()
/**
- * Launchers to protect: the default one, or every installed launcher when there's no default
- * (then resolve-activity answers with the system chooser, package `android`).
+ * Launchers to protect: the default one, or with no default (then resolve-activity answers
+ * with the system chooser, package `android`) every built-in launcher. One the user installed
+ * isn't locked then: without it, Home still has the TV's own. Every launcher when the user's
+ * are all there is.
*/
suspend fun homePackages(): Set<String> {
val current = packagesIn(shell.shell(Commands.HOME_ACTIVITY).output) - "android"
- return current.ifEmpty { packagesIn(shell.shell(Commands.HOME_ACTIVITIES).output) - "android" }
+ if (current.isNotEmpty()) return current
+ val all = packagesIn(shell.shell(Commands.HOME_ACTIVITIES).output) - "android"
+ if (all.isEmpty()) return all
+ return (all - userPackages()).ifEmpty { all }
}
- /** Null when the TV has no default home (it asks each time) or didn't answer. */
+ /** Null when the TV didn't answer, or has no default home and no launcher of its own that is on. */
suspend fun homeOptions(): HomeOptions? {
- val current = currentHome()?.substringBefore('/') ?: return null
- return HomeOptions(current, launchers().keys - current)
+ currentHome()?.substringBefore('/')?.let { return HomeOptions(it, launchers().keys - it) }
+ val stock = stockHome()?.substringBefore('/') ?: return null
+ return HomeOptions(stock, launchers().keys - stock, default = false)
}
/**
@@ -81,7 +91,8 @@ class Actions(private val shell: AdbShell) {
*/
suspend fun makeHome(pkg: String): HomeResult {
require(PACKAGE.matches(pkg)) { "not a package name: $pkg" }
- val from = currentHome() ?: return HomeResult.Refused(ProtectedReason.UNKNOWN_HOME)
+ // With no default home, the TV's own launcher is the one being replaced.
+ val from = currentHome() ?: stockHome() ?: return HomeResult.Refused(ProtectedReason.UNKNOWN_HOME)
val old = from.substringBefore('/')
if (old == pkg) return HomeResult.Failed("it's already the home screen")
val homes = shell.shell(Commands.HOME_ACTIVITIES).output
@@ -187,6 +198,14 @@ class Actions(private val shell: AdbShell) {
suspend fun currentHome(): String? =
activitiesIn(shell.shell(Commands.HOME_ACTIVITY).output).singleOrNull()?.takeUnless { it.startsWith("android/") }
+ /** With no default home, the TV's own launcher that is on: the built-in one Home ranks highest. */
+ private suspend fun stockHome(): String? {
+ val homes = shell.shell(Commands.HOME_ACTIVITIES).output
+ val builtIn = launchersIn(homes).ifEmpty { return null } - userPackages()
+ val priority = prioritiesIn(homes)
+ return builtIn.maxByOrNull { priority[it.key] ?: 0 }?.value
+ }
+
/**
* Every enabled launcher, package to its home activity. Apps protected for another reason
* aren't launchers, though they may answer Home: TV Settings has a fallback home screen.
diff --git a/adb/src/test/kotlin/app/tellyscope/adb/ActionsTest.kt b/adb/src/test/kotlin/app/tellyscope/adb/ActionsTest.kt
index 4d053f0..66efc39 100644
--- a/adb/src/test/kotlin/app/tellyscope/adb/ActionsTest.kt
+++ b/adb/src/test/kotlin/app/tellyscope/adb/ActionsTest.kt
@@ -46,6 +46,30 @@ class ActionsTest {
assertEquals(ActionResult.Refused(ProtectedReason.HOME_SCREEN), Actions(sh).run(Action.DISABLE, "com.spocky.projengmenu"))
}
+ @Test fun noDefaultLauncherLeavesTheUsersOwnUnlocked() = runTest {
+ // Installing a second launcher clears the default: Android asks, and the TV's own is still there.
+ val sh = FakeShell(mapOf(
+ "cmd package resolve-activity" to ok("priority=0\nandroid/com.android.internal.app.ResolverActivity\n"),
+ "cmd package query-activities" to ok("com.google.android.tvlauncher/.MainActivity\ncom.spocky.projengmenu/.Main\nme.efesser.flauncher/.MainActivity\n"),
+ "pm list packages -3" to ok("package:com.spocky.projengmenu\npackage:me.efesser.flauncher\n"),
+ "pm disable-user" to ok("Package me.efesser.flauncher new state: disabled-user\n"),
+ ))
+ assertEquals(setOf("com.google.android.tvlauncher"), Actions(sh).homePackages())
+ assertEquals(ActionResult.Refused(ProtectedReason.HOME_SCREEN), Actions(sh).run(Action.DISABLE, "com.google.android.tvlauncher"))
+ assertEquals(ActionResult.Done(Action.ENABLE), Actions(sh).run(Action.DISABLE, "me.efesser.flauncher"))
+ }
+
+ @Test fun noDefaultAndOnlyTheUsersLaunchersProtectsThemAll() = runTest {
+ // The TV's own launcher is off: one of the user's is all Home has left.
+ val sh = FakeShell(mapOf(
+ "cmd package resolve-activity" to ok("priority=0\nandroid/com.android.internal.app.ResolverActivity\n"),
+ "cmd package query-activities" to ok("com.spocky.projengmenu/.Main\nme.efesser.flauncher/.MainActivity\n"),
+ "pm list packages -3" to ok("package:com.spocky.projengmenu\npackage:me.efesser.flauncher\n"),
+ ))
+ assertEquals(setOf("com.spocky.projengmenu", "me.efesser.flauncher"), Actions(sh).homePackages())
+ assertEquals(null, Actions(sh).homeOptions())
+ }
+
@Test fun unknownHomeRefusesStopAndDisable() = runTest {
// Android 6 and older have no `cmd`: both launcher lookups come back empty.
val sh = FakeShell(mapOf("cmd package" to ShellResult("/system/bin/sh: cmd: not found\n", 127)))
@@ -184,14 +208,48 @@ class ActionsTest {
assertEquals(emptySet(), Actions(sh).homeOptions()?.others)
}
- @Test fun noDefaultHomeNothingOffered() = runTest {
+ @Test fun noDefaultHomeOffersTheUsersLauncherInPlaceOfTheTvsOwn() = runTest {
val sh = FakeShell(mapOf(
"cmd package resolve-activity" to ok("priority=0\nandroid/com.android.internal.app.ResolverActivity\n"),
"cmd package query-activities" to ok("com.google.android.tvlauncher/.MainActivity\ncom.spocky.projengmenu/.Main\n"),
+ "pm list packages -3" to ok("package:com.spocky.projengmenu\n"),
+ ))
+ assertEquals(HomeOptions("com.google.android.tvlauncher", setOf("com.spocky.projengmenu"), default = false), Actions(sh).homeOptions())
+ }
+
+ @Test fun noDefaultHomeSwitchesFromTheTvsOwn() = runTest {
+ var home = "android/com.android.internal.app.ResolverActivity"
+ val sh = FakeShell(mapOf(
+ "cmd package query-activities" to ok("com.google.android.tvlauncher/.MainActivity\ncom.spocky.projengmenu/.ui.home.MainActivity\n"),
+ "pm list packages -3" to ok("package:com.spocky.projengmenu\n"),
+ "pm disable-user" to ok("Package com.google.android.tvlauncher new state: disabled-user\n"),
+ )).apply {
+ answer = { cmd ->
+ when {
+ cmd.startsWith("cmd package resolve-activity") -> ok("priority=0\n$home\n")
+ cmd.startsWith("cmd package set-home-activity") -> {
+ home = cmd.substringAfter("'").substringBefore("'")
+ ok("Success\n")
+ }
+ else -> null
+ }
+ }
+ }
+ assertEquals(
+ HomeResult.Switched("com.google.android.tvlauncher/.MainActivity", "com.spocky.projengmenu/.ui.home.MainActivity"),
+ Actions(sh).makeHome("com.spocky.projengmenu"),
+ )
+ assertTrue("pm disable-user --user 0 com.google.android.tvlauncher 2>&1" in sh.ran)
+ }
+
+ @Test fun noDefaultHomeAndNoLauncherOfItsOwnRefusesTheSwitch() = runTest {
+ val sh = FakeShell(mapOf(
+ "cmd package resolve-activity" to ok("priority=0\nandroid/com.android.internal.app.ResolverActivity\n"),
+ "cmd package query-activities" to ok("com.spocky.projengmenu/.Main\nme.efesser.flauncher/.MainActivity\n"),
+ "pm list packages -3" to ok("package:com.spocky.projengmenu\npackage:me.efesser.flauncher\n"),
))
- assertEquals(null, Actions(sh).homeOptions())
assertEquals(HomeResult.Refused(ProtectedReason.UNKNOWN_HOME), Actions(sh).makeHome("com.spocky.projengmenu"))
- assertTrue(sh.ran.none { it.startsWith("pm ") || "set-home" in it })
+ assertTrue(sh.ran.none { it.startsWith("pm disable") || it.startsWith("pm enable") || "set-home" in it })
}
@Test fun makeHomeSwitchesChecksThenDisables() = runTest {
diff --git a/app/src/main/java/app/tellyscope/data/AdbDeviceSource.kt b/app/src/main/java/app/tellyscope/data/AdbDeviceSource.kt
index 27c39ba..56b765c 100644
--- a/app/src/main/java/app/tellyscope/data/AdbDeviceSource.kt
+++ b/app/src/main/java/app/tellyscope/data/AdbDeviceSource.kt
@@ -403,7 +403,7 @@ class AdbDeviceSource(context: Context) : DeviceSource {
version = "",
icon = name.icon,
removable = p.name in userInstalled,
- home = p.name == homeOptions?.current,
+ home = p.name == homeOptions?.takeIf { it.default }?.current,
listedLauncher = launchers.any { it.pkg == p.name },
homeInstead = homeOptions?.takeIf { p.name in it.others }?.current,
homeBack = back?.takeIf { p.name == homeOptions?.current }?.let { names[it.pkg]?.label ?: AppNames.fallback(it.pkg) },
diff --git a/app/src/main/java/app/tellyscope/ui/AppsTabs.kt b/app/src/main/java/app/tellyscope/ui/AppsTabs.kt
index 4bc0473..2389028 100644
--- a/app/src/main/java/app/tellyscope/ui/AppsTabs.kt
+++ b/app/src/main/java/app/tellyscope/ui/AppsTabs.kt
@@ -35,7 +35,8 @@ private fun locked(app: AppInfo, all: List<AppInfo>) =
/**
* Splits the TV's apps for [tab]. Running: apps using RAM now. Installed: the user's own apps,
* all in one list, a locked home screen keeping its lock. Built-in: what came with the TV.
- * Running and Built-in put the apps the user can't change last, in [AppsSplit.system].
+ * Running and Built-in put the apps the user can't change last, in [AppsSplit.system]; the user's
+ * own apps never go there.
*/
internal fun splitApps(apps: List<AppInfo>, procs: List<Proc>, tab: AppsTab): AppsSplit {
val running = procs.filter { it.ramMb > 0 }.mapNotNull { it.packageName }.toSet()
@@ -45,7 +46,7 @@ internal fun splitApps(apps: List<AppInfo>, procs: List<Proc>, tab: AppsTab): Ap
AppsTab.BuiltIn -> apps.filter { it.system }
}.sortedWith(compareBy({ locked(it, apps) }, { !it.enabled }, { it.system }, { it.label }))
if (tab == AppsTab.Installed) return AppsSplit(shown, emptyList())
- val (system, rest) = shown.partition { locked(it, apps) }
+ val (system, rest) = shown.partition { it.system && locked(it, apps) }
return AppsSplit(rest, system)
}
diff --git a/app/src/main/java/app/tellyscope/ui/LauncherFlowUi.kt b/app/src/main/java/app/tellyscope/ui/LauncherFlowUi.kt
index 2ffa8f4..7f62750 100644
--- a/app/src/main/java/app/tellyscope/ui/LauncherFlowUi.kt
+++ b/app/src/main/java/app/tellyscope/ui/LauncherFlowUi.kt
@@ -66,16 +66,16 @@ import app.tellyscope.data.Device
const val PLAY_STORE = "com.android.vending"
/**
- * Install a home screen is offered on the Apps tab while the TV has the Play Store, Home is still
- * a stock launcher and there's no second launcher, until Not now; Tweaks offers it whenever the
- * Store is there and Home is stock.
+ * Install a home screen is offered on the Apps tab while the TV has the Play Store and no launcher
+ * was added, Home or not, and there's no second launcher, until Not now; Tweaks offers it whenever
+ * the Store is there and no launcher was added.
*/
internal fun hasPlayStore(apps: List<AppInfo>) = apps.any { it.packageName == PLAY_STORE && it.enabled }
-/** Home opens a launcher someone added: one they installed, or one on `launchers.json`. With the stock one off, there's no [AppInfo.homeBack] to tell. */
-internal fun homeIsAdded(apps: List<AppInfo>) = apps.any { it.home && (it.removable || it.listedLauncher) }
+/** A launcher someone added is on the TV, Home or not: one on `launchers.json`, or one they installed that answers Home. */
+internal fun hasAddedLauncher(apps: List<AppInfo>) = apps.any { it.listedLauncher || (it.removable && (it.home || it.homeInstead != null)) }
-internal fun offerChoose(apps: List<AppInfo>) = hasPlayStore(apps) && !homeIsAdded(apps)
+internal fun offerChoose(apps: List<AppInfo>) = hasPlayStore(apps) && !hasAddedLauncher(apps)
internal fun offerLauncher(apps: List<AppInfo>, hidden: Boolean) =
!hidden && offerChoose(apps) && apps.none { it.homeInstead != null || it.homeBack != null }
diff --git a/app/src/test/java/app/tellyscope/AppsTabsTest.kt b/app/src/test/java/app/tellyscope/AppsTabsTest.kt
index 6e690d1..5886c4a 100644
--- a/app/src/test/java/app/tellyscope/AppsTabsTest.kt
+++ b/app/src/test/java/app/tellyscope/AppsTabsTest.kt
@@ -48,6 +48,14 @@ class AppsTabsTest {
assertEquals(emptyList<String>(), names(split.system))
}
+ @Test fun `running never puts a launcher the user installed under System, even a locked one`() {
+ // No default home and the TV's own launcher off: a launcher the user installed stays protected.
+ val projectivy = app("com.spocky.projengmenu", system = false, locked = "this is your home screen").copy(removable = true)
+ val split = splitApps(listOf(projectivy, launcher), listOf(proc(projectivy.packageName), proc(launcher.packageName)), AppsTab.Running)
+ assertEquals(listOf("projengmenu"), names(split.apps))
+ assertEquals(listOf("launcher"), names(split.system))
+ }
+
@Test fun `built-in puts the maker's extras first, then what the TV needs`() {
val split = splitApps(apps, procs, AppsTab.BuiltIn)
assertEquals(listOf("assistant", "ota"), names(split.apps))
diff --git a/app/src/test/java/app/tellyscope/HomeServiceTest.kt b/app/src/test/java/app/tellyscope/HomeServiceTest.kt
index d2909aa..6171868 100644
--- a/app/src/test/java/app/tellyscope/HomeServiceTest.kt
+++ b/app/src/test/java/app/tellyscope/HomeServiceTest.kt
@@ -61,6 +61,17 @@ class HomeServiceTest {
assertTrue(confirmed)
}
+ @Test fun withNoDefaultHomeTheUsersLauncherOffersSetAsDefaultAndAPlainUninstall() {
+ var proposed: Pair<String, Action>? = null
+ compose.setContent {
+ AppRow(projectivy.copy(removable = true), emptyList(), null, busy = false, actions = DeviceActions(propose = { p, a -> proposed = p to a }), homeLabel = "Google TV Home")
+ }
+ compose.onNodeWithText("Projectivy Launcher").performClick()
+ compose.onNodeWithText(Copy.MAKE_HOME).assertExists()
+ compose.onNodeWithText(Copy.button(Action.Uninstall)).performClick()
+ assertEquals(pkg to Action.Uninstall, proposed)
+ }
+
private val onHome = projectivy.copy(homeInstead = null, homeBack = "Google TV Home", homeServiceOff = true, homeServiceNote = true, protectedReason = "this is your home screen")
@Test fun theLauncherOnHomeOffersUninstallAndItsConfirmListsTheSteps() {
diff --git a/app/src/test/java/app/tellyscope/LauncherFlowTest.kt b/app/src/test/java/app/tellyscope/LauncherFlowTest.kt
index 3055079..3953d26 100644
--- a/app/src/test/java/app/tellyscope/LauncherFlowTest.kt
+++ b/app/src/test/java/app/tellyscope/LauncherFlowTest.kt
@@ -234,6 +234,21 @@ class LauncherScreenTest {
assertTrue(offerChoose(listOf(store, stock)))
}
+ @Test fun anAddedLauncherThatIsNotHomeStillHidesTheCardAndTheTweaksRow() {
+ // Installing a second launcher clears the default: nothing is Home, and both are on.
+ val noDefault = stock.copy(home = false, protectedReason = "this is your home screen")
+ val projectivy = AppInfo(PROJECTIVY, "Projectivy Launcher", null, false, true, null, "1.0", removable = true, listedLauncher = true, homeInstead = TV_HOME)
+ val flauncher = AppInfo("me.efesser.flauncher", "FLauncher", null, false, true, null, "1.0", removable = true, listedLauncher = true, homeInstead = TV_HOME)
+ assertFalse(offerChoose(listOf(store, noDefault, projectivy, flauncher)))
+ assertFalse(offerLauncher(listOf(store, noDefault, projectivy, flauncher), hidden = false))
+ // One the user installed that isn't on launchers.json counts once it answers Home.
+ val other = AppInfo("com.example.home", "Home", null, false, true, null, "1.0", removable = true, homeInstead = TV_HOME)
+ assertFalse(offerChoose(listOf(store, stock, other)))
+ // An app that doesn't answer Home is no launcher.
+ val app = AppInfo("org.mine.jellyfin", "Jellyfin", null, false, true, null, "1.0", removable = true)
+ assertTrue(offerChoose(listOf(store, stock, app)))
+ }
+
@Test fun theCardsTwoButtons() {
var notNow = false
var chose = false