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: the source panel can be an activity; open it directly when there is no Live TV app
Mateus Zanesdc0a4338263f
diff --git a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.javaindex 28a35f331..5e0c1b059 100644--- a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java+++ b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java@@ -1723,12 +1723,17 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {return getPackageManager().resolveActivity(byAction, 0) != null ? byAction : null;}- /** The TV's own source-selection panel, for TVs that have no TvInputManager (TCL Android TV 9). */+ /** The TV's own source-selection panel, for TVs that have no TvInputManager (TCL Android TV 9): a+ * service, or an activity on sets whose panel is a dialog (BYINTEK U4's QuickSourceActivity). */private void openSourcePanel() {Intent i = new Intent(sourcePanelAction);ComponentName c = ComponentName.unflattenFromString(sourcePanelService);if (c != null) i.setComponent(c);try {+ if (getPackageManager().resolveActivity(i, 0) != null) {+ startActivity(i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));+ return;+ }startService(i);} catch (Exception e) {Toast.makeText(this, R.string.not_available, Toast.LENGTH_SHORT).show();@@ -1765,6 +1770,12 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {/** Dropdown menu under the Inputs pill: HDMI ports (with connection state), AV and Live TV. */private void showInputs() {+ // A configured source panel and no Live TV row to offer next to it: the panel is the whole menu.+ // The BYINTEK U4 needs this, as its TvInputManager lists three HDMI ports and an AV input it doesn't have.+ if (!sourcePanelService.isEmpty() && liveTvIntent() == null) {+ openSourcePanel();+ return;+ }View anchor = findViewById(R.id.btnInputs);View panel = getLayoutInflater().inflate(R.layout.popup_inputs, root, false);LinearLayout rows = panel.findViewById(R.id.rows);diff --git a/launcher/app/src/main/res/values/config.xml b/launcher/app/src/main/res/values/config.xmlindex d415e695b..c3d17637d 100644--- a/launcher/app/src/main/res/values/config.xml+++ b/launcher/app/src/main/res/values/config.xml@@ -35,7 +35,9 @@<!-- TVs with no TvInputManager have no HDMI list to read, but their own source-selection panelstill switches inputs (TCL Android TV 9 again). When nothing could be listed, the Inputs menu- offers one row that starts this service: component first, then action. Leave empty to omit. -->+ offers one row that starts this service: component first, then action. The component can also be an+ activity, for sets whose panel is a dialog (BYINTEK U4). With no Live TV app either, the Inputs pill+ opens the panel directly instead of a menu. Leave empty to omit. --><string name="source_panel_service" translatable="false"></string><string name="source_panel_action" translatable="false"></string>diff --git a/themes/README.md b/themes/README.mdindex f81ca920c..57366c4dd 100644--- a/themes/README.md+++ b/themes/README.md@@ -30,7 +30,7 @@ is ignored, and a file that doesn't parse is ignored as a whole, so a theme can| `fill_dock` | bool | Fill the dock slots `dock_apps` leaves free with the first grid apps (true by default); false leaves them empty || `hidden_apps` | list of package names | Never shown as tiles || `live_tv_package`, `live_tv_action` | string | The Live TV app and, if it has no leanback entry, the action to start it with |-| `source_panel_service`, `source_panel_action` | string | The TV's own source panel, for sets with no TvInputManager |+| `source_panel_service`, `source_panel_action` | string | The TV's own source panel, for sets with no TvInputManager: a service, or an activity (BYINTEK U4). Without a Live TV app, the Inputs pill opens it directly || `input_action` | string | Action sent with an HDMI/AV row's channel URI when nothing handles the standard `VIEW` (XGIMI: `com.xgimi.action.hdmiPlayer`) || `columns` | 1 to 8 | Tiles per row; tiles shrink to fit from 5 up || `rows_below_dock` | 0 to 3 | Grid rows left visible under the dock; tiles shrink if the dock, its title and that many rows would not fit the screen height |