Skip to content

Device: Fix AirPods settings screen display and controls#487

Merged
d4rken merged 1 commit into
mainfrom
fix/librepods-review-feedback
Apr 7, 2026
Merged

Device: Fix AirPods settings screen display and controls#487
d4rken merged 1 commit into
mainfrom
fix/librepods-review-feedback

Conversation

@d4rken

@d4rken d4rken commented Apr 7, 2026

Copy link
Copy Markdown
Member

What changed

Four fixes to the AirPods device settings screen, all based on feedback from a LibrePods developer review:

  • Other connected devices list now shows the correct MAC address. The bytes were displayed in reverse order, so the address shown didn't match what you'd see in your phone's Bluetooth settings.
  • "Volume Swipe Length" is now called "Volume Swipe Wait Time", with a description that actually explains what it does: the setting controls how long to wait between swipes to prevent unintended volume changes, not the swipe distance.
  • Removed the "Charging Sounds" toggle. The setting didn't actually control the case charging sound (that's handled elsewhere on the AirPods), and the real effect is unknown, so it's better to not expose a toggle we can't make any promises about.
  • Fixed End Call / Mute Mic radio buttons. Rapid taps could misbehave, selecting the already-selected option would still fire commands to the AirPods, and screen readers didn't announce the two options as a radio group.

Technical Context

  • MAC byte order: The 0x2E and 0x0E decode paths applied a byte reversal that looked correct at first glance but didn't match what the device actually sends. Verified against LibrePods. Added regression tests: a cross-path test that asserts ConnectedDevices and AudioSource decode the same bytes to the same string (the screen relies on audioSource.sourceMac == device.mac), plus a high-byte test (AA:BB:CC:DD:EE:FF) to lock in %02X upper-case formatting and catch any future sign-extension regression.
  • In-case tone: The decode path is kept internally. Dropping it would cause the device's periodic 0x31 frames to hit the "Unhandled message" log branch and skip the lastMessageAt refresh — that timestamp feeds AAP freshness / signal-strength boost logic, so losing the update would visibly degrade signal indicators. An explanatory comment above SETTING_IN_CASE_TONE documents this so a future cleanup doesn't re-remove it.
  • Radio buttons: The root cause was two overlapping click handlers on one row (Row.clickable + RadioButton.onClick). Replaced with the Material 3 idiomatic pattern — a single Modifier.selectable on the Row with role = Role.RadioButton, and RadioButton.onClick = null. An if (!selected) onClick() guard prevents redundant commands when the user hammers the already-selected option. Options are now wrapped in Column(Modifier.selectableGroup()) so TalkBack announces them as a mutually exclusive set. Transport-level dedupe was considered and rejected as inconsistent with the rest of the AAP send path and unnecessary once the UI bug is fixed.

- Show connected device MACs in correct byte order (remove stale reversal)

- Rename 'Volume Swipe Length' setting to 'Volume Swipe Wait Time'

- Hide 'Charging Sounds' toggle: real case tones go over ATT and the actual effect of this AAP setting is unknown. Decode kept internally so AAP freshness signal still refreshes.

- Fix duplicate commands on End Call/Mute Mic radio buttons: use Modifier.selectable with Role.RadioButton, short-circuit when already selected, and wrap options in selectableGroup for TalkBack.
@d4rken d4rken added bug Something isn't working coms/AAP Uses Apples AirPod Protocol. Requires Android ROM with fixed L2CAP support on the Bluetooth sockets. labels Apr 7, 2026
@d4rken d4rken merged commit 175f8e3 into main Apr 7, 2026
10 checks passed
@d4rken d4rken deleted the fix/librepods-review-feedback branch April 7, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working coms/AAP Uses Apples AirPod Protocol. Requires Android ROM with fixed L2CAP support on the Bluetooth sockets.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant