Skip to content

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

Merge PR #1743: Launcher: locale, the launcher's own language for firmware that lacks it (off by default)

Gathin23e08fd8223c9f
diff --cc docs/switches.md
index a550e37e5,38ed888f2..922a3d988
--- a/docs/switches.md
+++ b/docs/switches.md
@@@ -49,6 -49,5 +49,7 @@@ fits the rules; keys from before the ru
| `show_library_pill` | <img src="switches/show_library_pill.jpg" width="320" alt="show_library_pill on a TV"> |
| `library_ok_opens` | <img src="switches/library_ok_opens.jpg" width="320" alt="library_ok_opens on a TV"> |
| `date_below_clock` | <img src="switches/date_below_clock.jpg" width="320" alt="date_below_clock on a TV"> |
+ | `locale` | <img src="switches/locale.jpg" width="320" alt="locale set to en on a TV whose system language is Vietnamese"> |
| `power_on_home` | <img src="switches/power_on_home.jpg" width="320" alt="power_on_home on a TV"> |
+| `home_long_press_home` | <img src="switches/home_long_press_home.jpg" width="320" alt="home_long_press_home on a TV"> |
+| `vpn_pill` | <img src="switches/vpn_pill.jpg" width="320" alt="vpn_pill on a TV"> |
diff --cc launcher/app/src/main/java/com/gathin/tvhome/Config.java
index 94426d370,c36535727..dc5592e60
--- a/launcher/app/src/main/java/com/gathin/tvhome/Config.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/Config.java
@@@ -92,8 -90,8 +92,10 @@@ final class Config
final int lunarUtcOffset;
/** The date on its own line under the clock instead of beside it (config.xml, date_below_clock). */
final boolean dateBelowClock;
+ /** The VPN state as its own pill after the network pill, instead of a badge inside it (config.xml, vpn_pill). */
+ final boolean vpnPill;
+ /** Language tag the launcher shows itself in instead of the TV's, or "" for the TV's (config.xml, locale). */
+ final String locale;
/** Name after the greeting ("Good morning, Mr. Trịnh"); empty for the greeting alone. */
final String greetingName;
final boolean moduleCards;
@@@ -266,7 -262,7 +268,7 @@@
List<RaceWeekend.Race> raceCalendar, boolean cinematicHome, boolean ambientGlow, boolean appGlow, boolean fadeRows, int homeIdleClockMinutes,
boolean keyFilter, boolean dockGlass, String glowStyle, boolean wallpaperCaptions,
boolean handleViewInputs, boolean tileMenu, boolean dockEvenPadding, boolean dockBand, boolean cinematicDots, boolean cinematicWhiteFocus, boolean wifiStatusColor, int cinematicScrim, int cinematicArt,
- Map<String, Set<String>> wallpaperMoods, boolean gamepadPassthrough, boolean consumeVolumeKeys, boolean powerOnHome, boolean homeLongPressHome, boolean wifiStatusWarnings, List<String> topBarApps, boolean showGreeting, boolean headerWhite, boolean clockWallpaper, int clockWallpaperDim, boolean clockGlow, String glassStyle, boolean singleRow, boolean dockBandAll, boolean lunarDate, int lunarUtcOffset, boolean dateBelowClock, boolean vpnPill) {
- Map<String, Set<String>> wallpaperMoods, boolean gamepadPassthrough, boolean consumeVolumeKeys, boolean powerOnHome, boolean wifiStatusWarnings, List<String> topBarApps, boolean showGreeting, boolean headerWhite, boolean clockWallpaper, int clockWallpaperDim, boolean clockGlow, String glassStyle, boolean singleRow, boolean dockBandAll, boolean lunarDate, int lunarUtcOffset, boolean dateBelowClock, String locale) {
++ Map<String, Set<String>> wallpaperMoods, boolean gamepadPassthrough, boolean consumeVolumeKeys, boolean powerOnHome, boolean homeLongPressHome, boolean wifiStatusWarnings, List<String> topBarApps, boolean showGreeting, boolean headerWhite, boolean clockWallpaper, int clockWallpaperDim, boolean clockGlow, String glassStyle, boolean singleRow, boolean dockBandAll, boolean lunarDate, int lunarUtcOffset, boolean dateBelowClock, boolean vpnPill, String locale) {
this.handleViewInputs = handleViewInputs;
this.tileMenu = tileMenu;
this.inputKeycodes = inputKeycodes;
@@@ -298,7 -293,7 +300,8 @@@
this.lunarDate = lunarDate;
this.lunarUtcOffset = lunarUtcOffset;
this.dateBelowClock = dateBelowClock;
+ this.vpnPill = vpnPill;
+ this.locale = locale;
this.greetingName = greetingName;
this.moduleCards = moduleCards;
this.reducedMotion = reducedMotion;
@@@ -477,7 -469,7 +480,8 @@@
String glowStyle = res.getString(R.string.glow_style);
boolean wifiStatusWarnings = res.getBoolean(R.bool.wifi_status_warnings);
boolean dateBelowClock = res.getBoolean(R.bool.date_below_clock);
+ boolean vpnPill = res.getBoolean(R.bool.vpn_pill);
+ String locale = res.getString(R.string.locale).trim();
List<String> topBarApps = new ArrayList<>(Arrays.asList(res.getStringArray(R.array.top_bar_apps)));
boolean showGreeting = res.getBoolean(R.bool.show_greeting);
boolean headerWhite = res.getBoolean(R.bool.header_white);
@@@ -579,7 -569,7 +583,8 @@@
if (moods != null) wallpaperMoods = moods(moods);
wifiStatusWarnings = bool(json, "wifi_status_warnings", wifiStatusWarnings);
dateBelowClock = bool(json, "date_below_clock", dateBelowClock);
+ vpnPill = bool(json, "vpn_pill", vpnPill);
+ locale = string(json, "locale", locale).trim();
topBarApps = stringList(json, "top_bar_apps", topBarApps);
showGreeting = bool(json, "show_greeting", showGreeting);
headerWhite = bool(json, "header_white", headerWhite);
@@@ -648,9 -638,9 +653,9 @@@
json == null ? Collections.emptyList() : raceCalendar(json), cinematic, ambientGlow, appGlow, fadeRows,
Math.max(0, idleClockMinutes), keyFilter, dockGlass, glowStyle, wallpaperCaptions, handleViewInputs, tileMenu, dockEvenPadding,
dockBand, cinematicDots, cinematicWhiteFocus, wifiStatusColor, cinematicScrim, cinematicArt, wallpaperMoods, gamepadPassthrough,
- consumeVolumeKeys, powerOnHome, wifiStatusWarnings, topBarApps, showGreeting, headerWhite, clockWallpaper,
+ consumeVolumeKeys, powerOnHome, homeLongPressHome, wifiStatusWarnings, topBarApps, showGreeting, headerWhite, clockWallpaper,
Math.max(0, Math.min(90, clockWallpaperDim)), clockGlow, glassStyle, singleRow && dockRow, dockBandAll, lunar, lunarOffset,
- dateBelowClock, vpnPill);
- dateBelowClock, locale);
++ dateBelowClock, vpnPill, locale);
}
/**