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: fall back to Xiaomi settings app on CN MIUI TV firmware
Zebroa185e4004d25
diff --git a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.javaindex e91721b0d..371252580 100644--- a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java+++ b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java@@ -272,10 +272,10 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {btnInputs.setOnClickListener(v -> showInputs());btnWifi.setOnClickListener(v -> openNetworkPill());btnWifi.setOnLongClickListener(v -> {- open(new Intent(Settings.ACTION_WIFI_SETTINGS));+ open(systemIntent(Settings.ACTION_WIFI_SETTINGS));return true;});- btnSettings.setOnClickListener(v -> open(new Intent(Settings.ACTION_SETTINGS)));+ btnSettings.setOnClickListener(v -> open(systemIntent(Settings.ACTION_SETTINGS)));btnSettings.setOnLongClickListener(v -> {if (!moduleCards) return false; // off: a long press does nothing, as before the featureshowModuleCards();@@ -694,7 +694,22 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {private void openNetworkPill() {Intent i = vpnApp.isEmpty() ? null : getPackageManager().getLeanbackLaunchIntentForPackage(vpnApp);if (i == null && !vpnApp.isEmpty()) i = getPackageManager().getLaunchIntentForPackage(vpnApp);- open(i != null ? i : new Intent(Settings.ACTION_WIFI_SETTINGS));+ open(i != null ? i : systemIntent(Settings.ACTION_WIFI_SETTINGS));+ }+++ /**+ * China-market MIUI TV firmware answers no standard Settings intents at all; open Xiaomi's own+ * settings app (com.xiaomi.mitv.settings) there, so the Settings and Wi-Fi pills keep working.+ * On firmware with a standard settings handler the behaviour is unchanged.+ */+ private Intent systemIntent(String standardAction) {+ Intent i = new Intent(standardAction);+ if (i.resolveActivity(getPackageManager()) != null) return i;+ i = new Intent().setComponent(new ComponentName(+ "com.xiaomi.mitv.settings", "com.xiaomi.mitv.settings.entry.MainActivity"));+ if (i.resolveActivity(getPackageManager()) != null) return i;+ return new Intent(standardAction); // nothing found: let open() show the can't-open toast}/** Hides the Inputs pill when it would have nothing to list: streaming boxes have no HDMI-in, AV or tuner. */