Device: Warn when profile has no paired Bluetooth device selected#500
Merged
Conversation
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
Users whose profile wasn't linked to a specific paired Bluetooth device (common after upgrading from older versions where device selection was optional) previously saw an empty settings screen with no way to figure out what was wrong — the ANC/AAP options wouldn't appear and there was no Connect button either.
The overview card now shows a warning icon in place of the usual settings icon when a profile has no paired device selected. Tapping it jumps straight to the profile editor so the user can pick their AirPods from the paired-devices list.
Technical Context
AppleDeviceProfile.addressis nullable, andAapAutoConnect.initialConnect()filters profiles byit.address in connectedAddresses— a null address silently never matches, so AAP never tries to connect. Three unrelated UI paths were also gated ondevice.address != null(overview card's settings icon atSinglePodsCard.kt:141/DualPodsCard.kt:142, theDeviceSettingsnav route inOverviewViewModel.goToDeviceSettings, and theNotConnectedCardatDeviceSettingsScreen.kt:245), so the broken state had zero visible affordance for the user to diagnose or fix it. The reporter in Help wanted: Using L2CAP connection to read from and write settings to AirPods #215 had to delete and recreate the profile because that was the only UI lever not hidden by the null-address gate.oldMainDeviceAddresswas empty at the single→multi migration (migration copies null and permanently flipssingleToMultiMigrationDone), and v3.x/v4.x users who saved a profile without picking a bonded device — nothing required it before AAP landed in v5.0.0-beta0.device.profileId != null && device.address == nullso it never fires for anonymous BLE devices (which have their own existing UX).Related to #215