Skip to content

fix(android): Talk does nothing when mic access is permanently denied - #206609

Merged
vincentkoc merged 3 commits into
openclaw:mainfrom
anmol0b:fix/android-talk-mic-permission-denied
Nov 30, 2026
Merged

vincentkoc merged 3 commits into
openclaw:mainfrom
anmol0b:fix/android-talk-mic-permission-denied

Conversation

@anmol0b

@anmol0b anmol0b commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Closes #206076

What Problem This Solves

Fixes: tapping Talk in an Android chat does nothing when the microphone permission was denied with "Don't ask again" (or denied twice). Android answers the request at once without a system prompt, and the Talk button ignored the denial, so there was no message and no way to Settings.

User Impact

Tapping Talk with the microphone blocked now shows the same "Enable permission in Settings" dialog that voice notes and dictation already show, with an Open Settings button to the app's settings page. A first-time request still shows Android's own prompt, and granting it continues into Talk as before.

How it works

Talk keeps its Android activity-result launcher so the first tap can continue when the user grants permission, even after a long pause. A permanent denial goes through the shared Settings dialog used by dictation and voice notes. Canceling the prompt leaves the microphone off.

Evidence

All three Android Talk regressions passed in both the Play and third-party builds for 2d00a89273a. The platform callback tests verified that permanent denial offers Settings, a grant after 25 seconds starts Talk on the original tap, and cancellation leaves the microphone off. Each report contained all three cases with zero skips, failures, or errors. Android ktlint and both native-access checks passed in the same CI run.

Contributor emulator evidence before the late-grant correction

Debug playDebug builds of 54efb719017 (base) and the original contributor patch at 70d508c6543, on an API 36 Google APIs emulator, connected to an isolated local Gateway. The microphone was put into the "Don't ask again" state with pm revoke plus pm set-permission-flags … user-set user-fixed.

  • Base, tap Start Talk in chat: the system logs permission=android.permission.RECORD_AUDIO result=2, no prompt appears, and the chat screen is unchanged.
  • Base control, tap Dictation in the same state: "Enable permission in Settings" / "You can enable Microphone in Android Settings." with Cancel and Open Settings.
  • Original patch, tap Start Talk in the same state: the same "Enable permission in Settings" dialog appears. Open Settings opens com.android.settings/.spa.SpaActivity on the OpenClaw Dev app info page.
  • Original patch, the issue's steps through the UI with flags cleared: first tap shows Android's "Allow OpenClaw Dev to record audio?" prompt; Don't allow. Second tap shows "Allow access?" with Not now and Continue; Continue, Don't allow. The Settings dialog appears, and every later tap shows it again.
  • Original patch, never asked, "While using the app": Talk continues into the existing setup check, which on this Gateway shows "Configure a Realtime Talk provider on the Gateway". The same happens when the device is rotated to landscape while the prompt is open.

Screenshots

API 36 emulator, microphone set to "Don't ask again".

Before: tap TalkBefore, control: tap DictationAfter: tap TalkAfter: Open Settings
image

Nothing appears; the chat is unchanged.

image

Dictation already shows the Settings dialog.

image

Talk now shows the same dialog.

image

Open Settings opens the app info page.

The contributor's original patch passed the focused Talk, ChatScreen, PermissionRequester, and dictation suites. The emulator run also found that a grant after 25 seconds required a second tap on that patch. The correction preserves the native grant callback and adds regression coverage for that case.

…ntly denied

The chat Talk button requested RECORD_AUDIO through its own
ActivityResult launcher and returned silently on denial, so after
"Don't ask again" a tap did nothing. Ask through
MainViewModel.requestRecordAudioPermission instead, the
PermissionRequester path voice notes and dictation already use, which
shows the rationale or the "Enable permission in Settings" dialog.
@clawsweeper

clawsweeper Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. clawsweeper:intake:bug Preliminary submission classification; full source review pending. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 27, 2026
@clawsweeper

clawsweeper Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

Routes Talk microphone requests through the shared permission requester so permanent denial offers Android Settings.

Example: Tap Start Talk after permanently denying android.permission.RECORD_AUDIO.

  • Before: Chat remains unchanged without an explanation.
  • After: An Enable permission in Settings dialog offers Open Settings.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A worthwhile, focused fix with inspected product proof and a distinct regression test; required CI remains unsatisfied.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after API 36 emulator screenshots show the changed Chat Talk path offering microphone Settings recovery and opening OpenClaw Dev app info, resolving the previous review's capture gap.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: After permanently denying microphone access, tapping Talk provides no explanation or recovery action.
Reason: Restoring the existing permission-recovery experience fixes a concrete silent failure without adding configuration or a new permission policy.

Merge readiness

✅ Ready for maintainer review

This PR fixes a current Android silent failure through the existing permission owner; no actionable patch defects were found.

Reviewed head: 70d508c6543dfde52443432f2972e2a983fa2af5

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Android Chat composer requests microphone permission before checking Talk readiness and starting the existing Talk runtime.

flowchart TD
  A[Chat Talk button] --> B[Talk launcher]
  B --> C[MainViewModel]
  C --> D[PermissionRequester]
  D --> E[Android permission prompt]
  D --> F[Android Settings recovery]
  C --> G[Talk readiness and runtime]
Loading

Technical review

Best possible solution:

Keep this focused shared-owner fix and land it after the required CI gate is satisfied.

Do we have a high-confidence way to reproduce the issue?

Current main visibly returns on denial without recovery; the contributor's API 36 emulator comparison corroborates that path, and no target code was run during this review.

Is this the best way to solve the issue?

Reusing PermissionRequester is the smallest complete fix for permanent-denial recovery and removes the competing launcher without changing Talk readiness or runtime ownership.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 55f3ed6404f5.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • WhatsSkiLL: Raw commit 7bded09 adds apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatRealtimeTalk.kt:31 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7bded09b6175; files: apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatRealtimeTalk.kt)
  • Peter Steinberger: Raw commit e1accfa adds apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatRealtimeTalk.kt:82 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e1accfa8b430; files: apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatRealtimeTalk.kt)
  • Ivan Kuznetsov: Raw commit 1ed6408 adds apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatRealtimeTalk.kt:49 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 1ed6408675e4; files: apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatRealtimeTalk.kt)

PR surface

Source +2, Tests +89. Total +91 across 2 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 1 8 6 +2
Tests 1 89 0 +89
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 97 6 +91

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production versus test delta Production +8/-6; tests +89/-0 The added fixture supports one distinct regression through the production Talk-to-permission boundary without adding production test seams.

Labels

Label changes:

No label changes.

Label justifications:

  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-27T11:20:57.123Z sha 70d508c :: needs real behavior proof before merge. :: none

Reviewed November 27, 2026, 9:28 AM ET / 14:28 UTC (Revision 2).

@anmol0b

anmol0b commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Nov 27, 2026
@vincentkoc vincentkoc self-assigned this Nov 30, 2026
@vincentkoc
vincentkoc merged commit 61fb258 into openclaw:main Nov 30, 2026
87 checks passed
@vincentkoc

Copy link
Copy Markdown
Member

Merged via squash.

vincentkoc added a commit that referenced this pull request Nov 30, 2026
* commit 'b21f557c8fa038ebc1842e204e356eb063aea4c6': (46 commits)
  test(ui): keep real exports in the channel settings distribution mock (#208855)
  test(normalization): preserve inline code in quoted previews (#208857)
  fix(ci): restore adaptive priors across large repository trees (#208838)
  test(agents): cover typography preservation in patch updates (#208851)
  fix(ci): wait for selected agent during model setup proof (#208847)
  fix: keep Telegram topic messages out of Home’s chat history (#208778)
  fix(worktrees): name the session to restore and say agents can't (#208828)
  fix: tell an idle parent when a child result couldn't reach its chat (#208772)
  fix: keep the provider search focused when accounts load (#208780)
  fix(clawrouter): respect permitted speeds on model fallback (#208830)
  fix(ui): show provider rejection details without Markdown escapes (#208829)
  fix: make the cloud worker deletion test reliable across reconnects (#208812)
  fix(update): preserve preparation lock ownership (#207139)
  chore(release): update appcast for 2026.11.12 (#208820)
  fix(android): Talk does nothing when mic access is permanently denied (#206609)
  test(config): preserve media model primaries across repeated edits (#208837)
  fix(browser): use the mock keychain for new headed macOS profiles (#208814)
  fix: start source workers without synchronous filesystem reads in the caller (#208789)
  refactor(ios): stop loading retired Overview data (#208795)
  perf(knowledge): stop repeating write-input schemas in batch and correct tools (#208617)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Android Talk button does nothing when microphone permission is permanently denied

2 participants