fix: Allow BLE reconnection after connection drop (#3518)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Steve Bliss 2025-10-22 16:20:28 -04:00 committed by GitHub
parent e4ba6d6136
commit 58fda3d990
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -303,7 +303,7 @@ constructor(
* @return true if the device changed, false if no change
*/
private fun setBondedDeviceAddress(address: String?): Boolean =
if (getBondedDeviceAddress() == address && isStarted) {
if (getBondedDeviceAddress() == address && isStarted && _connectionState.value == ConnectionState.CONNECTED) {
Timber.w("Ignoring setBondedDevice ${address.anonymize}, because we are already using that device")
false
} else {