Skip to content

v1.0.0-alpha.12

Choose a tag to compare

@github-actions github-actions released this 07 Oct 12:30
· 5 commits to main since this release
fix: ask for Android USB permission once per attach (#2)

The USB scan requested permission on every 2 s pass while a device was
ungranted. Android refuses any device with audio capture (the P-6) while
the Microphone access privacy toggle is off: the dialog's OK records the
grant but hasPermission stays false, so rp6 re-opened the dialog 2 s after
every OK and never connected. Reproduced on the Pixel with the P-6 via
`cmd sensor_privacy enable 0 microphone`.

permAsker (pure Go, unit-tested) now decides when to ask: once per attach,
one dialog at a time. A request is forgotten when the device is granted or
a full scan no longer sees it, so replugging (or losing a grant mid-session)
asks again once. If the device is still refused ~6 s later, the status bar
says so once: "P-6 needs Microphone access on (or replug)" for devices with
an audio-streaming IN endpoint, "replug to ask again" otherwise. A refused
device no longer stops the scan from reading a permitted one.

Verified on the Pixel 10 Pro XL with the P-6: with Microphone access off,
one request, and no re-prompt after OK or Cancel; turning it back on
connects within 1 s without a tap. docs/android-midi.md documents the
behaviour and the repro.