Skip to content

Commit f9bf5f5

Browse files
steipetexialonglee
andauthored
fix(android): keep stale PTT from restarting capture (#100552)
* fix(android): serialize background PTT lifecycle Follow-up hardening for #99840 after the initial fix landed in #100483. Co-authored-by: xialonglee <[email protected]> * docs(changelog): note Android PTT lifecycle hardening * fix(android): order PTT ownership transitions * test(android): opt in to coroutine scheduler API * fix(android): serialize voice capture ownership * test(android): drive PTT ordering with test dispatcher * test(android): isolate PTT ordering preferences * test(android): control PTT invoke dispatchers * test(android): isolate PTT coroutine dispatchers * test(android): use current Robolectric resolver API * test(android): register speech service without deprecated APIs * test(android): control stale PTT cleanup dispatch * test(android): isolate voice mode reassertion * fix(android): clean voice capture on permission loss * fix(android): invalidate PTT before cancel wait * test(android): preserve starts queued after cancel * fix(android): keep one-shot PTT retries idempotent --------- Co-authored-by: xialonglee <[email protected]>
1 parent 62d9576 commit f9bf5f5

6 files changed

Lines changed: 856 additions & 207 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Docs: https://docs.openclaw.ai
6161
- **Exec output sanitization:** remove complete ANSI sequences and render residual C0/C1 controls as visible escapes instead of silently discarding output bytes. (#100327) Thanks @LavyaTandel.
6262
- **Assistant visible text:** unwrap leaked standalone `<parameter>` tags while preserving their content and literal code/XML examples. (#100302) Thanks @nankingjing.
6363
- **Android microphone capture:** treat negative `AudioRecord.read` results as fatal shared-session errors so both transcription and Talk capture stop cleanly after device loss. (#100028) Thanks @NianJiuZst.
64+
- **Android push-to-talk lifecycle:** serialize gateway PTT preparation with app foreground and Manual Mic ownership so stale background or retry work cannot restart, replace, or tear down a newer capture. (#99840) Thanks @xialonglee.
6465
- **Lean local-model tools:** trim media generation, TTS, and PDF tools from lean agent surfaces while preserving explicit config and runtime opt-ins. (#88881) Thanks @vincentkoc.
6566
- **iOS development app identity:** keep the development app labeled OpenClaw while using its distinct debug icon to differentiate it from release builds.
6667
- **Android chat recovery:** preserve optimistic user messages and locally owned runs while reconnect and sequence-gap history snapshots catch up, preventing sent messages from disappearing or stale runs from taking ownership. (#100197)

apps/.i18n/native-source.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -195,31 +195,31 @@
195195
},
196196
{
197197
"kind": "ui-state-text",
198-
"line": 570,
198+
"line": 577,
199199
"path": "apps/android/app/src/main/java/ai/openclaw/app/NodeRuntime.kt",
200200
"source": "Offline",
201201
"surface": "android",
202202
"id": "native.android.c65b61de70a063e7"
203203
},
204204
{
205205
"kind": "conditional-branch",
206-
"line": 2243,
206+
"line": 2444,
207207
"path": "apps/android/app/src/main/java/ai/openclaw/app/NodeRuntime.kt",
208208
"source": "Failed: this host requires wss:// or Tailscale Serve. No TLS endpoint detected.",
209209
"surface": "android",
210210
"id": "native.android.81009c40eed2216d"
211211
},
212212
{
213213
"kind": "conditional-branch",
214-
"line": 2245,
214+
"line": 2446,
215215
"path": "apps/android/app/src/main/java/ai/openclaw/app/NodeRuntime.kt",
216216
"source": "Failed: secure endpoint reached, but TLS fingerprint verification timed out. Check Tailscale Serve or gateway TLS and retry.",
217217
"surface": "android",
218218
"id": "native.android.467899bb510b8e34"
219219
},
220220
{
221221
"kind": "conditional-branch",
222-
"line": 2247,
222+
"line": 2448,
223223
"path": "apps/android/app/src/main/java/ai/openclaw/app/NodeRuntime.kt",
224224
"source": "Failed: couldn't reach the secure gateway endpoint for this host.",
225225
"surface": "android",
@@ -5707,55 +5707,55 @@
57075707
},
57085708
{
57095709
"kind": "conditional-branch",
5710-
"line": 369,
5710+
"line": 476,
57115711
"path": "apps/android/app/src/main/java/ai/openclaw/app/voice/TalkModeManager.kt",
57125712
"source": "Listening",
57135713
"surface": "android",
57145714
"id": "native.android.b4f67e96603515bd"
57155715
},
57165716
{
57175717
"kind": "conditional-branch",
5718-
"line": 369,
5718+
"line": 476,
57195719
"path": "apps/android/app/src/main/java/ai/openclaw/app/voice/TalkModeManager.kt",
57205720
"source": "Ready",
57215721
"surface": "android",
57225722
"id": "native.android.b88e4278ead724ba"
57235723
},
57245724
{
57255725
"kind": "conditional-branch",
5726-
"line": 726,
5726+
"line": 863,
57275727
"path": "apps/android/app/src/main/java/ai/openclaw/app/voice/TalkModeManager.kt",
57285728
"source": "Off",
57295729
"surface": "android",
57305730
"id": "native.android.8d8230088f3baa2a"
57315731
},
57325732
{
57335733
"kind": "conditional-branch",
5734-
"line": 727,
5734+
"line": 864,
57355735
"path": "apps/android/app/src/main/java/ai/openclaw/app/voice/TalkModeManager.kt",
57365736
"source": "Talk failed: Realtime provider closed unexpectedly.",
57375737
"surface": "android",
57385738
"id": "native.android.d6b7f86564ac3147"
57395739
},
57405740
{
57415741
"kind": "conditional-branch",
5742-
"line": 728,
5742+
"line": 865,
57435743
"path": "apps/android/app/src/main/java/ai/openclaw/app/voice/TalkModeManager.kt",
57445744
"source": "Talk failed: Realtime provider closed: $reason",
57455745
"surface": "android",
57465746
"id": "native.android.eb6ac739ad55e63a"
57475747
},
57485748
{
57495749
"kind": "conditional-branch",
5750-
"line": 1675,
5750+
"line": 1812,
57515751
"path": "apps/android/app/src/main/java/ai/openclaw/app/voice/TalkModeManager.kt",
57525752
"source": "Aborted",
57535753
"surface": "android",
57545754
"id": "native.android.13531fe081a45711"
57555755
},
57565756
{
57575757
"kind": "conditional-branch",
5758-
"line": 1675,
5758+
"line": 1812,
57595759
"path": "apps/android/app/src/main/java/ai/openclaw/app/voice/TalkModeManager.kt",
57605760
"source": "Chat error",
57615761
"surface": "android",

0 commit comments

Comments
 (0)