Fix: Show signal strength as a bar indicator instead of a percentage#486
Conversation
|
I prefer the percentage for signal strength as it's obviously more precise and allows me to use the gauge to troubleshoot shoot Bluetooth antenna issues with the Galaxy Z Fold6, which is a pain the deal with especially with Apple air pods. Can I give the option to pick Bar or percentage with signal graph? Please or should I go back to older version.? |
The problem is that on newer Android versions, that get the L2CAP socket fix, and we establish an AAP connection, there is no good signal level indication. I noticed on my pods that they actually stop transmitting BLE advertisements once an AAP connection was established, so we had no signal level source at all. I will revisit this in the future if I get a better idea. If this is important to you, open a new issue ticket so we can track this as extra feature request. |
What changed
Signal strength no longer shows as a percentage next to the device name — it's now a small bar indicator at the end of the device title, similar to a cellular signal icon. This fixes a long-standing confusion where users would read "93%" as a battery level since both numbers looked identical.
The key and direct-connection icons that used to be bundled with the signal percentage now live on their own on the device type line, in a smaller badge.
Technical Context
SignalIndicatorcomposable draws four rounded bars via Canvas (no dependency on the Material icon library, which only shipsSignalCellular0BarandSignalCellular4Barin twotone — missing the 1/2/3 variants).>=80%→ 4 bars,>=60%→ 3,>=40%→ 2,>=20%→ 1, below → 0. Not-live devices render aLinkOfficon.signalLevelOfhelper and unit-tested for boundaries, non-finite input (NaN, infinities), and out-of-range values —PodDevice.signalQualitycan emit negatives for extreme RSSI, which the mapper now clamps defensively.SignalBadgewas renamed toDeviceConnectionBadgeand stripped of the antenna icon, signal text, andLinkOffbranch — it now only carries the BLE key state + AAP direct-connection icons. It early-returns when both are absent, so devices with neither no longer render an empty pill.DeviceConnectionBadge— those surfaces never showed key/AAP info, and adding it is out of scope.signal_indicator_bars_cd/signal_indicator_disconnected_cdstrings, applied viasemantics { contentDescription = ... }on the indicator root. English-only for now — non-English locales will be filled in by a follow-up Crowdin run.PodDevice.getSignalQualityand the already-deadBlePodSnapshot.getSignalQuality.DualPodsCard/SinglePodsCard/CasePopUpContent, so they'll drift after this change — intentionally not regenerated here; will be handled in a separate screenshot refresh.Closes #463