Skip to content

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

Merge PR #524: launcher: glow_style horizon, the app's colour washing down from the top

Gathin2301f39cd99beb
diff --cc launcher/app/src/main/java/com/gathin/tvhome/Config.java
index 21c53db79,4b7975b62..f4e61ae04
--- a/launcher/app/src/main/java/com/gathin/tvhome/Config.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/Config.java
@@@ -146,29 -126,25 +146,33 @@@ final class Config
final boolean cinematicHome;
/** The glow in the focused app's colour behind the dock (config.xml, ambient_glow); false keeps the background plain. */
final boolean ambientGlow;
+ /** The focus highlight in the focused app's colour on every tile (config.xml, app_glow), as cinematic_home does for the dock. */
+ final boolean appGlow;
/** Minutes Home may sit untouched before the clock screensaver (config.xml, home_idle_clock_minutes); 0 is off. */
final int homeIdleClockMinutes;
+ /** The dock band as light frosted glass like the pills (config.xml, dock_glass); false keeps the solid band. */
+ final boolean dockGlass;
+ /** Shape of the glow behind the focused app (config.xml, glow_style): {@link #GLOW_RADIAL} or {@link #GLOW_HORIZON}. */
+ final String glowStyle;
+
+ static final String GLOW_RADIAL = "radial", GLOW_HORIZON = "horizon";
private Config(List<String> dockApps, boolean fillDock, List<String> hiddenApps, String liveTvPackage,
- 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, boolean showNetworkPill, boolean iconOnlyButtons, boolean libraryButton, int wifiLabelWidth, boolean alwaysShowNames, boolean wallpaperTrueColor, String vpnApp,
+ String liveTvAction, String liveTvInputId, Map<String, String> launchActions, Map<String, String> appLabels,
+ 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 reorderButton, boolean showNetworkPill, boolean showInputsPill, boolean iconOnlyButtons, 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 wallpaperEnabled, File wallpaper, List<File> wallpapers,
- int wallpaperRotationMinutes, int wallpaperDim, String wallpaperOrder, boolean overlayApplied,
- Festival festival, int[] inputKeycodes, List<String> appKeys,
- List<RaceWeekend.Race> raceCalendar, boolean cinematicHome, boolean ambientGlow, int homeIdleClockMinutes, String glowStyle) {
+ int wallpaperRotationMinutes, int wallpaperDim, int dockOpacity, String wallpaperOrder, boolean overlayApplied,
+ Festival festival, int[] inputKeycodes, List<String> appKeys, String stockHomeRedirect,
+ List<RaceWeekend.Race> raceCalendar, boolean cinematicHome, boolean ambientGlow, boolean appGlow, int homeIdleClockMinutes,
- boolean keyFilter, boolean dockGlass) {
++ boolean keyFilter, boolean dockGlass, String glowStyle) {
this.inputKeycodes = inputKeycodes;
this.appKeys = Collections.unmodifiableList(appKeys);
+ this.keyFilter = keyFilter;
+ this.stockHomeRedirect = stockHomeRedirect;
this.dockApps = Collections.unmodifiableList(dockApps);
this.fillDock = fillDock;
this.hiddenApps = Collections.unmodifiableList(hiddenApps);
@@@ -224,9 -192,13 +228,15 @@@
this.raceCalendar = Collections.unmodifiableList(raceCalendar);
this.cinematicHome = cinematicHome;
this.ambientGlow = ambientGlow;
+ this.appGlow = appGlow;
this.homeIdleClockMinutes = homeIdleClockMinutes;
+ this.dockGlass = dockGlass;
+ this.glowStyle = glowStyle(glowStyle);
+ }
+
+ /** A known glow_style, or radial (the default) for anything else. */
+ static String glowStyle(String value) {
+ return value != null && GLOW_HORIZON.equalsIgnoreCase(value.trim()) ? GLOW_HORIZON : GLOW_RADIAL;
}
/** The folder the theme tools push into; null when external storage is unavailable. */
@@@ -281,13 -246,10 +291,14 @@@
boolean settingsKeyPanel = res.getBoolean(R.bool.settings_key_panel);
int[] inputKeycodes = res.getIntArray(R.array.input_key_keycodes);
List<String> appKeys = new ArrayList<>(Arrays.asList(res.getStringArray(R.array.app_keys)));
+ String stockHomeRedirect = res.getString(R.string.stock_home_redirect).trim();
boolean cinematic = res.getBoolean(R.bool.cinematic_home);
boolean ambientGlow = res.getBoolean(R.bool.ambient_glow);
+ boolean appGlow = res.getBoolean(R.bool.app_glow);
int idleClockMinutes = res.getInteger(R.integer.home_idle_clock_minutes);
+ boolean keyFilter = res.getBoolean(R.bool.key_filter);
+ boolean dockGlass = res.getBoolean(R.bool.dock_glass);
+ String glowStyle = res.getString(R.string.glow_style);
boolean applied = false;
File dir = dir(ctx);
@@@ -341,13 -296,10 +352,14 @@@
settingsKeyPanel = bool(json, "settings_key_panel", settingsKeyPanel);
inputKeycodes = intArray(json, "input_key_keycodes", inputKeycodes);
appKeys = stringList(json, "app_keys", appKeys);
+ stockHomeRedirect = string(json, "stock_home_redirect", stockHomeRedirect);
cinematic = bool(json, "cinematic_home", cinematic);
ambientGlow = bool(json, "ambient_glow", ambientGlow);
+ appGlow = bool(json, "app_glow", appGlow);
idleClockMinutes = integer(json, "home_idle_clock_minutes", idleClockMinutes, 0, 1440);
+ keyFilter = bool(json, "key_filter", keyFilter);
+ dockGlass = bool(json, "dock_glass", dockGlass);
+ glowStyle = string(json, "glow_style", glowStyle);
}
// A theme push or reset invalidates choices made on the TV. On first use, remember the
// current theme without clearing choices from an older launcher version.
@@@ -400,15 -351,15 +412,15 @@@
Festival festival = json == null ? Festival.NONE : Festival.parse(string(json, "festival", ""),
string(json, "festival_until", ""), string(json, "greeting", ""), string(json, "accent_color", ""));
- return new Config(dock, fillDock, hidden, liveTv, liveTvAction, packageMap(launchActions), packageMap(appLabels),
+ return new Config(dock, fillDock, hidden, liveTv, liveTvAction, liveTvInputId, packageMap(launchActions), packageMap(appLabels),
packageMap(appBanners), panelService,
- panelAction, inputAction,
+ panelAction, panelExtra, coocaaSources, inputAction, inputUriScheme,
Math.max(1, columns), Math.max(0, rowsBelow), animations, advancedEffects,
- shamsi, greetingName, moduleCards, reducedMotion, dockTitle, dockRow, reorderButton, showNetworkPill, iconOnlyButtons, libraryButton, wifiLabelWidth, alwaysShowNames, wallpaperTrueColor, vpn, homeSettings, showStats, library, background,
+ shamsi, greetingName, moduleCards, reducedMotion, bootToLiveTv, dockTitle, dockRow, reorderButton, showNetworkPill, showInputsPill, iconOnlyButtons, libraryButton, wifiLabelWidth, alwaysShowNames, wallpaperTrueColor, focusOvershoot, vpn, homeSettings, showStats, library, background,
Math.max(0, Math.min(100, skyIntensity)), settingsKeycodes, settingsKeyPanel, wallpaperEnabled, wallpaper,
- wallpapers, rotationMinutes, wallpaperDim, wallpaperOrder, applied,
- festival, inputKeycodes, appKeys, json == null ? Collections.emptyList() : raceCalendar(json), cinematic, ambientGlow,
- Math.max(0, idleClockMinutes), glowStyle);
+ wallpapers, rotationMinutes, wallpaperDim, dockOpacity, wallpaperOrder, applied,
+ festival, inputKeycodes, appKeys, stockHomeRedirect, json == null ? Collections.emptyList() : raceCalendar(json), cinematic, ambientGlow, appGlow,
- Math.max(0, idleClockMinutes), keyFilter, dockGlass);
++ Math.max(0, idleClockMinutes), keyFilter, dockGlass, glowStyle);
}
/**
diff --cc launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
index 5dd6be8c0,aeac587c9..90eec8f64
--- a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
@@@ -134,8 -128,8 +134,10 @@@ public class MainActivity extends Activ
/** config.xml ambient_glow, overridable by a theme. Off: the glow view is gone and no fade or colour animator
* is started for it, so a focus move costs nothing extra on a launcher that runs all day. */
private boolean ambientGlow;
+ /** config.xml app_glow: the highlight takes the focused app's colour on every tile. */
+ private boolean appGlow;
+ /** config.xml glow_style: the shape setAmbient paints the glow mask in. */
+ private String glowStyle;
private ImageView heroArt;
private static final float HERO_ART_ALPHA = 0.5f;
/** Softened artwork per app (HeroArt, about 5 KB each), made the first time its dock tile is focused. */
diff --cc themes/README.md
index 3cf7f0f13,e1bdf4540..877a887d8
--- a/themes/README.md
+++ b/themes/README.md
@@@ -84,17 -71,11 +84,18 @@@ is ignored, and a file that doesn't par
| `settings_key_panel` | bool | Those buttons open a small quick settings panel (TV settings, Display, Network, Apps, Launcher settings) instead of the TV's Settings |
| `input_key_keycodes` | list of keycodes | More remote buttons that open the input switcher, for `InputKeyService` (`KEYCODE_TV` and `KEYCODE_TV_INPUT` always do) |
| `app_keys` | list of strings | Remote buttons that open an app, as `"190:com.google.android.youtube.tv"` or `"KEYCODE_BUTTON_3:com.google.android.youtube.tv"`, or by scancode as `"scan:490:com.wbd.hbomax"` for remotes that share one keycode between app buttons (Sony BRAVIA), for `InputKeyService` or `HomeKeyService` |
+| `key_filter` | bool | `false` makes the key helpers stop filtering keys while staying enabled. Use it on firmware where any key-filtering accessibility service breaks long-press repeat (TCL Google TV on Android 12): the remote buttons above stop working, and volume repeat comes back |
+| `app_keys` | list of strings | Remote buttons that open an app, as `"190:com.google.android.youtube.tv"` or `"KEYCODE_BUTTON_3:com.google.android.youtube.tv"`, or by scancode as `"scan:490:com.wbd.hbomax"` for remotes that share one keycode between app buttons (Sony BRAVIA), for `InputKeyService` or `HomeKeyService`. `"input:<input id>"` in place of the package switches to a TV input instead, e.g. `"scan:227:input:com.tcl.tvinput/.passthroughinput.TvPassThroughService/HW1413744640"` for an HDMI port (ids from `dumpsys tv_input`) |
+| `app_keys` | list of strings | Remote buttons that open an app, as `"190:com.google.android.youtube.tv"` or `"KEYCODE_BUTTON_3:com.google.android.youtube.tv"`, for `InputKeyService` or `HomeKeyService` |
+| `stock_home_redirect` | string | Stock launcher package; if the firmware turns it back on (XGIMI), its home screen is sent straight back here (`HOME_KEY_SERVICE=1`) |
+| `app_keys` | list of strings | Remote buttons that open an app, as `"190:com.google.android.youtube.tv"` or `"KEYCODE_BUTTON_3:com.google.android.youtube.tv"`, or by scancode as `"scan:490:com.wbd.hbomax"` for remotes that share one keycode between app buttons (Sony BRAVIA), for `InputKeyService` or `HomeKeyService`. Prefix an entry with `hold:` to open a second app on a long press, e.g. `"hold:190:com.netflix.ninja"` |
| `race_calendar` | list of races | F1 race-weekend mode: from 12 hours before a weekend's first session until 4 hours after the race starts, a panel under the clock shows the next session with a countdown (or the live one) and the weekend's session times in the TV's time zone. Write it with `tools/race_calendar.py <theme folder>`, which fetches the season from the free Jolpica API; the launcher itself never goes online |
| `home_idle_clock_minutes` | 0 to 1440 | Minutes Home may sit untouched before it shows the clock screensaver (a thin clock and date drifting over a slow glow, as the system "Clock" screensaver does). Any key returns to Home. It starts only from Home, never over Live TV or an app; 0 is off (default) |
+ | `glow_style` | string | Shape of the glow behind the focused app, in its colour: `radial` (default) or `horizon`, the colour washing down from the top edge to black; the cinematic shelf keeps its own |
| `cinematic_home` | bool | Cinematic top shelf: the focused dock app's artwork, softened, fills the top of the screen in its colour, with a larger name, "Last opened" (apps opened from Home), dock position dots, a focus glow in the app's colour and a translucent dock band; off by default |
+| `dock_glass` | bool | The dock band as light frosted glass like the top bar's pills (`false` by default); suits `sky_intensity` or a wallpaper, where the solid band reads as a dark slab |
| `ambient_glow` | bool | The glow behind the dock in the focused app's colour (`true` by default); `false` keeps only `background_color` or the wallpaper, e.g. for a calm photo background |
+| `app_glow` | bool | The focus highlight glows in the focused app's colour on every tile, as `cinematic_home` does for the dock (`false` by default) |
## Wallpapers