Device: Fix AirPods settings screen display and controls#487
Merged
Conversation
- 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Four fixes to the AirPods device settings screen, all based on feedback from a LibrePods developer review:
Technical Context
0x2Eand0x0Edecode 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 assertsConnectedDevicesandAudioSourcedecode the same bytes to the same string (the screen relies onaudioSource.sourceMac == device.mac), plus a high-byte test (AA:BB:CC:DD:EE:FF) to lock in%02Xupper-case formatting and catch any future sign-extension regression.0x31frames to hit the "Unhandled message" log branch and skip thelastMessageAtrefresh — that timestamp feeds AAP freshness / signal-strength boost logic, so losing the update would visibly degrade signal indicators. An explanatory comment aboveSETTING_IN_CASE_TONEdocuments this so a future cleanup doesn't re-remove it.Row.clickable+RadioButton.onClick). Replaced with the Material 3 idiomatic pattern — a singleModifier.selectableon theRowwithrole = Role.RadioButton, andRadioButton.onClick = null. Anif (!selected) onClick()guard prevents redundant commands when the user hammers the already-selected option. Options are now wrapped inColumn(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.