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
-5
View File
@@ -46,8 +46,6 @@
<string name="settings_monitor_connected_notification_description">Wyświetl dodatkowe powiadomienie, gdy urządzenie jest podłączone. Pozwala to ukryć stałe powiadomienie \"Brak urządzeń\", wyłączając kanał \"Status urządzenia\".</string>
<string name="settings_keep_notification_after_disconnect_label">Zachowaj powiadomienie po rozłączeniu</string>
<string name="settings_keep_notification_after_disconnect_description">Kontynuuj wyświetlanie ostatniego znanego poziomu baterii nawet po rozłączeniu AirPods</string>
<string name="settings_scanner_mode_label">Tryb skanera</string>
<string name="settings_scanner_mode_description">Czy skaner danych Bluetooth Low Energy ma priorytetowo działać w ramach wydajności, czy oszczędzania energii?</string>
<string name="settings_autopause_label">Automatyczne wstrzymywanie</string>
<string name="settings_autopause_description">Wstrzymaj odtwarzanie, gdy urządzenia jest wyciągane z ucha.</string>
<string name="settings_autopplay_label">Automatyczne odtwarzanie</string>
@@ -228,9 +226,6 @@ K4r0lSz;</string>
<string name="permission_required_title">Następujące uprawnienie jest wymagane:</string>
<string name="permission_system_alert_window_label">Okna alertów systemowych</string>
<string name="permission_system_alert_window_description">Zezwól na wyświetlanie CAPod nad innymi aplikacjami, aby aktywować funkcję \"Wyświetlanie informacji\".</string>
<string name="settings_scanner_mode_lowpower_label">Oszczędzanie energii</string>
<string name="settings_scanner_mode_balanced_label">Zrównoważone</string>
<string name="settings_scanner_mode_lowlatency_label">Małe opóźnienia</string>
<string name="settings_monitor_mode_manual_label">Gdy aplikacja jest uruchomiona</string>
<string name="settings_monitor_mode_automatic_label">Gdy urządzenie jest podłączone</string>
<string name="settings_monitor_mode_always_label">Zawsze</string>