kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
filter out null bluetooth names
rodzic
ed4862a135
commit
4632b8f956
|
@ -328,7 +328,7 @@ class BTScanModel @Inject constructor(
|
|||
@SuppressLint("MissingPermission")
|
||||
private fun addBluetoothDevices() {
|
||||
bluetoothRepository.getBondedDevices()
|
||||
?.filter { it.name.matches(Regex(BLE_NAME_PATTERN)) }
|
||||
?.filter { it.name != null && it.name.matches(Regex(BLE_NAME_PATTERN)) }
|
||||
?.forEach {
|
||||
addDevice(DeviceListEntry(it.name, "x${it.address}", true))
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue