Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.
Python adbadblockandroid-tvandroid-tv-launcherapple-tvbloatware-removalclaude-codedebloatfire-tvgoogle-tvlauncherprivacysmart-tvsony-braviatclvibe-codingxiaomi
launcher: icon_only_inputs, the Inputs pill as a round icon too
sim082f744d6abf
diff --git a/launcher/app/src/main/java/com/gathin/tvhome/Config.java b/launcher/app/src/main/java/com/gathin/tvhome/Config.javaindex 70c48b0b5..34a4c43bc 100644--- a/launcher/app/src/main/java/com/gathin/tvhome/Config.java+++ b/launcher/app/src/main/java/com/gathin/tvhome/Config.java@@ -95,6 +95,8 @@ final class Config {final boolean showInputsPill;/** Wi-Fi and Settings pills as round icon buttons, Inputs keeps its label (config.xml icon_only_buttons). */final boolean iconOnlyButtons;+ /** The Inputs pill as a round icon button too (config.xml icon_only_inputs). */+ final boolean iconOnlyInputs;/** App library as a round button in the top bar (config.xml library_button); needs app_library. */final boolean libraryButton;/** With icon_only_buttons, the Wi-Fi pill keeps the network name up to this width in dp (0: icon only). */@@ -175,7 +177,7 @@ final class Config {Map<String, String> appBanners, String sourcePanelService, String sourcePanelAction,String sourcePanelExtra, boolean coocaaSources, String inputAction,String inputUriScheme, int columns, int rowsBelowDock, boolean animations, boolean advancedEffects,- boolean shamsiDate, String greetingName, boolean moduleCards, boolean reducedMotion, boolean bootToLiveTv, boolean dockTitle, boolean dockRow, boolean topMenu, boolean launcherSettingsButton, boolean reorderButton, boolean showNetworkPill, boolean showInputsPill, boolean iconOnlyButtons, boolean libraryButton, int wifiLabelWidth, boolean alwaysShowNames, boolean wallpaperTrueColor, boolean focusOvershoot, String vpnApp,+ boolean shamsiDate, String greetingName, boolean moduleCards, boolean reducedMotion, boolean bootToLiveTv, boolean dockTitle, boolean dockRow, boolean topMenu, boolean launcherSettingsButton, boolean reorderButton, boolean showNetworkPill, boolean showInputsPill, boolean iconOnlyButtons, boolean iconOnlyInputs, boolean libraryButton, int wifiLabelWidth, boolean alwaysShowNames, boolean wallpaperTrueColor, boolean focusOvershoot, String vpnApp,boolean showHomeSettingsShortcut, boolean showStats, boolean appLibrary, int backgroundColor, int skyIntensity,int[] settingsKeycodes, boolean settingsKeyPanel, boolean restoreKeyServices, boolean wallpaperEnabled, File wallpaper, List<File> wallpapers,int wallpaperRotationMinutes, int wallpaperDim, int dockOpacity, String wallpaperOrder, boolean overlayApplied,@@ -221,6 +223,7 @@ final class Config {this.showNetworkPill = showNetworkPill;this.showInputsPill = showInputsPill;this.iconOnlyButtons = iconOnlyButtons;+ this.iconOnlyInputs = iconOnlyInputs;this.libraryButton = libraryButton;this.wifiLabelWidth = wifiLabelWidth;this.alwaysShowNames = alwaysShowNames;@@ -298,6 +301,7 @@ final class Config {boolean showNetworkPill = res.getBoolean(R.bool.show_network_pill);boolean showInputsPill = res.getBoolean(R.bool.show_inputs_pill);boolean iconOnlyButtons = res.getBoolean(R.bool.icon_only_buttons);+ boolean iconOnlyInputs = res.getBoolean(R.bool.icon_only_inputs);boolean libraryButton = res.getBoolean(R.bool.library_button);int wifiLabelWidth = res.getInteger(R.integer.wifi_label_width);boolean alwaysShowNames = res.getBoolean(R.bool.always_show_names);@@ -365,6 +369,7 @@ final class Config {showNetworkPill = bool(json, "show_network_pill", showNetworkPill);showInputsPill = bool(json, "show_inputs_pill", showInputsPill);iconOnlyButtons = bool(json, "icon_only_buttons", iconOnlyButtons);+ iconOnlyInputs = bool(json, "icon_only_inputs", iconOnlyInputs);libraryButton = bool(json, "library_button", libraryButton);wifiLabelWidth = integer(json, "wifi_label_width", wifiLabelWidth, 0, 300);alwaysShowNames = bool(json, "always_show_names", alwaysShowNames);@@ -449,7 +454,7 @@ final class Config {packageMap(appBanners), panelService,panelAction, panelExtra, coocaaSources, inputAction, inputUriScheme,Math.max(1, columns), Math.max(0, rowsBelow), animations, advancedEffects,- shamsi, greetingName, moduleCards, reducedMotion, bootToLiveTv, dockTitle, dockRow, topMenu, launcherSettingsButton, reorderButton, showNetworkPill, showInputsPill, iconOnlyButtons, libraryButton, wifiLabelWidth, alwaysShowNames, wallpaperTrueColor, focusOvershoot, vpn, homeSettings, showStats, library, background,+ shamsi, greetingName, moduleCards, reducedMotion, bootToLiveTv, dockTitle, dockRow, topMenu, launcherSettingsButton, reorderButton, showNetworkPill, showInputsPill, iconOnlyButtons, iconOnlyInputs, libraryButton, wifiLabelWidth, alwaysShowNames, wallpaperTrueColor, focusOvershoot, vpn, homeSettings, showStats, library, background,Math.max(0, Math.min(100, skyIntensity)), settingsKeycodes, settingsKeyPanel, restoreKeyServices, wallpaperEnabled, wallpaper,wallpapers, rotationMinutes, wallpaperDim, dockOpacity, wallpaperOrder, applied,festival, inputKeycodes, appKeys, stockHomeRedirect, json == null ? Collections.emptyList() : raceCalendar(json), cinematic, ambientGlow, appGlow,diff --git a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.javaindex e6d030c6d..08df79ed8 100644--- a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java+++ b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java@@ -626,6 +626,7 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {else makeIconOnly(btnWifi);makeIconOnly((TextView) btnSettings);}+ if (cfg.iconOnlyInputs) makeIconOnly((TextView) btnInputs);btnSettings.setOnLongClickListener(v -> {showSettingsMenu();return true;diff --git a/launcher/app/src/main/res/values/config.xml b/launcher/app/src/main/res/values/config.xmlindex 518f0fd67..dabdf8e0a 100644--- a/launcher/app/src/main/res/values/config.xml+++ b/launcher/app/src/main/res/values/config.xml@@ -204,6 +204,8 @@<!-- Wi-Fi and Settings as round icon-only buttons (the network name moves to the talkback description);Inputs keeps its label. --><bool name="icon_only_buttons">false</bool>+ <!-- The Inputs pill as a round icon button too (the label moves to the talkback description). -->+ <bool name="icon_only_inputs">false</bool><!-- The app library as a round button in the top bar, beside Settings (app_library must be on too). --><bool name="library_button">false</bool><!-- With icon_only_buttons: keep the network name on the Wi-Fi pill up to this width in dp, cut with an ellipsis.diff --git a/tests/test_icon_only_inputs.py b/tests/test_icon_only_inputs.pynew file mode 100644index 000000000..79c39fc28--- /dev/null+++ b/tests/test_icon_only_inputs.py@@ -0,0 +1,58 @@+"""icon_only_inputs: the switch that turns the Inputs pill into a round icon must reach every hop.++icon_only_buttons (#556) makes Wi-Fi and Settings round icons but keeps the Inputs label. On a TV with+few inputs, or an owner who knows the icon, that label is the widest thing in the top bar.+icon_only_inputs does the same for Inputs with #556's own makeIconOnly, so it costs about 120 bytes of+APK and nothing at runtime unless it is on.++The flag only works if every hop exists: config.xml defines it (off upstream, so existing installs are+unchanged; a fork may turn it on), Config reads it and lets a theme override it, MainActivity applies it, and the theme table+lists it. Each hop gets its own assertion, as in test_key_filter.py.++Run from the repository root: python3 -m unittest discover -s tests -v+"""+from pathlib import Path+import unittest+++ROOT = Path(__file__).resolve().parents[1]+++def read(relative):+ """Text of a repo file, or empty if it does not exist yet (each test then fails with its own message)."""+ path = ROOT / relative+ return path.read_text(encoding="utf-8") if path.is_file() else ""+++CONFIG_XML = read("launcher/app/src/main/res/values/config.xml")+CONFIG_JAVA = read("launcher/app/src/main/java/com/gathin/tvhome/Config.java")+MAIN = read("launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java")+THEMES_README = read("themes/README.md")+++class TestIconOnlyInputsWiring(unittest.TestCase):++ def test_config_xml_defines_it(self):+ # Off upstream so existing installs are unchanged; a fork's own config.xml may turn it on.+ self.assertRegex(CONFIG_XML, r'<bool name="icon_only_inputs">(true|false)</bool>',+ "config.xml must define icon_only_inputs")++ def test_config_reads_resource_and_theme_override(self):+ self.assertIn("R.bool.icon_only_inputs", CONFIG_JAVA, "Config must read the icon_only_inputs resource")+ self.assertIn('"icon_only_inputs"', CONFIG_JAVA,+ 'Config must accept a theme config.json "icon_only_inputs" override')+ self.assertIn("this.iconOnlyInputs = iconOnlyInputs", CONFIG_JAVA, "Config must store iconOnlyInputs")++ def test_main_activity_applies_it_with_the_shared_helper(self):+ self.assertIn("if (cfg.iconOnlyInputs) makeIconOnly((TextView) btnInputs);", MAIN,+ "MainActivity must make the Inputs pill icon-only with makeIconOnly, as #556 does for "+ "Wi-Fi and Settings")++ def test_theme_table_lists_it_off_by_default(self):+ row = next((line for line in THEMES_README.splitlines() if line.startswith("| `icon_only_inputs`")), "")+ self.assertTrue(row, "themes/README.md's config.json table must list icon_only_inputs")+ self.assertIn("`false` by default", row, "the table must say it is off by default")+++if __name__ == "__main__":+ unittest.main()diff --git a/themes/README.md b/themes/README.mdindex 29701c8a0..a40436f4d 100644--- a/themes/README.md+++ b/themes/README.md@@ -53,6 +53,7 @@ is ignored, and a file that doesn't parse is ignored as a whole, so a theme can| `show_network_pill` | bool | The Wi-Fi/Ethernet pill in the top bar (`true` by default); `false` hides it || `show_inputs_pill` | bool | The Inputs pill in the top bar, shown when the TV has inputs (`true` by default); `false` hides it; what the remote's Input button does is unchanged || `icon_only_buttons` | bool | Wi-Fi and Settings as round icon buttons; Inputs keeps its label (`false` by default) |+| `icon_only_inputs` | bool | The Inputs pill as a round icon button too, its label kept as the TalkBack description (`false` by default). Works with or without `icon_only_buttons` || `top_menu` | bool | Inputs, Wi-Fi and Settings folded into one round gear, centred on the header: OK drops a menu with the three, hold OK keeps the launcher menu (`false` by default) || `launcher_settings_button` | bool | Make the header Settings action open Launcher settings directly with a matching 22dp home icon; also changes the Settings row when `top_menu` is on. Hold OK keeps module-card and ordering tools. The settings page includes Reorder apps and TV settings (`false` by default) || `wifi_label_width` | 0 to 300 | With `icon_only_buttons`, keep the network name on the Wi-Fi pill up to this width in dp, cut with an ellipsis; 0 leaves only the icon |