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 #390: launcher: optional cinematic top shelf (cinematic_home)
Gathin2377027354376a
diff --cc launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.javaindex ac7882397,69879599f..5b9d07153--- a/launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.java+++ b/launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.java@@@ -173,6 -173,6 +173,8 @@@ public class AppAdapter extends Recycleprivate final int dockSize;/** config dock_row: false makes the dock apps the first tiles of one plain grid (names shown, no empty slots). */private final boolean dockRow;++ /** cinematic_home: only then does a launch record the last-opened app the shelf uses. */++ private final boolean cinematic;/** Dock order (config.xml dock_apps, or a theme's config.json). */private final List<String> favourites;/** Grid apps fill the dock slots dock_apps leaves free (config.xml, fill_dock). */@@@ -210,9 -206,6 +212,10 @@@this.rowsBelowDock = cfg.rowsBelowDock;this.dockTitle = cfg.dockTitle;this.dockRow = cfg.dockRow;++ this.cinematic = cfg.cinematicHome;+ this.launchActions = cfg.launchActions;+ this.appLabels = cfg.appLabels;+ this.appBanners = cfg.appBanners;// Tiles keep their identity across reload(), so a focused tile stays on its app instead of// its view being rebound to whatever app now sits in that slot.setHasStableIds(true);@@@ -440,14 -424,9 +443,15 @@@// TV apps launch with the same leanback intent as from the stock launcher or the remote, so an app// already running resumes instead of restarting; only phone apps added from the library use plain MAIN.if (leanbackPackages.contains(e.pkg)) i.addCategory(Intent.CATEGORY_LEANBACK_LAUNCHER);+ String action = launchActions.get(e.pkg);+ if (action != null) {+ Intent byAction = new Intent(action).setPackage(e.pkg)+ .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);+ if (ctx.getPackageManager().resolveActivity(byAction, 0) != null) i = byAction;+ }try {ctx.startActivity(i);- LastOpened.record(ctx, e.pkg);++ if (cinematic) LastOpened.record(ctx, e.pkg);if (advancedEffects && ctx instanceof Activity) {((Activity) ctx).overridePendingTransition(R.anim.app_open_enter, R.anim.app_open_exit);}diff --cc launcher/app/src/main/java/com/gathin/tvhome/Config.javaindex ec1234760,e63421a17..8f41173e3--- a/launcher/app/src/main/java/com/gathin/tvhome/Config.java+++ b/launcher/app/src/main/java/com/gathin/tvhome/Config.java@@@ -100,19 -90,17 +100,21 @@@ final class Configfinal boolean overlayApplied;/** Festive skin from a theme (festival, festival_until, greeting, accent_color); {@link Festival#NONE} if none. */final Festival festival;+ /** F1 weekends from a theme's race_calendar (see RaceWeekend); empty when the theme has none. */+ final List<RaceWeekend.Race> raceCalendar;+ /** Cinematic top shelf (config.xml, cinematic_home): the focused dock app's artwork behind a larger shelf. */+ final boolean cinematicHome;private Config(List<String> dockApps, boolean fillDock, List<String> hiddenApps, String liveTvPackage,- String liveTvAction, String sourcePanelService, String sourcePanelAction, String inputAction,+ 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, 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, boolean overlayApplied,- Festival festival, int[] inputKeycodes, List<String> appKeys, boolean cinematicHome) {+ Festival festival, int[] inputKeycodes, List<String> appKeys,- List<RaceWeekend.Race> raceCalendar) {++ List<RaceWeekend.Race> raceCalendar, boolean cinematicHome) {this.inputKeycodes = inputKeycodes;this.appKeys = Collections.unmodifiableList(appKeys);this.dockApps = Collections.unmodifiableList(dockApps);@@@ -152,7 -137,7 +154,8 @@@this.wallpaperDim = wallpaperDim;this.overlayApplied = overlayApplied;this.festival = festival;+ this.raceCalendar = Collections.unmodifiableList(raceCalendar);+ this.cinematicHome = cinematicHome;}/** The folder the theme tools push into; null when external storage is unavailable. */@@@ -286,37 -244,7 +291,37 @@@shamsi, greetingName, moduleCards, reducedMotion, dockTitle, dockRow, reorderButton, vpn, homeSettings, showStats, library, background,Math.max(0, Math.min(100, skyIntensity)), settingsKeycodes, settingsKeyPanel, wallpaperEnabled, wallpaper,wallpapers, rotationMinutes, wallpaperDim, applied,- festival, inputKeycodes, appKeys, json == null ? Collections.emptyList() : raceCalendar(json));- festival, inputKeycodes, appKeys, cinematic);++ festival, inputKeycodes, appKeys, json == null ? Collections.emptyList() : raceCalendar(json), cinematic);+ }++ /**+ * {@code "race_calendar": [{"round": 18, "name": "United States Grand Prix", "place": "Austin",+ * "sessions": [{"name": "FP1", "start": "2026-10-23T17:30:00Z"}, ...]}, ...]}. A race or session that does+ * not parse is left out on its own; the rest of the calendar still counts.+ */+ private static List<RaceWeekend.Race> raceCalendar(JSONObject json) {+ List<RaceWeekend.Race> races = new ArrayList<>();+ JSONArray list = json.optJSONArray("race_calendar");+ if (list == null) return races;+ for (int i = 0; i < list.length(); i++) {+ JSONObject r = list.optJSONObject(i);+ JSONArray sessions = r == null ? null : r.optJSONArray("sessions");+ if (sessions == null) continue;+ List<RaceWeekend.Session> parsed = new ArrayList<>();+ for (int j = 0; j < sessions.length(); j++) {+ JSONObject s = sessions.optJSONObject(j);+ if (s == null) continue;+ String name = s.optString("name", "").trim();+ try {+ if (!name.isEmpty()) parsed.add(new RaceWeekend.Session(name, java.time.Instant.parse(s.optString("start", ""))));+ } catch (java.time.format.DateTimeParseException ignored) {+ // a session without a readable start time cannot be counted down+ }+ }+ if (!parsed.isEmpty()) races.add(new RaceWeekend.Race(r.optInt("round", 0),+ r.optString("name", "Grand Prix").trim(), r.optString("place", "").trim(), parsed));+ }+ return races;}private static void syncThemeChoices(SharedPreferences choices, File dir, File config) {diff --cc launcher/app/src/main/java/com/gathin/tvhome/MainActivity.javaindex 56658fb12,fb15d15a2..c38133eec--- a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java+++ b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java@@@ -284,8 -295,15 +302,18 @@@ public class MainActivity extends Activ// a fade renders it into a full-screen offscreen buffer first.ambient.forceHasOverlappingRendering(false);heroName = findViewById(R.id.heroName);- // dock_title false: the name above the dock never shows; the glow still follows the dock.- if (!cfg.dockTitle) heroName.setVisibility(View.GONE);+ hero = findViewById(R.id.hero);++ // The hero is now a group (name, and the cinematic lines): without this every fade of the default++ // shelf would render it through an offscreen buffer first, as the glow above notes.++ hero.forceHasOverlappingRendering(false);+ heroMeta = findViewById(R.id.heroMeta);+ heroDots = findViewById(R.id.heroDots);+ heroArt = findViewById(R.id.heroArt);+ cinematic = cfg.cinematicHome;+ if (cinematic) setUpCinematicShelf();+ // 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);greeting = findViewById(R.id.greeting);greetingColor = greeting.getCurrentTextColor();btnWifi = findViewById(R.id.btnWifi);@@@ -1038,9 -1042,14 +1072,15 @@@// GlassView draws its slab inset by pad, i.e. exactly over the zoomed tile: same corners as the tile.glass.setRadius(AppAdapter.cornerRadius(card.getWidth(), density) * scale);}+ glassCardW = card.getWidth();glassTargetX = x;glassTargetY = y;+ // Cinematic shelf: the highlight glows in the dock app's colour, plain white in the grid.+ int accent = cinematic && !festive && position < COLUMNS ? adapter.ambientColorAt(position) : 0;+ if (cinematic && !festive && accent != glassAccent) {+ glassAccent = accent;+ glass.setAccent(accent);+ }if (!glassShown) {springX.cancel();springY.cancel();diff --cc launcher/app/src/main/res/layout-iw/activity_main.xmlindex e31d77342,ee27f2f23..e546dcec8--- a/launcher/app/src/main/res/layout-iw/activity_main.xml+++ b/launcher/app/src/main/res/layout-iw/activity_main.xml@@@ -21,71 -32,19 +32,80 @@@android:layout_height="match_parent"android:alpha="0" />+ <!-- Race-weekend panel (a theme's race_calendar, see RaceWeekend), mirrored: under the clock on the right. -->+ <LinearLayout+ android:id="@+id/racePanel"+ android:layout_width="wrap_content"+ android:layout_height="wrap_content"+ android:layout_gravity="top|right"+ android:layout_marginEnd="60dp"+ android:layout_marginTop="158dp"+ android:gravity="right"+ android:orientation="vertical"+ android:focusable="false"+ android:importantForAccessibility="no"+ android:visibility="gone">++ <LinearLayout+ android:layout_width="wrap_content"+ android:layout_height="wrap_content"+ android:orientation="horizontal"+ android:gravity="center_vertical">++ <TextView+ android:id="@+id/raceKicker"+ android:layout_width="wrap_content"+ android:layout_height="wrap_content"+ android:singleLine="true"+ android:textColor="#B3FFFFFF"+ android:textSize="12sp"+ android:fontFamily="@font/outfit_medium"+ android:letterSpacing="0.22"+ android:textAllCaps="true" />++ <View+ android:layout_width="3dp"+ android:layout_height="13dp"+ android:layout_marginStart="10dp"+ android:background="@drawable/race_bar" />+ </LinearLayout>++ <TextView+ android:id="@+id/raceHeadline"+ android:layout_width="wrap_content"+ android:layout_height="wrap_content"+ android:layout_marginTop="8dp"+ android:singleLine="true"+ android:textColor="#FFFFFFFF"+ android:textSize="34sp"+ android:fontFamily="@font/outfit_light"+ android:letterSpacing="-0.01"+ android:includeFontPadding="false" />++ <TextView+ android:id="@+id/raceSessions"+ android:layout_width="wrap_content"+ android:layout_height="wrap_content"+ android:layout_marginTop="12dp"+ android:singleLine="true"+ android:textColor="#99FFFFFF"+ android:textSize="12sp"+ android:fontFamily="@font/outfit_medium"+ android:letterSpacing="0.12" />+ </LinearLayout>+ <!-- Cinematic top shelf: darkens the edge behind the shelf and the lower half, so the text and the+ dock stay readable over the artwork. -->+ <View+ android:id="@+id/heroScrim"+ android:layout_width="match_parent"+ android:layout_height="match_parent"+ android:visibility="gone"+ android:importantForAccessibility="no" />+<!-- Top shelf: the focused dock app's name, positioned above the dock in code. -->- <TextView- android:id="@+id/heroName"+ <LinearLayout+ android:id="@+id/hero"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginEnd="68dp"diff --cc launcher/app/src/main/res/layout/activity_main.xmlindex 7edb2227d,0a28d10c3..b8895f0f9--- a/launcher/app/src/main/res/layout/activity_main.xml+++ b/launcher/app/src/main/res/layout/activity_main.xml@@@ -19,73 -30,19 +30,82 @@@android:layout_height="match_parent"android:alpha="0" />+ <!-- Race-weekend panel (a theme's race_calendar, see RaceWeekend): in the free space under the clock,+ shown only from shortly before a weekend's first session until the race is over. Updated once a+ minute with the clock, never animated. -->+ <LinearLayout+ android:id="@+id/racePanel"+ android:layout_width="wrap_content"+ android:layout_height="wrap_content"+ android:layout_gravity="top|left"+ android:layout_marginStart="60dp"+ android:layout_marginTop="158dp"+ android:orientation="vertical"+ android:focusable="false"+ android:importantForAccessibility="no"+ android:visibility="gone">++ <LinearLayout+ android:layout_width="wrap_content"+ android:layout_height="wrap_content"+ android:orientation="horizontal"+ android:gravity="center_vertical">++ <!-- A short kerb-red bar, the panel's one accent. -->+ <View+ android:layout_width="3dp"+ android:layout_height="13dp"+ android:layout_marginEnd="10dp"+ android:background="@drawable/race_bar" />++ <TextView+ android:id="@+id/raceKicker"+ android:layout_width="wrap_content"+ android:layout_height="wrap_content"+ android:singleLine="true"+ android:textColor="#B3FFFFFF"+ android:textSize="12sp"+ android:fontFamily="@font/outfit_medium"+ android:letterSpacing="0.22"+ android:textAllCaps="true" />+ </LinearLayout>++ <TextView+ android:id="@+id/raceHeadline"+ android:layout_width="wrap_content"+ android:layout_height="wrap_content"+ android:layout_marginTop="8dp"+ android:singleLine="true"+ android:textColor="#FFFFFFFF"+ android:textSize="34sp"+ android:fontFamily="@font/outfit_light"+ android:letterSpacing="-0.01"+ android:includeFontPadding="false" />++ <TextView+ android:id="@+id/raceSessions"+ android:layout_width="wrap_content"+ android:layout_height="wrap_content"+ android:layout_marginTop="12dp"+ android:singleLine="true"+ android:textColor="#99FFFFFF"+ android:textSize="12sp"+ android:fontFamily="@font/outfit_medium"+ android:letterSpacing="0.12" />+ </LinearLayout>+ <!-- Cinematic top shelf: darkens the edge behind the shelf and the lower half, so the text and the+ dock stay readable over the artwork. -->+ <View+ android:id="@+id/heroScrim"+ android:layout_width="match_parent"+ android:layout_height="match_parent"+ android:visibility="gone"+ android:importantForAccessibility="no" />+<!-- Top shelf: the focused dock app's name, positioned above the dock in code. -->- <TextView- android:id="@+id/heroName"+ <LinearLayout+ android:id="@+id/hero"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginStart="68dp"diff --cc launcher/app/src/main/res/values-iw/strings.xmlindex 5ad9d9894,bc2206b8c..07811e483--- a/launcher/app/src/main/res/values-iw/strings.xml+++ b/launcher/app/src/main/res/values-iw/strings.xml@@@ -88,18 -88,5 +88,19 @@@<item quantity="other">%1$d אפליקציות</item></plurals><string name="greeting_with_name">%1$s, %2$s</string>+ <string name="rows_below_dock_label">שורות מתחת לעגינה</string>+ <string name="wallpaper_label">טפט</string>+ <string name="wallpaper_state">טפט: %1$s</string>+ <string name="wallpaper_none">ללא</string>+ <string name="wallpaper_applied">הטפט שונה</string>+ <string name="wallpaper_theme_default">ברירת המחדל של ערכת הנושא</string>++ <!-- Race-weekend panel (RaceWeekend). -->+ <string name="race_kicker">סבב %1$d · %2$s · %3$s</string>+ <string name="race_kicker_no_place">סבב %1$d · %2$s</string>+ <string name="race_next">%1$s בעוד %2$s</string>+ <string name="race_lights_out">הזינוק בעוד %1$s</string>+ <string name="race_live">%1$s · בשידור חי</string>+ <string name="race_finished">הדגל המשובץ</string>+ <string name="last_opened">נפתח לאחרונה %1$s</string></resources>diff --cc launcher/app/src/main/res/values/strings.xmlindex c39069d7b,d0fc7c068..58d2338ca--- a/launcher/app/src/main/res/values/strings.xml+++ b/launcher/app/src/main/res/values/strings.xml@@@ -96,12 -90,7 +96,15 @@@</plurals><!-- The greeting, then greeting_name: "Good morning, Mr. Trịnh". --><string name="greeting_with_name">%1$s, %2$s</string>++ <!-- Race-weekend panel (RaceWeekend). Session names come from the calendar. -->+ <string name="race_kicker">Round %1$d · %2$s · %3$s</string>+ <string name="race_kicker_no_place">Round %1$d · %2$s</string>+ <string name="race_next">%1$s in %2$s</string>+ <string name="race_lights_out">Lights out in %1$s</string>+ <string name="race_live">%1$s · live</string>+ <string name="race_finished">Chequered flag</string>+ <!-- Cinematic top shelf (cinematic_home): the line under the focused dock app's name; %1$s is when it was+ last opened, e.g. "5 minutes ago" or "yesterday, 9:40 pm". -->+ <string name="last_opened">Last opened %1$s</string></resources>diff --cc themes/README.mdindex 08cf74d54,58a54f516..b4cc19ed9--- a/themes/README.md+++ b/themes/README.md@@@ -64,7 -60,7 +64,8 @@@ 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"`, for `InputKeyService` or `HomeKeyService` |+| `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 |+ | `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 |## Wallpapers