Skip to content

Widget: Show device name and nearby status when ANC isn't connected#582

Merged
d4rken merged 1 commit into
mainfrom
feat/anc-widget-nearby-status
May 4, 2026
Merged

Widget: Show device name and nearby status when ANC isn't connected#582
d4rken merged 1 commit into
mainfrom
feat/anc-widget-nearby-status

Conversation

@d4rken

@d4rken d4rken commented May 4, 2026

Copy link
Copy Markdown
Member

What changed

When the ANC widget can't reach your AirPods, it now shows the device profile name and whether the pods are nearby or out of range, instead of a bare "Not connected".

Technical Context

  • The !isAapConnected branch in AncWidgetRenderStateMapper now sets Message.primaryText to the profile label (falling back to device.getLabel(context)) and Message.secondaryText to one of two new descriptions, picked by device.ble != null.
  • WidgetDeviceKey gained a hasBleAdvertisement field. Without it, the distinctUntilChangedBy filter on widgetDeviceFlow would swallow the nearby ↔ not-nearby transition (isAapConnected stays false either way), and the widget would stay stuck on the previous message until something else in the key changed.
  • Scope is ANC widget only. Battery widget gets battery data from BLE, so it never lands in this state. Mixing battery info into the disconnected ANC widget was rejected as inconsistent — the active widget has no battery line.
  • anc_widget_aap_not_connected_label ("Not connected") is intentionally kept because AncTileService reuses it for the Quick Settings tile.

@d4rken d4rken added the enhancement Add a new feature of improve an existing feature label May 4, 2026
@d4rken d4rken merged commit 8b9f953 into main May 4, 2026
11 checks passed
@d4rken d4rken deleted the feat/anc-widget-nearby-status branch May 4, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Add a new feature of improve an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants