Repository navigation
android: reconnect from the quick settings tile when AirPods are disconnected - #883
Open
GuangYiDing wants to merge 1 commit into
Open
GuangYiDing wants to merge 1 commit into
GuangYiDing wants to merge 1 commit into
Conversation
…onnected The tile used to be STATE_UNAVAILABLE while disconnected, so it could not be tapped. Keep it clickable and call reconnectFromSavedMac() on tap, the same action as the "Tap to reconnect" button in the app. Show "Reconnecting" while a reconnect is in progress, and open the app if the service is not running. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
While the AirPods aren't connected, the quick settings tile is set to
STATE_UNAVAILABLE, so SystemUI greys it out and taps never reachonClick()(which only logged "Tile clicked but AirPods not connected"). Getting the AirPods back meant opening the app and tapping "Tap to reconnect". That's a common step when the AirPods move between an Android device and an iPhone.This keeps the tile usable while disconnected:
updateTile()usesSTATE_INACTIVEwhen disconnected, with the device name as the label and the existing localizedtap_to_reconnect/reconnectingstrings as the subtitle, instead of the hard-coded "AirPods" / "Disconnected".AirPodsService.reconnectFromSavedMac(), the same thing the in-app "Tap to reconnect" button does. Further taps are ignored for 6 s while it reconnects, and the state resets onAIRPODS_CONNECTED.Behaviour while connected (cycling listening modes) is unchanged. This doesn't overlap with #777, which only adds a manifest intent filter for long-press.
Testing
OPPO Pad Mini, ColorOS 17 / Android 17 (no root), AirPods Pro,
fossDebugbuild:ColorOS's compact tiles only show the label, so the "Tap to reconnect" subtitle is visible only where SystemUI shows tile subtitles.
🤖 Generated with Claude Code