Skip to content

Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.

Launcher: show_network_pill, to hide the Wi-Fi/Ethernet pill

Riku Pirttinokkae1934426dbad
diff --git a/launcher/app/src/main/java/com/gathin/tvhome/Config.java b/launcher/app/src/main/java/com/gathin/tvhome/Config.java
index 8f41173e3..538f899f5 100644
--- a/launcher/app/src/main/java/com/gathin/tvhome/Config.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/Config.java
@@ -70,6 +70,8 @@ final class Config {
final boolean dockRow;
/** Reorder button in the top bar (config.xml reorder_button); the Settings long-press menu offers it either way. */
final boolean reorderButton;
+ /** Show the Wi-Fi/Ethernet pill in the top bar (config.xml, show_network_pill). */
+ final boolean showNetworkPill;
final String vpnApp;
final boolean showHomeSettingsShortcut;
/** One line under the clock: CPU, free memory, free storage. Off unless config or a theme turns it on. */
@@ -109,7 +111,7 @@ final class Config {
String liveTvAction, Map<String, String> launchActions, Map<String, String> appLabels,
Map<String, String> appBanners, String sourcePanelService, String sourcePanelAction, String inputAction,
int columns, int rowsBelowDock, boolean animations, boolean advancedEffects,
- boolean shamsiDate, String greetingName, boolean moduleCards, boolean reducedMotion, boolean dockTitle, boolean dockRow, boolean reorderButton, String vpnApp,
+ boolean shamsiDate, String greetingName, boolean moduleCards, boolean reducedMotion, boolean dockTitle, boolean dockRow, boolean reorderButton, boolean showNetworkPill, String vpnApp,
boolean showHomeSettingsShortcut, boolean showStats, boolean appLibrary, int backgroundColor, int skyIntensity,
int[] settingsKeycodes, boolean settingsKeyPanel, boolean wallpaperEnabled, File wallpaper, List<File> wallpapers,
int wallpaperRotationMinutes, int wallpaperDim, boolean overlayApplied,
@@ -139,6 +141,7 @@ final class Config {
this.dockTitle = dockTitle;
this.dockRow = dockRow;
this.reorderButton = reorderButton;
+ this.showNetworkPill = showNetworkPill;
this.vpnApp = vpnApp;
this.showHomeSettingsShortcut = showHomeSettingsShortcut;
this.showStats = showStats;
@@ -187,6 +190,7 @@ final class Config {
boolean dockTitle = res.getBoolean(R.bool.dock_title);
boolean dockRow = res.getBoolean(R.bool.dock_row);
boolean reorderButton = res.getBoolean(R.bool.reorder_button);
+ boolean showNetworkPill = res.getBoolean(R.bool.show_network_pill);
String vpn = res.getString(R.string.vpn_app).trim();
boolean homeSettings = res.getBoolean(R.bool.show_home_settings_shortcut);
boolean showStats = res.getBoolean(R.bool.show_stats);
@@ -227,6 +231,7 @@ final class Config {
dockTitle = bool(json, "dock_title", dockTitle);
dockRow = bool(json, "dock_row", dockRow);
reorderButton = bool(json, "reorder_button", reorderButton);
+ showNetworkPill = bool(json, "show_network_pill", showNetworkPill);
vpn = string(json, "vpn_app", vpn);
homeSettings = bool(json, "show_home_settings_shortcut", homeSettings);
showStats = bool(json, "show_stats", showStats);
@@ -288,7 +293,7 @@ final class Config {
packageMap(appBanners), panelService,
panelAction, inputAction,
Math.max(1, columns), Math.max(0, rowsBelow), animations, advancedEffects,
- shamsi, greetingName, moduleCards, reducedMotion, dockTitle, dockRow, reorderButton, vpn, homeSettings, showStats, library, background,
+ shamsi, greetingName, moduleCards, reducedMotion, dockTitle, dockRow, reorderButton, showNetworkPill, vpn, homeSettings, showStats, library, background,
Math.max(0, Math.min(100, skyIntensity)), settingsKeycodes, settingsKeyPanel, wallpaperEnabled, wallpaper,
wallpapers, rotationMinutes, wallpaperDim, applied,
festival, inputKeycodes, appKeys, json == null ? Collections.emptyList() : raceCalendar(json), cinematic);
diff --git a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
index 7597e0e60..fc1ab9573 100644
--- a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
@@ -501,6 +501,7 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {
btnReorder = findViewById(R.id.btnReorder);
btnReorder.setOnClickListener(v -> toggleReorder());
btnReorder.setVisibility(cfg.reorderButton ? View.VISIBLE : View.GONE);
+ if (!cfg.showNetworkPill) btnWifi.setVisibility(View.GONE);
btnSettings.setOnLongClickListener(v -> {
showSettingsMenu();
return true;
@@ -517,7 +518,7 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {
focusTile(lastFocused % COLUMNS);
return true;
}
- int firstButton = btnInputs.getVisibility() == View.VISIBLE ? R.id.btnInputs : R.id.btnWifi;
+ int firstButton = btnInputs.getVisibility() == View.VISIBLE ? R.id.btnInputs : firstTopButton().getId();
int leftButton = rtlMenuBar ? R.id.btnSettings : firstButton;
int rightButton = rtlMenuBar ? firstButton : R.id.btnSettings;
if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT) return v.getId() == leftButton;
@@ -1688,8 +1689,15 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {
hideHero();
}
+ /** The first top-bar button after Inputs that is shown: the network pill, Reorder, then Settings (always there). */
+ private View firstTopButton() {
+ if (btnWifi.getVisibility() == View.VISIBLE) return btnWifi;
+ if (btnReorder.getVisibility() == View.VISIBLE) return btnReorder;
+ return findViewById(R.id.btnSettings);
+ }
+
@Override public void onLibraryUp() {
- if (adapter.appCount() == 0) { btnWifi.requestFocus(); return; }
+ if (adapter.appCount() == 0) { firstTopButton().requestFocus(); return; }
int lastRow = ((adapter.appCount() - 1) / COLUMNS) * COLUMNS;
focusTile(Math.min(lastRow + lastFocused % COLUMNS, adapter.appCount() - 1));
}
@@ -1745,7 +1753,7 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {
cancelPendingFocusScroll();
if (adapter.appCount() == 0) {
if (adapter.isLibraryAt(0)) focusLibrary();
- else btnWifi.requestFocus();
+ else firstTopButton().requestFocus();
return;
}
final int pos = adapter.focusablePosition(Math.max(0, Math.min(position, adapter.appCount() - 1)));
diff --git a/launcher/app/src/main/res/values/config.xml b/launcher/app/src/main/res/values/config.xml
index 3deebbea4..a1c1bb2e6 100644
--- a/launcher/app/src/main/res/values/config.xml
+++ b/launcher/app/src/main/res/values/config.xml
@@ -111,6 +111,10 @@
button's long-press menu, so it needs no extra button on screen. -->
<bool name="reorder_button">false</bool>
+ <!-- The Wi-Fi/Ethernet pill in the top bar. false hides it (on Android 14 with Location off it can
+ only say "Wi-Fi", not the network name). Can also be set with "show_network_pill" in a theme. -->
+ <bool name="show_network_pill">true</bool>
+
<!-- Grid rows left visible under the dock on the home screen. 0 = dock sits at the very bottom. Tiles shrink if
the dock, its title and this many rows would not otherwise fit the screen height. -->
<integer name="rows_below_dock">0</integer>
diff --git a/themes/README.md b/themes/README.md
index d08c19670..c32147be3 100644
--- a/themes/README.md
+++ b/themes/README.md
@@ -40,6 +40,7 @@ is ignored, and a file that doesn't parse is ignored as a whole, so a theme can
| `dock_title` | bool | The focused dock app's name in large type above the dock (`true`); `false` keeps only the glow |
| `dock_row` | bool | The dock as its own row with a band (`true`); `false` makes the dock apps the first tiles of one plain grid |
| `reorder_button` | bool | A reorder button in the top bar (`false` by default); reordering is always in the Settings button's long-press menu |
+| `show_network_pill` | bool | The Wi-Fi/Ethernet pill in the top bar (`true` by default); `false` hides it |
| `app_library` | bool | An App library pill after the last Home row: every installed app, add one to Home or take it off (`false` by default). The choices stay on the TV when a theme is pushed or reset; see [docs/app-library.md](../docs/app-library.md) |
| `shamsi_date` | bool | Show the Solar Hijri date above the Gregorian one |
| `greeting_name` | string | A name after the greeting, e.g. `"Mr. Trịnh"` for GOOD MORNING, MR. TRỊNH; empty for the greeting alone |