Skip to content

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

Launcher: an input: app key opens in the Live TV app first

Sergio Rodríguez23780e51be64
diff --git a/launcher/app/src/main/java/com/gathin/tvhome/RemoteKeys.java b/launcher/app/src/main/java/com/gathin/tvhome/RemoteKeys.java
index 7cd9e4dbf..f25bf8f71 100644
--- a/launcher/app/src/main/java/com/gathin/tvhome/RemoteKeys.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/RemoteKeys.java
@@ -434,6 +434,16 @@ final class RemoteKeys {
.setDataAndType(TvContract.buildChannelUriForPassthroughInput(inputId),
"vnd.android.cursor.item/channel")
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ // Aimed at the Live TV app first, as the Inputs menu does: an app that also claims the channel URI
+ // (the Fluffy file manager on a TCL G03) turned the press into a chooser.
+ String liveTv = Config.load(ctx).liveTvPackage;
+ if (liveTv != null && !liveTv.isEmpty()) {
+ try {
+ ctx.startActivity(new Intent(view).setPackage(liveTv));
+ return;
+ } catch (ActivityNotFoundException | SecurityException ignored) {
+ }
+ }
try {
ctx.startActivity(view);
} catch (ActivityNotFoundException ignored) {