Skip to content

Fix: Hide settings consistently when AirPods can't be controlled#580

Merged
d4rken merged 1 commit into
mainfrom
fix/device-settings-aap-visibility
May 3, 2026
Merged

Fix: Hide settings consistently when AirPods can't be controlled#580
d4rken merged 1 commit into
mainfrom
fix/device-settings-aap-visibility

Conversation

@d4rken

@d4rken d4rken commented May 3, 2026

Copy link
Copy Markdown
Member

What changed

When CAPod could see your AirPods over Bluetooth but couldn't take full control of them (for example because another app or your Mac was holding the AirPods connection), the device settings screen mixed two different "unavailable" states: most settings disappeared, but the Microphone selector and the Press controls entry stayed on screen as greyed-out items. That made it look as if those two settings had a separate problem from the rest.

They now hide together with the other settings whenever the AirPods aren't responding to commands, so the screen reads consistently: a setting is shown when it can be used, and hidden when it can't.

Technical Context

  • Root cause: visibility for Sound > Microphone and Controls > Press controls was gated only on the static Model.Features flag, while every other AAP-dependent row in the same screen used features.hasX && device.X != null. When AAP is in aap != null && connectionState != READY (e.g. socket connects then stalls in HANDSHAKING), the live setting values are null but Model.Features flags are static, so the two outliers kept rendering and got enabled = device.isAapReady (false).
  • Fix is a one-line addition of the missing data-presence check in each spot (parent showSoundSection / showControlsSection gates plus the inner SoundCard / ControlsCard rows). No new pattern introduced — just brings the outliers in line with ANC, Tone Volume, Volume Swipe, etc.
  • PressControlsScreen already auto-navigates back when AAP drops mid-session (PressControlsScreen.kt:74-84), so hiding the entry point on the parent screen makes the destination's behaviour consistent in both directions.

@d4rken d4rken added the bug Something isn't working label May 3, 2026
@d4rken d4rken merged commit 2821da4 into main May 3, 2026
11 checks passed
@d4rken d4rken deleted the fix/device-settings-aap-visibility branch May 3, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant