fix(connections): replace tab-based UI with unified device list and gate NSD scanning

On Android 15+ NsdManager.discoverServices() triggers an unavoidable system
consent dialog. This replaces the BLE/Network/USB tab bar with a single
scrollable device list and gates NSD behind an explicit user-initiated scan
toggle, preventing the dialog from appearing unexpectedly.

- Add gated NSD flow (flatMapLatest on isNetworkScanning) in ScannerViewModel
- Simplify GetDiscoveredDevicesUseCase to accept resolvedList as a parameter
- Create unified DeviceList composable with per-transport sections
- Add BLE scan toggle matching the network scan pattern
- Delete BLEDevices, NetworkDevices, UsbDevices, ConnectionsSegmentedBar
- Add onCleared() scan cleanup as a safety net
- Remove unused supportedDeviceTypes from ViewModel
This commit is contained in:
James Rich 2026-04-13 17:47:33 -05:00
parent 28be6933c8
commit 34066fa661
15 changed files with 598 additions and 576 deletions

View file

@ -910,7 +910,13 @@
<string name="firmware_edition">Firmware Edition</string>
<string name="recent_network_devices">Recent Network Devices</string>
<string name="discovered_network_devices">Discovered Network Devices</string>
<string name="scan_network_devices">Scan for network devices</string>
<string name="scanning_network">Scanning…</string>
<string name="scan_bluetooth_devices">Scan for Bluetooth devices</string>
<string name="scanning_bluetooth">Scanning…</string>
<string name="bluetooth_available_devices">Available Bluetooth Devices</string>
<string name="add_network_device_manually">Add device manually…</string>
<string name="no_devices_found">No devices found</string>
<string name="get_started">Get started</string>
<string name="intro_welcome">Welcome to</string>