fix(monitor): Auto-tune BLE scanner mode by foreground state and connections

Replaces the user-facing scanner mode setting with an automatic policy that picks LOW_LATENCY when a profile-paired device is connected, BALANCED in the foreground, and LOW_POWER in the background. The TroubleShooter scopes a temporary LOW_LATENCY override via a refcounted withTemporaryOverride block so overlapping callers stay correct.

Fixes a regression where the controller could block BLE scanning entirely if BLUETOOTH_CONNECT was missing or the HEADSET profile proxy stalled, and adds a reactive bondedDeviceAddresses flow so bond changes propagate without waiting for an unrelated input. Cleans up the now-dead scanner mode strings across all locales and unused ScannerMode fields.
This commit is contained in:
darken
2026-04-30 15:26:45 +02:00
committed by Matthias Urhahn
parent e6dbd2d660
commit c8f5ceda34
86 changed files with 744 additions and 585 deletions
-6
View File
@@ -50,8 +50,6 @@
<string name="settings_monitor_connected_notification_description">Shows an extra notification when a device is connected. This lets you hide the permanent \"No devices\" notification by disabling the \"Device status\" channel.</string>
<string name="settings_keep_notification_after_disconnect_label">Keep notification after disconnect</string>
<string name="settings_keep_notification_after_disconnect_description">Continue showing the last known battery levels even after your AirPods disconnect</string>
<string name="settings_scanner_mode_label">Scanner mode</string>
<string name="settings_scanner_mode_description">Should the Bluetooth Low Energy data scanner prioritize performance or conserve energy?</string>
<string name="settings_autopause_label">Auto pause</string>
<string name="settings_autopause_description">Pause audio when removing the device from your ear.</string>
<string name="settings_autopplay_label">Auto play</string>
@@ -251,10 +249,6 @@
<string name="permission_system_alert_window_label">System Alert Window</string>
<string name="permission_system_alert_window_description">Allow CAPod to draw over other apps to make the feature \"Show PopUp\" possible.</string>
<string name="settings_scanner_mode_lowpower_label">Low power</string>
<string name="settings_scanner_mode_balanced_label">Balanced</string>
<string name="settings_scanner_mode_lowlatency_label">Low latency</string>
<string name="settings_monitor_mode_manual_label">When app is open</string>
<string name="settings_monitor_mode_automatic_label">When device is connected</string>
<string name="settings_monitor_mode_always_label">Always</string>