From 53ac21b4d05104473fc108f5d68a11b56e671ef8 Mon Sep 17 00:00:00 2001 From: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> Date: Sun, 25 Oct 2026 17:50:51 -0400 Subject: [PATCH] fix: keep pending agent entries until the session's environment is ready --- app/src/main/java/com/droiddeck/launcher/agent/AgentEnv.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/droiddeck/launcher/agent/AgentEnv.kt b/app/src/main/java/com/droiddeck/launcher/agent/AgentEnv.kt index e15fbab41f..0842f6b5a4 100644 --- a/app/src/main/java/com/droiddeck/launcher/agent/AgentEnv.kt +++ b/app/src/main/java/com/droiddeck/launcher/agent/AgentEnv.kt @@ -131,13 +131,13 @@ object AgentEnv { val state = load(context) val active = strings(state.optJSONArray("pending")) val overrides = strings(state.optJSONArray("pendingOverrides")) - state.put("active", JSONArray(active)).put("pending", JSONArray()) - state.put("activeOverrides", JSONArray(overrides)).put("pendingOverrides", JSONArray()) - save(context, state) bin(context).listFiles() ?.filter { it.name !in overrides }?.forEach { it.delete() } val lines = strings(state.optJSONArray("persistent")) + active val withPath = if (overrides.none { it != "libblfastpath.so" }) lines else lines + "PATH=$GUEST_BIN:${pathOf(lines)}" + state.put("active", JSONArray(active)).put("pending", JSONArray()) + state.put("activeOverrides", JSONArray(overrides)).put("pendingOverrides", JSONArray()) + save(context, state) if (withPath.isNotEmpty()) Log.i(TAG, "agent environment keys for this session: ${withPath.map { it.substringBefore('=') }}") withPath }