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
addons: Neon Dream, a neon screensaver and card with scene, colours and clock options (#2262)
SmartGenius2e12259d26929
diff --git a/addons/README.md b/addons/README.mdindex 405d28e37..c88aadef5 100644--- a/addons/README.md+++ b/addons/README.md@@ -42,6 +42,7 @@ the core bigger or change how it behaves. You install an add-on only if you want| [Game Day](game-day/) | Each team's next game on Home, counted down ("Puck drop in 2h 18m", then "Live now"), from calendar links you add: any team, any sport, no scores; one turn per team, rotating, with the theme's F1 weekend | [@justin-newman](https://github.com/justin-newman) | Hisense 75U75N (hengshan), Google TV 12 | `INTERNET` (your calendar links only) | <img src="game-day/screenshot.jpg" width="240" alt="Game Day on a TV"> || [Haunted](haunted/) | A Halloween screensaver (and a card that starts it): the theme's night photos crossfading, bats drifting across, a ghost floating up, a flickering jack-o'-lantern glow and a small clock, drawn on the TV with no network | CleanYourTV contributors | Not yet tested on a real TV | None | <img src="haunted/screenshot.jpg" width="240" alt="Haunted on a TV"> || [Lịch Vạn Niên](lich-van-nien/) | Vietnamese lunar almanac, offline: the tile says whether today is hoàng đạo (auspicious) or hắc đạo and lists the day's good hours; OK opens the lunar date, can chi, the day's star and trực, a 12-hour ring with the zodiac animals, and what the day suits or should avoid; Left/Right page through days | [@mevvmevvcodinggarg](https://github.com/mevvmevvcodinggarg) | Expressluck AiPro4K (sepolia), Android TV 14 | start at boot (re-enable today's tile) | <img src="lich-van-nien/screenshot.jpg" width="240" alt="Lịch Vạn Niên on a TV"> |+| [Neon Dream](neon-dream/) | A neon screensaver and a card: a city in the rain or a synthwave grid with a clock drifting over it; scene, colours (magenta, amber, green) and clock are set in its own screen, with a Preview and a shortcut to the screensaver menu | [@SmartGenius2](https://github.com/SmartGenius2) | Challenger R3 (Android TV 11) | None | <img src="neon-dream/screenshot.jpg" width="240" alt="Neon Dream on a TV"> |A widget, an info tile, a storage or smart-home card: if it can live as its own small app, it can livehere. See the rules below.diff --git a/addons/neon-dream/.gitignore b/addons/neon-dream/.gitignorenew file mode 100644index 000000000..a7e04a21b--- /dev/null+++ b/addons/neon-dream/.gitignore@@ -0,0 +1,4 @@+.gradle/+build/+app/build/+local.propertiesdiff --git a/addons/neon-dream/README.md b/addons/neon-dream/README.mdnew file mode 100644index 000000000..bfd792909--- /dev/null+++ b/addons/neon-dream/README.md@@ -0,0 +1,58 @@+# Neon Dream++A screensaver of a neon city in the rain, or a synthwave sun over a glowing grid, with the clock drifting over+it. It is drawn on the TV at about 30 frames a second, with no pictures or fonts to download.++On cleanyourtv's Home it is also a module card, **Neon Dream**: press OK to open its screen, where you set++- **Scene**: Rain city or Neon grid;+- **Colours**: Magenta, Amber or Green;+- **Clock**: On or Off;+- **Preview**: the screensaver at once with these options, Back to leave;+- **Choose screensaver…**: opens the TV's own screensaver menu, where you pick Neon Dream.++Changes apply the next time the screensaver starts. This began as a launcher feature+([#2262](https://github.com/Gathin23/cleanyourtv/pull/2262)) and moved here so the launcher stays untouched.++- Package: `io.github.smartgenius2.neondream`+- Author: [@SmartGenius2](https://github.com/SmartGenius2)+- Tested on: Challenger R3 (Android TV 11)++## Permissions++None. No network access (no `INTERNET` permission): nothing leaves the TV. No background service: it runs only+while the screensaver or the preview is showing. The options are stored in the app's own preferences.++## Build and install++JDK 17 and Android SDK 34, as for the launcher. From the repo root:++```bash+cd addons/neon-dream && ./gradlew assembleRelease && cd ../..+TV_HOST=<tv ip> tools/venv/bin/python -I tools/tv.py --push addons/neon-dream/app/build/outputs/apk/release/app-release.apk /data/local/tmp/addon.apk+TV_HOST=<tv ip> tools/venv/bin/python -I tools/tv.py 'pm install -r /data/local/tmp/addon.apk; rm -f /data/local/tmp/addon.apk'+```++Press Home: the launcher asks once whether to show the card.++## Use it as the screensaver++Open the card and choose **Choose screensaver…**, then pick **Neon Dream** (the menu's name depends on the TV), or:++```bash+TV_HOST=<tv ip> tools/venv/bin/python -I tools/tv.py 'settings put secure screensaver_components io.github.smartgenius2.neondream/.NeonDream'+```++To see it without waiting, start the screensaver now:++```bash+TV_HOST=<tv ip> tools/venv/bin/python -I tools/tv.py 'am start -n com.android.systemui/.Somnambulator'+```++## Remove++```bash+TV_HOST=<tv ip> tools/venv/bin/python -I tools/tv.py 'pm uninstall io.github.smartgenius2.neondream'+```++If it was the screensaver, pick another one in Settings.diff --git a/addons/neon-dream/app/build.gradle b/addons/neon-dream/app/build.gradlenew file mode 100644index 000000000..6f0aee46e--- /dev/null+++ b/addons/neon-dream/app/build.gradle@@ -0,0 +1,31 @@+plugins {+ id 'com.android.application'+}++android {+ namespace 'io.github.smartgenius2.neondream'+ compileSdk 34++ defaultConfig {+ applicationId 'io.github.smartgenius2.neondream'+ minSdk 26+ targetSdk 34+ versionCode 1+ versionName '1.0'+ }++ buildTypes {+ release {+ minifyEnabled true+ shrinkResources true+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt')+ // Sideloaded over ADB like the launcher: signed with the debug key.+ signingConfig signingConfigs.debug+ }+ }++ compileOptions {+ sourceCompatibility JavaVersion.VERSION_17+ targetCompatibility JavaVersion.VERSION_17+ }+}diff --git a/addons/neon-dream/app/src/main/AndroidManifest.xml b/addons/neon-dream/app/src/main/AndroidManifest.xmlnew file mode 100644index 000000000..a41454af4--- /dev/null+++ b/addons/neon-dream/app/src/main/AndroidManifest.xml@@ -0,0 +1,48 @@+<?xml version="1.0" encoding="utf-8"?>+<!-- No permissions: everything is drawn on the box, nothing goes over the network. -->+<manifest xmlns:android="http://schemas.android.com/apk/res/android">++ <uses-feature android:name="android.software.leanback" android:required="false" />+ <uses-feature android:name="android.hardware.touchscreen" android:required="false" />++ <application+ android:allowBackup="false"+ android:banner="@drawable/banner"+ android:icon="@drawable/icon"+ android:label="@string/app_name"+ android:supportsRtl="false">++ <!-- The tile, and the card on cleanyourtv's Home (docs/modules.md): the options, Preview, Choose screensaver. -->+ <activity+ android:name=".SettingsActivity"+ android:exported="true"+ android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen">+ <intent-filter>+ <action android:name="android.intent.action.MAIN" />+ <category android:name="android.intent.category.LEANBACK_LAUNCHER" />+ </intent-filter>+ <intent-filter>+ <action android:name="android.intent.action.MAIN" />+ <category android:name="com.gathin.tvhome.category.DOCK_CARD" />+ </intent-filter>+ <meta-data android:name="com.gathin.tvhome.card" android:resource="@xml/module_card" />+ </activity>++ <activity+ android:name=".PreviewActivity"+ android:exported="false"+ android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" />++ <!-- The screensaver: Settings > Device Preferences > Screen saver > Neon Dream. -->+ <service+ android:name=".NeonDream"+ android:exported="true"+ android:label="@string/app_name"+ android:permission="android.permission.BIND_DREAM_SERVICE">+ <intent-filter>+ <action android:name="android.service.dreams.DreamService" />+ <category android:name="android.intent.category.DEFAULT" />+ </intent-filter>+ </service>+ </application>+</manifest>diff --git a/addons/neon-dream/app/src/main/java/io/github/smartgenius2/neondream/NeonDream.java b/addons/neon-dream/app/src/main/java/io/github/smartgenius2/neondream/NeonDream.javanew file mode 100644index 000000000..56e94ac3a--- /dev/null+++ b/addons/neon-dream/app/src/main/java/io/github/smartgenius2/neondream/NeonDream.java@@ -0,0 +1,38 @@+package io.github.smartgenius2.neondream;++import android.service.dreams.DreamService;++/** The screensaver. Scene, colours and clock come from {@link Prefs}, set in this app's own screen. */+public class NeonDream extends DreamService {++ private NeonView view;++ @Override+ public void onAttachedToWindow() {+ super.onAttachedToWindow();+ setInteractive(false); // any key wakes the TV back to where it was+ setFullscreen(true);+ setScreenBright(false);+ Prefs prefs = new Prefs(this);+ view = new NeonView(this, prefs.scene(), prefs.palette(), prefs.clock());+ setContentView(view);+ }++ @Override+ public void onDreamingStarted() {+ super.onDreamingStarted();+ if (view != null) view.start();+ }++ @Override+ public void onDreamingStopped() {+ if (view != null) view.stop();+ super.onDreamingStopped();+ }++ @Override+ public void onDetachedFromWindow() {+ if (view != null) view.stop();+ super.onDetachedFromWindow();+ }+}diff --git a/addons/neon-dream/app/src/main/java/io/github/smartgenius2/neondream/NeonView.java b/addons/neon-dream/app/src/main/java/io/github/smartgenius2/neondream/NeonView.javanew file mode 100644index 000000000..8c699c071--- /dev/null+++ b/addons/neon-dream/app/src/main/java/io/github/smartgenius2/neondream/NeonView.java@@ -0,0 +1,354 @@+package io.github.smartgenius2.neondream;++import android.content.Context;+import android.graphics.Canvas;+import android.graphics.Color;+import android.graphics.LinearGradient;+import android.graphics.Paint;+import android.graphics.Path;+import android.graphics.PorterDuff;+import android.graphics.PorterDuffXfermode;+import android.graphics.RadialGradient;+import android.graphics.Shader;+import android.graphics.Typeface;+import android.view.View;++import java.text.DateFormat;+import java.util.ArrayList;+import java.util.Calendar;+import java.util.Locale;+import java.util.Random;++/**+ * The scene: a neon city in the rain or a synthwave grid, with the clock drifting over it.+ * One View, one onDraw, drawn on a plain canvas at 30 fps. No network and no images.+ */+final class NeonView extends View {++ private static final long FRAME_MS = 33L;+ /** Per palette: accent A, accent B, three sky stops. */+ private static final int[][] PALETTES = {+ {0xFFFF2A6D, 0xFF05D9E8, 0xFF14052B, 0xFF3A0A45, 0xFF7A1A5E}, // magenta+ {0xFFFFD400, 0xFFFF3C28, 0xFF1A0A02, 0xFF3D1305, 0xFF7A2A0A}, // amber+ {0xFF39FF88, 0xFF00C2B8, 0xFF021A12, 0xFF05352C, 0xFF0A5A4A} // green+ };++ private final boolean grid, clock;+ private final int colA, colB;+ private final int[] sky;+ private final Random rnd = new Random(7);+ private final Paint fill = new Paint(Paint.ANTI_ALIAS_FLAG);+ private final Paint line = new Paint(Paint.ANTI_ALIAS_FLAG);+ private final Paint text = new Paint(Paint.ANTI_ALIAS_FLAG);+ private final Paint additive = new Paint(Paint.ANTI_ALIAS_FLAG);+ private final Calendar calendar = Calendar.getInstance();+ private final DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.FULL);+ private final StringBuilder time = new StringBuilder(5);+ private final long startMs = System.currentTimeMillis();+ private final Path[] mountains = {new Path(), new Path()};+ private volatile boolean running;++ private int w, h;+ private Tower[] towers;+ private float[] dropX, dropY, dropLen, dropSpeed;+ private float[] starX, starY, starPhase;+ private LinearGradient skyShader, floorShader, gridGlowShader, sunShader;+ private RadialGradient vignette;+ private long lastFrame;++ private static final class Tower {+ float x, w, h;+ int layer;+ float[] winX, winY, winPhase;+ boolean[] winOn;+ boolean sign, signUsesA;+ float signY, signPhase;+ }++ private final Runnable frame = new Runnable() {+ @Override+ public void run() {+ if (!running) return;+ invalidate();+ postDelayed(this, FRAME_MS);+ }+ };++ NeonView(Context context, String scene, String palette, boolean showClock) {+ super(context);+ grid = isGrid(scene);+ clock = showClock;+ int p = paletteIndex(palette);+ colA = PALETTES[p][0];+ colB = PALETTES[p][1];+ sky = new int[] {PALETTES[p][2], PALETTES[p][3], PALETTES[p][4]};+ line.setStyle(Paint.Style.STROKE);+ text.setTypeface(Typeface.create("sans-serif-light", Typeface.NORMAL));+ additive.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.ADD));+ setBackgroundColor(Color.BLACK);+ }++ /** Index into PALETTES for a dream_palette value; anything unknown is magenta. */+ static int paletteIndex(String palette) {+ return "amber".equals(palette) ? 1 : "green".equals(palette) ? 2 : 0;+ }++ /** True for the synthwave grid; any other dream_scene value is the rain city. */+ static boolean isGrid(String scene) {+ return "neon_grid".equals(scene);+ }++ void start() {+ if (running) return;+ running = true;+ post(frame);+ }++ void stop() {+ running = false;+ removeCallbacks(frame);+ }++ @Override+ protected void onSizeChanged(int nw, int nh, int ow, int oh) {+ w = nw;+ h = nh;+ if (w == 0 || h == 0) return;+ skyShader = new LinearGradient(0, 0, 0, h, sky, new float[] {0f, .55f, 1f}, Shader.TileMode.CLAMP);+ float base = h * .92f;+ floorShader = new LinearGradient(0, base, 0, h, new int[] {withAlpha(colA, 90), 0xF2080414, 0xFF05030C},+ new float[] {0f, .4f, 1f}, Shader.TileMode.CLAMP);+ float hz = h * .46f;+ gridGlowShader = new LinearGradient(0, hz, 0, h, withAlpha(colA, 64), 0xFF05020C, Shader.TileMode.CLAMP);+ sunShader = new LinearGradient(0, hz - h * .3f, 0, hz, colA, colB, Shader.TileMode.CLAMP);+ vignette = new RadialGradient(w / 2f, h / 2f, h * .95f, new int[] {0x00000000, 0x00000000, 0x8C000000},+ new float[] {0f, .47f, 1f}, Shader.TileMode.CLAMP);+ float[][] m = {{.08f, .22f, .3f}, {.7f, .25f, .92f}};+ for (int i = 0; i < m.length; i++) {+ Path path = mountains[i];+ path.reset();+ path.moveTo(w * m[i][0], hz);+ path.lineTo(w * m[i][2] * .5f + w * m[i][0] * .5f, hz - h * m[i][1]);+ path.lineTo(w * m[i][2], hz);+ path.close();+ }+ buildCity();+ }++ private float rand(float a, float b) {+ return a + rnd.nextFloat() * (b - a);+ }++ private void buildCity() {+ float[][] layers = {{.05f, .09f, .25f, .5f}, {.06f, .11f, .3f, .65f}, {.07f, .13f, .4f, .8f}};+ ArrayList<Tower> list = new ArrayList<>();+ for (int z = 0; z < 3; z++) {+ float x = -w * .05f;+ while (x < w * 1.05f) {+ Tower t = new Tower();+ t.w = rand(layers[z][0], layers[z][1]) * w;+ t.h = rand(layers[z][2], layers[z][3]) * h;+ t.x = x;+ t.layer = z;+ int n = 28;+ t.winX = new float[n];+ t.winY = new float[n];+ t.winPhase = new float[n];+ t.winOn = new boolean[n];+ for (int i = 0; i < n; i++) {+ t.winX[i] = rnd.nextFloat();+ t.winY[i] = rnd.nextFloat();+ t.winPhase[i] = rnd.nextFloat() * 9f;+ t.winOn[i] = rnd.nextFloat() < .35f;+ }+ if (rnd.nextFloat() < .22f) {+ t.sign = true;+ t.signUsesA = rnd.nextBoolean();+ t.signY = rand(.15f, .7f);+ t.signPhase = rnd.nextFloat() * 9f;+ }+ list.add(t);+ x += t.w * rand(.85f, 1.02f);+ }+ }+ towers = list.toArray(new Tower[0]);+ int d = 220;+ dropX = new float[d]; dropY = new float[d]; dropLen = new float[d]; dropSpeed = new float[d];+ for (int i = 0; i < d; i++) {+ dropX[i] = rnd.nextFloat() * w;+ dropY[i] = rnd.nextFloat() * h;+ dropLen[i] = rand(.02f, .06f) * h;+ dropSpeed[i] = rand(.7f, 1.4f) * h;+ }+ int s = 60;+ starX = new float[s]; starY = new float[s]; starPhase = new float[s];+ for (int i = 0; i < s; i++) {+ starX[i] = rnd.nextFloat() * w;+ starY[i] = rnd.nextFloat() * h * .4f;+ starPhase[i] = rnd.nextFloat() * 9f;+ }+ }++ private static int withAlpha(int color, int alpha) {+ return (color & 0x00FFFFFF) | (alpha << 24);+ }++ @Override+ protected void onDraw(Canvas c) {+ if (w == 0 || h == 0 || towers == null) return;+ long now = System.currentTimeMillis();+ float dt = lastFrame == 0 ? FRAME_MS / 1000f : Math.min((now - lastFrame) / 1000f, .1f);+ lastFrame = now;+ float t = now - startMs;+ if (grid) drawGrid(c, t); else drawCity(c, t, dt);+ fill.setShader(vignette);+ c.drawRect(0, 0, w, h, fill);+ fill.setShader(null);+ if (clock) drawClock(c, now - startMs, now);+ }++ private void drawCity(Canvas c, float t, float dt) {+ fill.setShader(skyShader);+ c.drawRect(0, 0, w, h, fill);+ fill.setShader(null);+ for (int i = 0; i < starX.length; i++) {+ fill.setColor(Color.argb((int) (255 * (.25f + .25f * Math.sin(t / 700f + starPhase[i]))), 255, 255, 255));+ c.drawRect(starX[i], starY[i], starX[i] + 2, starY[i] + 2, fill);+ }+ float base = h * .92f, span = w * 1.1f;+ for (Tower b : towers) {+ float shade = b.layer == 0 ? .35f : b.layer == 1 ? .6f : 1f;+ float speed = b.layer == 0 ? 1.2f : b.layer == 1 ? 2.4f : 4f;+ float x = (((b.x - t / 1000f * speed) % span) + span) % span - w * .05f;+ float top = base - b.h;+ fill.setColor(Color.rgb((int) (10 * shade + 4), (int) (6 * shade + 3), (int) (22 * shade + 8)));+ c.drawRect(x, top, x + b.w, base, fill);+ fill.setColor(withAlpha(b.layer == 2 ? colB : colA, 25 + 20 * b.layer));+ c.drawRect(x, top, x + b.w, top + 2, fill);+ for (int i = 0; i < b.winX.length; i++) {+ if (!b.winOn[i]) continue;+ if (.5f + .5f * Math.sin(t / 2500f + b.winPhase[i]) <= .15f) continue;+ float cx = x + (b.winX[i] * .8f + .1f) * b.w, cy = top + (b.winY[i] * .85f + .08f) * b.h;+ fill.setColor(withAlpha(i % 3 != 0 ? colB : colA, 90 + 30 * b.layer));+ c.drawRect(cx, cy, cx + h * .012f, cy + h * .018f, fill);+ }+ if (b.sign) {+ float flick = .75f + .25f * (float) Math.sin(t / 130f + b.signPhase)+ * (Math.sin(t / 1900f + b.signPhase) > .8 ? 1f : .2f);+ int col = b.signUsesA ? colA : colB;+ float sx = x + b.w * .12f, sy = top + b.h * b.signY, sw = b.w * .08f, sh = b.h * .2f;+ fill.setColor(withAlpha(col, (int) (50 * flick)));+ c.drawRect(sx - sw, sy - sw, sx + sw * 2f, sy + sh + sw, fill); // halo+ fill.setColor(withAlpha(col, (int) (255 * flick)));+ c.drawRect(sx, sy, sx + sw, sy + sh, fill);+ }+ }+ fill.setShader(floorShader);+ c.drawRect(0, base, w, h, fill);+ fill.setShader(null);+ for (int k = 0; k < 6; k++) {+ fill.setColor(withAlpha(k % 2 != 0 ? colB : colA, 20));+ float rx = (k * .19f + .05f) * w + (float) Math.sin(t / 4000f + k) * 14f;+ c.drawRect(rx, base, rx + w * .02f, h, fill);+ }+ line.setStrokeWidth(2f);+ line.setColor(0x59BED2FF);+ float slant = .18f;+ for (int i = 0; i < dropX.length; i++) {+ dropY[i] += dropSpeed[i] * dt;+ dropX[i] -= dropSpeed[i] * dt * slant;+ if (dropY[i] > h) {+ dropY[i] = -dropLen[i];+ dropX[i] = rnd.nextFloat() * w * 1.2f;+ }+ c.drawLine(dropX[i], dropY[i], dropX[i] + dropLen[i] * slant, dropY[i] - dropLen[i], line);+ }+ long phase = (long) (t / 260f);+ float ph = (t / 260f) % 1f;+ fill.setColor(Color.argb((int) (90 * (1f - ph)), 190, 210, 255));+ for (int q = 0; q < 14; q++) {+ float px = (float) (Math.sin(q * 91.7 + phase * 1.3) * .5 + .5) * w;+ float py = base + (h - base) * (.2f + ((q * 37) % 70) / 100f);+ c.drawRect(px - ph * 14f, py, px + ph * 14f, py + 2, fill);+ }+ }++ private void drawGrid(Canvas c, float t) {+ float hz = h * .46f;+ fill.setColor(0xFF05020C);+ c.drawRect(0, 0, w, h, fill);+ c.save();+ c.clipRect(0, hz - h * .3f, w, hz);+ fill.setShader(sunShader);+ c.drawCircle(w / 2f, hz, h * .26f, fill);+ fill.setShader(null);+ fill.setColor(0xFF05020C);+ for (int i = 0; i < 7; i++) {+ float y = hz - h * .24f + i * i * h * .006f + i * h * .02f;+ c.drawRect(0, y, w, y + h * (.004f + i * .0035f), fill);+ }+ c.restore();+ fill.setShader(gridGlowShader);+ c.drawRect(0, hz, w, h, fill);+ fill.setShader(null);+ line.setStrokeWidth(3f);+ line.setColor(withAlpha(colB, 190));+ for (int v = -24; v <= 24; v++) c.drawLine(w / 2f + v * w * .012f, hz, w / 2f + v * w * .13f, h, line);+ float sp = (t / 2200f) % 1f;+ for (int i = 0; i < 14; i++) {+ float u = (i + sp) / 14f, y = hz + (h - hz) * u * u;+ c.drawLine(0, y, w, y, line);+ }+ fill.setColor(0xFF05020C);+ c.drawRect(0, hz - 2, w, hz + 2, fill);+ fill.setColor(withAlpha(colB, 230));+ c.drawRect(0, hz - 2, w, hz + 2, fill);+ line.setStrokeWidth(4f);+ line.setColor(withAlpha(colA, 230));+ fill.setColor(0xFF0B0420);+ for (Path path : mountains) {+ c.drawPath(path, fill);+ c.drawPath(path, line);+ }+ fill.setColor(0x2E000000);+ for (float y = 0; y < h; y += 4f) c.drawRect(0, y, w, y + 1f, fill);+ }++ private void drawClock(Canvas c, float t, long now) {+ calendar.setTimeInMillis(now);+ time.setLength(0);+ int hour = calendar.get(Calendar.HOUR_OF_DAY), min = calendar.get(Calendar.MINUTE);+ if (hour < 10) time.append('0');+ time.append(hour).append(((int) (t / 1000f) % 2 == 0) ? ':' : ' ');+ if (min < 10) time.append('0');+ time.append(min);+ long minute = now / 60000L;+ double s1 = Math.sin(minute * 12.9898) * 43758.5453, s2 = Math.sin(minute * 78.233) * 12345.6789;+ float px = (float) (.1 + .45 * (s1 - Math.floor(s1))), py = (float) (.12 + .38 * (s2 - Math.floor(s2)));+ float size = h * .2f, x = px * w, y = py * h + size;+ boolean glitch = ((int) (t / 100f)) % 37 == 0;+ float off = glitch ? 4f + rnd.nextFloat() * 8f : 1.5f;+ text.setTextSize(size);+ text.setShadowLayer(0, 0, 0, 0);+ additive.setTextSize(size);+ additive.setTypeface(text.getTypeface());+ additive.setColor(withAlpha(colA, 200));+ c.drawText(time, 0, time.length(), x - off, y, additive);+ additive.setColor(withAlpha(colB, 200));+ c.drawText(time, 0, time.length(), x + off, y, additive);+ text.setColor(0xFFF4F0FF);+ text.setShadowLayer(h * .025f, 0, 0, colB);+ c.drawText(time, 0, time.length(), x, y, text);+ text.setShadowLayer(0, 0, 0, 0);+ text.setTextSize(h * .028f);+ text.setLetterSpacing(.12f);+ text.setColor(withAlpha(colB, 230));+ c.drawText(dateFormat.format(calendar.getTime()).toUpperCase(Locale.getDefault()), x + 4f, y + h * .05f, text);+ text.setLetterSpacing(0f);+ if (glitch) {+ fill.setColor(withAlpha(colA, 130));+ float gy = y - size * (.2f + rnd.nextFloat() * .6f);+ c.drawRect(x, gy, x + size * 2.6f, gy + 3f + rnd.nextFloat() * 4f, fill);+ }+ }+}diff --git a/addons/neon-dream/app/src/main/java/io/github/smartgenius2/neondream/Prefs.java b/addons/neon-dream/app/src/main/java/io/github/smartgenius2/neondream/Prefs.javanew file mode 100644index 000000000..50ab00ffa--- /dev/null+++ b/addons/neon-dream/app/src/main/java/io/github/smartgenius2/neondream/Prefs.java@@ -0,0 +1,42 @@+package io.github.smartgenius2.neondream;++import android.content.Context;+import android.content.SharedPreferences;++/** The three options, kept in this app's own preferences. */+final class Prefs {++ private final SharedPreferences sp;++ Prefs(Context context) {+ sp = context.getSharedPreferences("neon_dream", Context.MODE_PRIVATE);+ }++ /** "rain_city" or "neon_grid". */+ String scene() {+ return "neon_grid".equals(sp.getString("scene", "")) ? "neon_grid" : "rain_city";+ }++ /** "magenta", "amber" or "green". */+ String palette() {+ String p = sp.getString("palette", "magenta");+ return "amber".equals(p) || "green".equals(p) ? p : "magenta";+ }++ boolean clock() {+ return sp.getBoolean("clock", true);+ }++ void cycleScene() {+ sp.edit().putString("scene", "rain_city".equals(scene()) ? "neon_grid" : "rain_city").apply();+ }++ void cyclePalette() {+ String p = palette();+ sp.edit().putString("palette", "magenta".equals(p) ? "amber" : "amber".equals(p) ? "green" : "magenta").apply();+ }++ void toggleClock() {+ sp.edit().putBoolean("clock", !clock()).apply();+ }+}diff --git a/addons/neon-dream/app/src/main/java/io/github/smartgenius2/neondream/PreviewActivity.java b/addons/neon-dream/app/src/main/java/io/github/smartgenius2/neondream/PreviewActivity.javanew file mode 100644index 000000000..219e8f89c--- /dev/null+++ b/addons/neon-dream/app/src/main/java/io/github/smartgenius2/neondream/PreviewActivity.java@@ -0,0 +1,32 @@+package io.github.smartgenius2.neondream;++import android.app.Activity;+import android.os.Bundle;+import android.view.WindowManager;++/** Shows the screensaver with the saved options until Back. */+public class PreviewActivity extends Activity {++ private NeonView view;++ @Override+ protected void onCreate(Bundle state) {+ super.onCreate(state);+ getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);+ Prefs prefs = new Prefs(this);+ view = new NeonView(this, prefs.scene(), prefs.palette(), prefs.clock());+ setContentView(view);+ }++ @Override+ protected void onResume() {+ super.onResume();+ view.start();+ }++ @Override+ protected void onPause() {+ view.stop();+ super.onPause();+ }+}diff --git a/addons/neon-dream/app/src/main/java/io/github/smartgenius2/neondream/SettingsActivity.java b/addons/neon-dream/app/src/main/java/io/github/smartgenius2/neondream/SettingsActivity.javanew file mode 100644index 000000000..8445cf98b--- /dev/null+++ b/addons/neon-dream/app/src/main/java/io/github/smartgenius2/neondream/SettingsActivity.java@@ -0,0 +1,100 @@+package io.github.smartgenius2.neondream;++import android.app.Activity;+import android.content.ActivityNotFoundException;+import android.content.Intent;+import android.graphics.Color;+import android.graphics.Typeface;+import android.os.Bundle;+import android.provider.Settings;+import android.view.Gravity;+import android.view.View;+import android.widget.Button;+import android.widget.LinearLayout;+import android.widget.TextView;++/** The tile and the card: the options (scene, colours, clock), Preview, and a way to pick the screensaver. */+public class SettingsActivity extends Activity {++ private Prefs prefs;+ private Button scene, palette, clock;++ @Override+ protected void onCreate(Bundle state) {+ super.onCreate(state);+ prefs = new Prefs(this);+ float dp = getResources().getDisplayMetrics().density;+ int pad = (int) (dp * 48);++ LinearLayout root = new LinearLayout(this);+ root.setOrientation(LinearLayout.VERTICAL);+ root.setGravity(Gravity.CENTER_VERTICAL);+ root.setPadding(pad * 2, pad, pad * 2, pad);+ root.setBackgroundColor(0xFF0B0420);++ TextView title = new TextView(this);+ title.setText(R.string.app_name);+ title.setTextColor(0xFFFF2A6D);+ title.setTextSize(34);+ title.setTypeface(Typeface.create("sans-serif-light", Typeface.NORMAL));+ title.setPadding(0, 0, 0, pad / 2);+ root.addView(title);++ scene = row(root, v -> { prefs.cycleScene(); refresh(); });+ palette = row(root, v -> { prefs.cyclePalette(); refresh(); });+ clock = row(root, v -> { prefs.toggleClock(); refresh(); });+ Button preview = row(root, v -> startActivity(new Intent(this, PreviewActivity.class)));+ preview.setText(R.string.preview);+ Button choose = row(root, v -> chooseScreensaver());+ choose.setText(R.string.choose);++ TextView hint = new TextView(this);+ hint.setText(R.string.hint);+ hint.setTextColor(0xFF9A8FB8);+ hint.setTextSize(16);+ hint.setPadding(0, pad / 2, 0, 0);+ root.addView(hint);++ setContentView(root);+ scene.requestFocus();+ refresh();+ }++ private Button row(LinearLayout root, View.OnClickListener l) {+ float dp = getResources().getDisplayMetrics().density;+ Button b = new Button(this);+ b.setAllCaps(false);+ b.setTextSize(22);+ b.setGravity(Gravity.START | Gravity.CENTER_VERTICAL);+ b.setTextColor(Color.WHITE);+ b.setBackgroundResource(R.drawable.row);+ b.setOnClickListener(l);+ LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams((int) (dp * 520),+ LinearLayout.LayoutParams.WRAP_CONTENT);+ lp.bottomMargin = (int) (dp * 8);+ root.addView(b, lp);+ return b;+ }++ private void refresh() {+ scene.setText(getString(R.string.scene, getString("neon_grid".equals(prefs.scene())+ ? R.string.scene_grid : R.string.scene_city)));+ String p = prefs.palette();+ palette.setText(getString(R.string.palette, getString("amber".equals(p) ? R.string.amber+ : "green".equals(p) ? R.string.green : R.string.magenta)));+ clock.setText(getString(R.string.clock, getString(prefs.clock() ? R.string.on : R.string.off)));+ }++ /** Opens the TV's screensaver picker; the menu lives in a different place on different TVs. */+ private void chooseScreensaver() {+ String[] actions = {Settings.ACTION_DREAM_SETTINGS, Settings.ACTION_DISPLAY_SETTINGS, Settings.ACTION_SETTINGS};+ for (String a : actions) {+ try {+ startActivity(new Intent(a));+ return;+ } catch (ActivityNotFoundException | SecurityException ignored) {+ // try the next one+ }+ }+ }+}diff --git a/addons/neon-dream/app/src/main/res/drawable/banner.xml b/addons/neon-dream/app/src/main/res/drawable/banner.xmlnew file mode 100644index 000000000..2c72b2e32--- /dev/null+++ b/addons/neon-dream/app/src/main/res/drawable/banner.xml@@ -0,0 +1,14 @@+<?xml version="1.0" encoding="utf-8"?>+<!-- The TV banner: a synthwave sun over a grid. Drawn for this add-on. -->+<vector xmlns:android="http://schemas.android.com/apk/res/android"+ android:width="320dp" android:height="180dp"+ android:viewportWidth="320" android:viewportHeight="180">+ <path android:fillColor="#FF14052B" android:pathData="M0,0h320v180h-320z" />+ <path android:fillColor="#FFFF2A6D" android:pathData="M120,90a40,40 0 0 1 80,0z" />+ <path android:fillColor="#FF05D9E8" android:pathData="M0,90h320v3h-320z" />+ <path android:fillColor="#9905D9E8" android:pathData="M0,110h320v2h-320z" />+ <path android:fillColor="#9905D9E8" android:pathData="M0,132h320v2h-320z" />+ <path android:fillColor="#9905D9E8" android:pathData="M0,160h320v2h-320z" />+ <path android:fillColor="#9905D9E8" android:pathData="M158,93h4l30,87h-6z" />+ <path android:fillColor="#9905D9E8" android:pathData="M158,93h4l-30,87h-6z" />+</vector>diff --git a/addons/neon-dream/app/src/main/res/drawable/icon.xml b/addons/neon-dream/app/src/main/res/drawable/icon.xmlnew file mode 100644index 000000000..66d4367b1--- /dev/null+++ b/addons/neon-dream/app/src/main/res/drawable/icon.xml@@ -0,0 +1,11 @@+<?xml version="1.0" encoding="utf-8"?>+<!-- The app icon: the banner's sun and horizon, square. -->+<vector xmlns:android="http://schemas.android.com/apk/res/android"+ android:width="48dp" android:height="48dp"+ android:viewportWidth="108" android:viewportHeight="108">+ <path android:fillColor="#FF14052B" android:pathData="M0,0h108v108h-108z" />+ <path android:fillColor="#FFFF2A6D" android:pathData="M30,60a24,24 0 0 1 48,0z" />+ <path android:fillColor="#FF05D9E8" android:pathData="M0,60h108v3h-108z" />+ <path android:fillColor="#9905D9E8" android:pathData="M0,76h108v2h-108z" />+ <path android:fillColor="#9905D9E8" android:pathData="M0,92h108v2h-108z" />+</vector>diff --git a/addons/neon-dream/app/src/main/res/drawable/row.xml b/addons/neon-dream/app/src/main/res/drawable/row.xmlnew file mode 100644index 000000000..f4f530be4--- /dev/null+++ b/addons/neon-dream/app/src/main/res/drawable/row.xml@@ -0,0 +1,19 @@+<?xml version="1.0" encoding="utf-8"?>+<!-- A row of the settings screen: dim, with a neon outline while focused. -->+<selector xmlns:android="http://schemas.android.com/apk/res/android">+ <item android:state_focused="true">+ <shape>+ <solid android:color="#552A1050" />+ <stroke android:width="3dp" android:color="#FFFF2A6D" />+ <corners android:radius="6dp" />+ <padding android:left="20dp" android:right="20dp" />+ </shape>+ </item>+ <item>+ <shape>+ <solid android:color="#33200A40" />+ <corners android:radius="6dp" />+ <padding android:left="20dp" android:right="20dp" />+ </shape>+ </item>+</selector>diff --git a/addons/neon-dream/app/src/main/res/values/strings.xml b/addons/neon-dream/app/src/main/res/values/strings.xmlnew file mode 100644index 000000000..016c2cea2--- /dev/null+++ b/addons/neon-dream/app/src/main/res/values/strings.xml@@ -0,0 +1,17 @@+<?xml version="1.0" encoding="utf-8"?>+<resources>+ <string name="app_name">Neon Dream</string>+ <string name="scene">Scene: %1$s</string>+ <string name="scene_city">Rain city</string>+ <string name="scene_grid">Neon grid</string>+ <string name="palette">Colours: %1$s</string>+ <string name="magenta">Magenta</string>+ <string name="amber">Amber</string>+ <string name="green">Green</string>+ <string name="clock">Clock: %1$s</string>+ <string name="on">On</string>+ <string name="off">Off</string>+ <string name="preview">Preview (Back to leave)</string>+ <string name="choose">Choose screensaver…</string>+ <string name="hint">Pick Neon Dream in the screensaver menu. Changes apply the next time it starts.</string>+</resources>diff --git a/addons/neon-dream/app/src/main/res/xml/module_card.xml b/addons/neon-dream/app/src/main/res/xml/module_card.xmlnew file mode 100644index 000000000..bf75c2826--- /dev/null+++ b/addons/neon-dream/app/src/main/res/xml/module_card.xml@@ -0,0 +1,2 @@+<?xml version="1.0" encoding="utf-8"?>+<card spec="1" label="Neon Dream" caption="Neon screensaver" accent="#FF2A6D" />diff --git a/addons/neon-dream/build.gradle b/addons/neon-dream/build.gradlenew file mode 100644index 000000000..48978475f--- /dev/null+++ b/addons/neon-dream/build.gradle@@ -0,0 +1,3 @@+plugins {+ id 'com.android.application' version '8.5.2' apply false+}diff --git a/addons/neon-dream/gradle.properties b/addons/neon-dream/gradle.propertiesnew file mode 100644index 000000000..1edaf2baa--- /dev/null+++ b/addons/neon-dream/gradle.properties@@ -0,0 +1 @@+org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8diff --git a/addons/neon-dream/gradle/wrapper/gradle-wrapper.jar b/addons/neon-dream/gradle/wrapper/gradle-wrapper.jarnew file mode 100644index 000000000..2c3521197Binary files /dev/null and b/addons/neon-dream/gradle/wrapper/gradle-wrapper.jar differdiff --git a/addons/neon-dream/gradle/wrapper/gradle-wrapper.properties b/addons/neon-dream/gradle/wrapper/gradle-wrapper.propertiesnew file mode 100644index 000000000..77f5d0ba6--- /dev/null+++ b/addons/neon-dream/gradle/wrapper/gradle-wrapper.properties@@ -0,0 +1,8 @@+distributionBase=GRADLE_USER_HOME+distributionPath=wrapper/dists+distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip+distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab+networkTimeout=10000+validateDistributionUrl=true+zipStoreBase=GRADLE_USER_HOME+zipStorePath=wrapper/distsdiff --git a/addons/neon-dream/gradlew b/addons/neon-dream/gradlewnew file mode 100644index 000000000..f5feea6d6--- /dev/null+++ b/addons/neon-dream/gradlew@@ -0,0 +1,252 @@+#!/bin/sh++#+# Copyright © 2015-2021 the original authors.+#+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# https://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.+#+# SPDX-License-Identifier: Apache-2.0+#++##############################################################################+#+# Gradle start up script for POSIX generated by Gradle.+#+# Important for running:+#+# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is+# noncompliant, but you have some other compliant shell such as ksh or+# bash, then to run this script, type that shell name before the whole+# command line, like:+#+# ksh Gradle+#+# Busybox and similar reduced shells will NOT work, because this script+# requires all of these POSIX shell features:+# * functions;+# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,+# «${var#prefix}», «${var%suffix}», and «$( cmd )»;+# * compound commands having a testable exit status, especially «case»;+# * various built-in commands including «command», «set», and «ulimit».+#+# Important for patching:+#+# (2) This script targets any POSIX shell, so it avoids extensions provided+# by Bash, Ksh, etc; in particular arrays are avoided.+#+# The "traditional" practice of packing multiple parameters into a+# space-separated string is a well documented source of bugs and security+# problems, so this is (mostly) avoided, by progressively accumulating+# options in "$@", and eventually passing that to Java.+#+# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,+# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;+# see the in-line comments for details.+#+# There are tweaks for specific operating systems such as AIX, CygWin,+# Darwin, MinGW, and NonStop.+#+# (3) This script is generated from the Groovy template+# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt+# within the Gradle project.+#+# You can find Gradle at https://github.com/gradle/gradle/.+#+##############################################################################++# Attempt to set APP_HOME++# Resolve links: $0 may be a link+app_path=$0++# Need this for daisy-chained symlinks.+while+ APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path+ [ -h "$app_path" ]+do+ ls=$( ls -ld "$app_path" )+ link=${ls#*' -> '}+ case $link in #(+ /*) app_path=$link ;; #(+ *) app_path=$APP_HOME$link ;;+ esac+done++# This is normally unused+# shellcheck disable=SC2034+APP_BASE_NAME=${0##*/}+# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)+APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s+' "$PWD" ) || exit++# Use the maximum available, or set MAX_FD != -1 to use that value.+MAX_FD=maximum++warn () {+ echo "$*"+} >&2++die () {+ echo+ echo "$*"+ echo+ exit 1+} >&2++# OS specific support (must be 'true' or 'false').+cygwin=false+msys=false+darwin=false+nonstop=false+case "$( uname )" in #(+ CYGWIN* ) cygwin=true ;; #(+ Darwin* ) darwin=true ;; #(+ MSYS* | MINGW* ) msys=true ;; #(+ NONSTOP* ) nonstop=true ;;+esac++CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar+++# Determine the Java command to use to start the JVM.+if [ -n "$JAVA_HOME" ] ; then+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then+ # IBM's JDK on AIX uses strange locations for the executables+ JAVACMD=$JAVA_HOME/jre/sh/java+ else+ JAVACMD=$JAVA_HOME/bin/java+ fi+ if [ ! -x "$JAVACMD" ] ; then+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME++Please set the JAVA_HOME variable in your environment to match the+location of your Java installation."+ fi+else+ JAVACMD=java+ if ! command -v java >/dev/null 2>&1+ then+ die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.++Please set the JAVA_HOME variable in your environment to match the+location of your Java installation."+ fi+fi++# Increase the maximum file descriptors if we can.+if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then+ case $MAX_FD in #(+ max*)+ # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.+ # shellcheck disable=SC2039,SC3045+ MAX_FD=$( ulimit -H -n ) ||+ warn "Could not query maximum file descriptor limit"+ esac+ case $MAX_FD in #(+ '' | soft) :;; #(+ *)+ # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.+ # shellcheck disable=SC2039,SC3045+ ulimit -n "$MAX_FD" ||+ warn "Could not set maximum file descriptor limit to $MAX_FD"+ esac+fi++# Collect all arguments for the java command, stacking in reverse order:+# * args from the command line+# * the main class name+# * -classpath+# * -D...appname settings+# * --module-path (only if needed)+# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.++# For Cygwin or MSYS, switch paths to Windows format before running java+if "$cygwin" || "$msys" ; then+ APP_HOME=$( cygpath --path --mixed "$APP_HOME" )+ CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )++ JAVACMD=$( cygpath --unix "$JAVACMD" )++ # Now convert the arguments - kludge to limit ourselves to /bin/sh+ for arg do+ if+ case $arg in #(+ -*) false ;; # don't mess with options #(+ /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath+ [ -e "$t" ] ;; #(+ *) false ;;+ esac+ then+ arg=$( cygpath --path --ignore --mixed "$arg" )+ fi+ # Roll the args list around exactly as many times as the number of+ # args, so each arg winds up back in the position where it started, but+ # possibly modified.+ #+ # NB: a `for` loop captures its iteration list before it begins, so+ # changing the positional parameters here affects neither the number of+ # iterations, nor the values presented in `arg`.+ shift # remove old arg+ set -- "$@" "$arg" # push replacement arg+ done+fi+++# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'++# Collect all arguments for the java command:+# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,+# and any embedded shellness will be escaped.+# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be+# treated as '${Hostname}' itself on the command line.++set -- \+ "-Dorg.gradle.appname=$APP_BASE_NAME" \+ -classpath "$CLASSPATH" \+ org.gradle.wrapper.GradleWrapperMain \+ "$@"++# Stop when "xargs" is not available.+if ! command -v xargs >/dev/null 2>&1+then+ die "xargs is not available"+fi++# Use "xargs" to parse quoted args.+#+# With -n1 it outputs one arg per line, with the quotes and backslashes removed.+#+# In Bash we could simply go:+#+# readarray ARGS < <( xargs -n1 <<<"$var" ) &&+# set -- "${ARGS[@]}" "$@"+#+# but POSIX shell has neither arrays nor command substitution, so instead we+# post-process each arg (as a line of input to sed) to backslash-escape any+# character that might be a shell metacharacter, then use eval to reverse+# that process (while maintaining the separation between arguments), and wrap+# the whole thing up as a single "set" statement.+#+# This will of course break if any of these variables contains a newline or+# an unmatched quote.+#++eval "set -- $(+ printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |+ xargs -n1 |+ sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |+ tr '\n' ' '+ )" '"$@"'++exec "$JAVACMD" "$@"diff --git a/addons/neon-dream/gradlew.bat b/addons/neon-dream/gradlew.batnew file mode 100644index 000000000..9d21a2183--- /dev/null+++ b/addons/neon-dream/gradlew.bat@@ -0,0 +1,94 @@+@rem+@rem Copyright 2015 the original author or authors.+@rem+@rem Licensed under the Apache License, Version 2.0 (the "License");+@rem you may not use this file except in compliance with the License.+@rem You may obtain a copy of the License at+@rem+@rem https://www.apache.org/licenses/LICENSE-2.0+@rem+@rem Unless required by applicable law or agreed to in writing, software+@rem distributed under the License is distributed on an "AS IS" BASIS,+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+@rem See the License for the specific language governing permissions and+@rem limitations under the License.+@rem+@rem SPDX-License-Identifier: Apache-2.0+@rem++@if "%DEBUG%"=="" @echo off+@rem ##########################################################################+@rem+@rem Gradle startup script for Windows+@rem+@rem ##########################################################################++@rem Set local scope for the variables with windows NT shell+if "%OS%"=="Windows_NT" setlocal++set DIRNAME=%~dp0+if "%DIRNAME%"=="" set DIRNAME=.+@rem This is normally unused+set APP_BASE_NAME=%~n0+set APP_HOME=%DIRNAME%++@rem Resolve any "." and ".." in APP_HOME to make it shorter.+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi++@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"++@rem Find java.exe+if defined JAVA_HOME goto findJavaFromJavaHome++set JAVA_EXE=java.exe+%JAVA_EXE% -version >NUL 2>&1+if %ERRORLEVEL% equ 0 goto execute++echo. 1>&2+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2+echo. 1>&2+echo Please set the JAVA_HOME variable in your environment to match the 1>&2+echo location of your Java installation. 1>&2++goto fail++:findJavaFromJavaHome+set JAVA_HOME=%JAVA_HOME:"=%+set JAVA_EXE=%JAVA_HOME%/bin/java.exe++if exist "%JAVA_EXE%" goto execute++echo. 1>&2+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2+echo. 1>&2+echo Please set the JAVA_HOME variable in your environment to match the 1>&2+echo location of your Java installation. 1>&2++goto fail++:execute+@rem Setup the command line++set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar+++@rem Execute Gradle+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*++:end+@rem End local scope for the variables with windows NT shell+if %ERRORLEVEL% equ 0 goto mainEnd++:fail+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of+rem the _cmd.exe /c_ return code!+set EXIT_CODE=%ERRORLEVEL%+if %EXIT_CODE% equ 0 set EXIT_CODE=1+if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%+exit /b %EXIT_CODE%++:mainEnd+if "%OS%"=="Windows_NT" endlocal++:omegadiff --git a/addons/neon-dream/screenshot.jpg b/addons/neon-dream/screenshot.jpgnew file mode 100644index 000000000..5ff56b8b1Binary files /dev/null and b/addons/neon-dream/screenshot.jpg differdiff --git a/addons/neon-dream/settings.gradle b/addons/neon-dream/settings.gradlenew file mode 100644index 000000000..7a70324bc--- /dev/null+++ b/addons/neon-dream/settings.gradle@@ -0,0 +1,16 @@+pluginManagement {+ repositories {+ google()+ mavenCentral()+ gradlePluginPortal()+ }+}+dependencyResolutionManagement {+ repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)+ repositories {+ google()+ mavenCentral()+ }+}+rootProject.name = "neon-dream"+include ':app'