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
Merge PR #1040: Launcher: cinematic_scrim and cinematic_art, to let a wallpaper show through the cinematic shelf
Gathin23550fc22fe244
diff --cc launcher/app/src/main/java/com/gathin/tvhome/Config.javaindex 9833b2dc6,276acdf70..b96af6931--- a/launcher/app/src/main/java/com/gathin/tvhome/Config.java+++ b/launcher/app/src/main/java/com/gathin/tvhome/Config.java@@@ -175,12 -175,10 +175,16 @@@ final class Configfinal boolean dockGlass;/** The dock band's padding equals the gap between its tiles (config.xml, dock_even_padding); false keeps the fixed padding. */final boolean dockEvenPadding;+ /** The dock position dots under the cinematic shelf's name (config.xml, cinematic_dots); false leaves them out. */+ final boolean cinematicDots;+ /** The cinematic shelf keeps the white focus highlight instead of the app's colour (config.xml, cinematic_white_focus). */+ final boolean cinematicWhiteFocus;+ /** The Wi-Fi pill's icon green while the TV is online (config.xml, wifi_status_color); false keeps it white. */+ final boolean wifiStatusColor;+ /** Opacity of the app's artwork behind the cinematic shelf, 0 to 100 (config.xml, cinematic_art); 50 as before. */+ final int cinematicArt;+ /** Strength of the cinematic shelf's dark scrim, 0 to 100 percent (config.xml, cinematic_scrim); 100 as before. */+ final int cinematicScrim;/** Shape of the glow behind the focused app (config.xml, glow_style): {@link #GLOW_RADIAL} or {@link #GLOW_HORIZON}. */final String glowStyle;@@@ -204,7 -202,7 +208,7 @@@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, String glowStyle, boolean wallpaperCaptions,- boolean handleViewInputs, boolean tileMenu, boolean dockEvenPadding, boolean cinematicDots, boolean cinematicWhiteFocus, boolean wifiStatusColor) {- boolean handleViewInputs, boolean tileMenu, boolean dockEvenPadding, int cinematicScrim, int cinematicArt) {++ boolean handleViewInputs, boolean tileMenu, boolean dockEvenPadding, boolean cinematicDots, boolean cinematicWhiteFocus, boolean wifiStatusColor, int cinematicScrim, int cinematicArt) {this.handleViewInputs = handleViewInputs;this.tileMenu = tileMenu;this.inputKeycodes = inputKeycodes;@@@ -275,9 -273,8 +279,11 @@@this.homeIdleClockMinutes = homeIdleClockMinutes;this.dockGlass = dockGlass;this.dockEvenPadding = dockEvenPadding;+ this.cinematicDots = cinematicDots;+ this.cinematicWhiteFocus = cinematicWhiteFocus;+ this.wifiStatusColor = wifiStatusColor;+ this.cinematicArt = cinematicArt;+ this.cinematicScrim = cinematicScrim;this.glowStyle = glowStyle(glowStyle);this.wallpaperCaptions = wallpaperCaptions;}@@@ -355,9 -352,8 +361,11 @@@boolean keyFilter = res.getBoolean(R.bool.key_filter);boolean dockGlass = res.getBoolean(R.bool.dock_glass);boolean dockEvenPadding = res.getBoolean(R.bool.dock_even_padding);+ boolean cinematicDots = res.getBoolean(R.bool.cinematic_dots);+ boolean cinematicWhiteFocus = res.getBoolean(R.bool.cinematic_white_focus);+ boolean wifiStatusColor = res.getBoolean(R.bool.wifi_status_color);+ int cinematicArt = res.getInteger(R.integer.cinematic_art);+ int cinematicScrim = res.getInteger(R.integer.cinematic_scrim);String glowStyle = res.getString(R.string.glow_style);boolean applied = false;@@@ -428,9 -424,8 +436,11 @@@keyFilter = bool(json, "key_filter", keyFilter);dockGlass = bool(json, "dock_glass", dockGlass);dockEvenPadding = bool(json, "dock_even_padding", dockEvenPadding);+ cinematicDots = bool(json, "cinematic_dots", cinematicDots);+ cinematicWhiteFocus = bool(json, "cinematic_white_focus", cinematicWhiteFocus);+ wifiStatusColor = bool(json, "wifi_status_color", wifiStatusColor);+ cinematicArt = integer(json, "cinematic_art", cinematicArt, 0, 100);+ cinematicScrim = integer(json, "cinematic_scrim", cinematicScrim, 0, 100);glowStyle = string(json, "glow_style", glowStyle);}// A theme push or reset invalidates choices made on the TV. On first use, remember the@@@ -485,7 -480,7 +495,7 @@@Math.max(0, Math.min(100, skyIntensity)), settingsKeycodes, settingsKeyPanel, restoreKeyServices, wallpaperEnabled, wallpaper,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, glowStyle, wallpaperCaptions, handleViewInputs, tileMenu, dockEvenPadding, cinematicDots, cinematicWhiteFocus, wifiStatusColor);- Math.max(0, idleClockMinutes), keyFilter, dockGlass, glowStyle, wallpaperCaptions, handleViewInputs, tileMenu, dockEvenPadding, cinematicScrim, cinematicArt);++ Math.max(0, idleClockMinutes), keyFilter, dockGlass, glowStyle, wallpaperCaptions, handleViewInputs, tileMenu, dockEvenPadding, cinematicDots, cinematicWhiteFocus, wifiStatusColor, cinematicScrim, cinematicArt);}/**diff --cc launcher/app/src/main/java/com/gathin/tvhome/MainActivity.javaindex ae177ca22,956d3a6bc..15a09326e--- a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java+++ b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java@@@ -150,12 -149,9 +150,13 @@@ public class MainActivity extends Activprivate boolean appGlow;/** config.xml glow_style: the shape setAmbient paints the glow mask in. */private String glowStyle;+ /** config.xml cinematic_white_focus: the cinematic shelf keeps the white highlight. */+ private boolean cinematicWhiteFocus;private ImageView heroArt;- private static final float HERO_ART_ALPHA = 0.5f;+ /** config.xml cinematic_dots: false leaves the dock position dots out of the cinematic shelf. */+ private boolean heroDotsShown = true;+ /** The artwork's opacity behind the cinematic shelf (config.xml cinematic_art); 0 leaves it out. */+ private float heroArtAlpha = 0.5f;/** Softened artwork per app (HeroArt, about 5 KB each), made the first time its dock tile is focused. */private final Map<String, Bitmap> heroArtCache = new HashMap<>();/** The app whose artwork heroArt shows, so focusing it again only fades it back in. */@@@ -410,9 -406,8 +411,10 @@@heroArt = findViewById(R.id.heroArt);cinematic = cfg.cinematicHome;glowStyle = cfg.glowStyle;+ heroDotsShown = cfg.cinematicDots;+ cinematicWhiteFocus = cfg.cinematicWhiteFocus;- if (cinematic) setUpCinematicShelf();+ heroArtAlpha = cfg.cinematicArt / 100f;+ if (cinematic) setUpCinematicShelf(cfg.cinematicScrim);// dock_title false: the name above the dock (and the cinematic lines under it) never shows; the glow// still follows the dock.if (!cfg.dockTitle) hero.setVisibility(View.GONE);@@@ -1643,12 -1625,16 +1648,16 @@@heroName.setTextSize(TypedValue.COMPLEX_UNIT_SP, 68f);heroName.setLetterSpacing(-0.025f);heroMeta.setVisibility(View.INVISIBLE); // keeps its height, so the name does not jump when it fills in- heroDots.setVisibility(View.VISIBLE);+ heroDots.setVisibility(heroDotsShown ? View.VISIBLE : View.GONE);- heroArt.setVisibility(View.VISIBLE);+ heroArt.setVisibility(heroArtAlpha > 0f ? View.VISIBLE : View.GONE);// One stretched bitmap: apply its alpha while drawing instead of through an offscreen buffer.heroArt.forceHasOverlappingRendering(false);+ if (scrimPercent <= 0) return; // cinematic_scrim 0: no scrim at allView scrim = findViewById(R.id.heroScrim);- scrim.setBackground(scrimDrawable());+ Drawable shade = scrimDrawable();+ // On the bitmap's paint, not the view: a view's alpha would draw the full screen through an offscreen buffer.+ shade.setAlpha(scrimPercent * 255 / 100);+ scrim.setBackground(shade);scrim.setVisibility(View.VISIBLE);}diff --cc launcher/app/src/main/res/values/config.xmlindex c71ba5a91,77f6183d7..db63bf200--- a/launcher/app/src/main/res/values/config.xml+++ b/launcher/app/src/main/res/values/config.xml@@@ -309,13 -305,12 +309,19 @@@dots, the focus glow takes the app's colour and the dock band turns translucent. false keeps the plainshelf. Can also be set with "cinematic_home": true in a theme's config.json. --><bool name="cinematic_home">false</bool>+ <!-- With cinematic_home, false leaves out the dock position dots under the app's name, for a quieter shelf. Can+ also be set with "cinematic_dots": false in a theme's config.json. -->+ <bool name="cinematic_dots">true</bool>+ <!-- With cinematic_home, true keeps the focus highlight white on the dock instead of the focused app's colour,+ for wallpapers and banners that clash with it; app_glow still colours every tile. Can also be set with+ "cinematic_white_focus": true in a theme's config.json. -->+ <bool name="cinematic_white_focus">false</bool>+ <!-- With cinematic_home, how much of a wallpaper the shelf covers: cinematic_scrim is the strength of the dark+ scrim that keeps the name readable (0 to 100 percent, 100 as before) and cinematic_art the opacity of the+ app's softened artwork (0 to 100, 50 as before; 0 leaves the wallpaper uncovered). Lower values let a+ theme's wallpaper show through. A theme can set "cinematic_scrim" and "cinematic_art". -->+ <integer name="cinematic_scrim">100</integer>+ <integer name="cinematic_art">50</integer><!-- The glow behind the dock in the focused app's colour (red for YouTube, blue for Prime Video). false keepsonly background_color or the wallpaper behind everything. Can also be set with "ambient_glow": false in adiff --cc themes/README.mdindex 7233117f6,77191dec7..411582c18--- a/themes/README.md+++ b/themes/README.md@@@ -99,8 -98,8 +99,10 @@@ is ignored, and a file that doesn't par| `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 |+| `cinematic_dots` | bool | With `cinematic_home`, the dock position dots under the app's name (`true` by default); `false` leaves them out |+| `cinematic_white_focus` | bool | With `cinematic_home`, the focus highlight stays white on the dock instead of taking the focused app's colour (`false` by default); `app_glow` still colours every tile |+ | `cinematic_scrim` | 0 to 100 | With `cinematic_home`, the strength of the dark scrim behind the shelf's name (`100` by default); lower lets a wallpaper show through |+ | `cinematic_art` | 0 to 100 | With `cinematic_home`, the opacity of the focused app's softened artwork (`50` by default); `0` leaves the wallpaper uncovered || `dock_even_padding` | bool | The dock band's padding equals the gap between its tiles on all four sides, as far as the grid's edges leave room (`false` 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 |