From 930c29e9e0f6894488c206e4242f2cfc69039900 Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Sun, 27 Sep 2026 08:36:57 -0400 Subject: [PATCH] [Feat] (Android): the render server screen takes intent extras for prefill and autostart listen/token/env/onscreen prefill the form, --ez start true starts the server, --ez stop true stops it - adb drives the screen without the IME, which is how the on-screen unix path (@name + shm, ServerOwned window) was verified end to end from the UI. --- .../mobilegl/plugin/ServerControlActivity.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/android-plugin/app/src/trace/java/top/mobilegl/plugin/ServerControlActivity.java b/android-plugin/app/src/trace/java/top/mobilegl/plugin/ServerControlActivity.java index c90b528c..3094a999 100644 --- a/android-plugin/app/src/trace/java/top/mobilegl/plugin/ServerControlActivity.java +++ b/android-plugin/app/src/trace/java/top/mobilegl/plugin/ServerControlActivity.java @@ -141,6 +141,23 @@ public final class ServerControlActivity extends Activity { } else { setStatus("Stopped.", COLOR_INFO); } + + // Intent extras prefill the form, so adb can drive the screen without the IME: + // --es listen @name --es token T --es env "K=V;K" --ez onscreen true --ez start true + // (--ez stop true instead stops). This mirrors how every other entry point in this + // APK is already driven by extras. + Intent intent = getIntent(); + if (intent != null) { + String prefillListen = intent.getStringExtra("listen"); + if (prefillListen != null) listenField.setText(prefillListen); + String prefillToken = intent.getStringExtra("token"); + if (prefillToken != null) tokenField.setText(prefillToken); + String prefillEnv = intent.getStringExtra("env"); + if (prefillEnv != null) envField.setText(prefillEnv); + if (intent.getBooleanExtra("onscreen", false)) onScreenBox.setChecked(true); + if (intent.getBooleanExtra("stop", false)) stopServer(); + else if (intent.getBooleanExtra("start", false)) startServer(); + } } @Override