Skip to content

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

Merge PR #675: launcher: dock_opacity, a wallpaper can show through the dock's band

Gathin237e621daf39bd
diff --cc launcher/app/src/main/java/com/gathin/tvhome/Config.java
index 38dd024f6,63f37d304..e61565eb9
--- a/launcher/app/src/main/java/com/gathin/tvhome/Config.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/Config.java
@@@ -144,25 -130,19 +146,25 @@@ final class Config
final boolean ambientGlow;
/** 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;
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, 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,
+ int wallpaperRotationMinutes, int wallpaperDim, int dockOpacity, String wallpaperOrder, boolean overlayApplied,
- Festival festival, int[] inputKeycodes, List<String> appKeys,
- List<RaceWeekend.Race> raceCalendar, boolean cinematicHome, boolean ambientGlow, int homeIdleClockMinutes) {
+ Festival festival, int[] inputKeycodes, List<String> appKeys, String stockHomeRedirect,
+ List<RaceWeekend.Race> raceCalendar, boolean cinematicHome, boolean ambientGlow, int homeIdleClockMinutes,
+ boolean keyFilter, boolean dockGlass) {
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);
@@@ -386,15 -343,15 +390,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, vpn, homeSettings, showStats, library, background,
Math.max(0, Math.min(100, skyIntensity)), settingsKeycodes, settingsKeyPanel, wallpaperEnabled, wallpaper,
- wallpapers, rotationMinutes, wallpaperDim, wallpaperOrder, applied,
+ wallpapers, rotationMinutes, wallpaperDim, dockOpacity, wallpaperOrder, applied,
- festival, inputKeycodes, appKeys, json == null ? Collections.emptyList() : raceCalendar(json), cinematic, ambientGlow,
- Math.max(0, idleClockMinutes));
+ festival, inputKeycodes, appKeys, stockHomeRedirect, json == null ? Collections.emptyList() : raceCalendar(json), cinematic, ambientGlow,
+ Math.max(0, idleClockMinutes), keyFilter, dockGlass);
}
/**
diff --cc launcher/app/src/main/java/com/gathin/tvhome/DockDecoration.java
index ae1af7f1c,507b3a758..8d495fd0c
--- a/launcher/app/src/main/java/com/gathin/tvhome/DockDecoration.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/DockDecoration.java
@@@ -30,17 -24,16 +30,18 @@@ public class DockDecoration extends Rec
/**
* @param translucent the cinematic shelf's band: the artwork and the glow show through it.
* @param names the dock tiles show their names, so the band reaches down over them.
+ * @param opacity the plain band's opacity in percent (dock_opacity), so a wallpaper can show through it.
+ * @param lightGlass a light frosted band like the pills, for a sky or wallpaper behind it.
*/
- DockDecoration(int dockSize, float density, boolean translucent, boolean names, boolean lightGlass) {
- DockDecoration(int dockSize, float density, boolean translucent, boolean names, int opacity) {
++ DockDecoration(int dockSize, float density, boolean translucent, boolean names, int opacity, boolean lightGlass) {
this.dockSize = dockSize;
this.density = density;
this.namesRoom = names ? 22 * density : 0;
+ this.lightGlass = lightGlass;
- band.setColor(translucent ? 0x8C121014 : 0xFF141416);
+ band.setColor(translucent ? 0x8C121014 : (Math.round(opacity * 2.55f) << 24) | 0x141416);
edge.setStyle(Paint.Style.STROKE);
edge.setStrokeWidth(density);
- edge.setColor(translucent ? 0x26FFFFFF : 0x1FFFFFFF);
+ edge.setColor(lightGlass ? 0x38FFFFFF : translucent ? 0x26FFFFFF : 0x1FFFFFFF);
}
@Override
diff --cc launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
index ae16e2d80,910c5b2f7..98978678c
--- a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
@@@ -455,11 -431,12 +455,11 @@@ public class MainActivity extends Activ
public void onChildViewDetachedFromWindow(@NonNull View v) {
}
});
- if (dockRow) grid.addItemDecoration(new DockDecoration(COLUMNS, density, cinematic, cfg.alwaysShowNames, cfg.dockGlass));
- if (dockRow) grid.addItemDecoration(new DockDecoration(COLUMNS, density, cinematic, cfg.alwaysShowNames, cfg.dockOpacity));
- if (animations) {
- int enterAnim = reducedMotion ? R.anim.tile_enter_reduced : R.anim.tile_enter;
- float enterDelay = reducedMotion ? 0f : 0.06f;
++ if (dockRow) grid.addItemDecoration(new DockDecoration(COLUMNS, density, cinematic, cfg.alwaysShowNames, cfg.dockOpacity, cfg.dockGlass));
+ // Reduced motion: the tiles are simply there, with no entrance (reloadApps skips it there too).
+ if (animations && !reducedMotion) {
grid.setLayoutAnimation(new LayoutAnimationController(
- AnimationUtils.loadAnimation(this, enterAnim), enterDelay));
+ AnimationUtils.loadAnimation(this, R.anim.tile_enter), 0.06f));
}
adapter = new AppAdapter(this, this, COLUMNS, cfg);
dockApps = cfg.dockApps;