mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-03-30 03:33:50 -04:00
Return "n" if user has selected device none - fixes autoselect of
the first BLE device that shows up
This commit is contained in:
@@ -102,6 +102,7 @@ class RadioInterfaceService : Service(), Logging {
|
||||
val isValid = when (c) {
|
||||
'x' -> BluetoothInterface.addressValid(context, rest)
|
||||
's' -> SerialInterface.addressValid(context, rest)
|
||||
'n' -> true
|
||||
else -> TODO("Unexpected interface type $c")
|
||||
}
|
||||
if (!isValid)
|
||||
@@ -236,7 +237,7 @@ class RadioInterfaceService : Service(), Logging {
|
||||
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
private fun setBondedDeviceAddress(addressIn: String?) {
|
||||
private fun setBondedDeviceAddress(address: String?) {
|
||||
// Record that this use has configured a radio
|
||||
GeeksvilleApplication.analytics.track(
|
||||
"mesh_bond"
|
||||
@@ -248,7 +249,6 @@ class RadioInterfaceService : Service(), Logging {
|
||||
}
|
||||
|
||||
// The device address "n" can be used to mean none
|
||||
val address = if ("n" == addressIn) null else addressIn
|
||||
|
||||
debug("Setting bonded device to $address")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user