Remove waitForBonding for HTS profile as it is initiated by notification

This commit is contained in:
Sylwester Zielinski
2023-05-12 10:27:17 +02:00
parent 4eb74387a4
commit c398146d6b

View File

@@ -88,8 +88,6 @@ internal class HTSService : NotificationService() {
private fun startGattClient(device: ServerDevice) = lifecycleScope.launch { private fun startGattClient(device: ServerDevice) = lifecycleScope.launch {
client = device.connect(this@HTSService, logger = { p, s -> repository.log(p, s) }) client = device.connect(this@HTSService, logger = { p, s -> repository.log(p, s) })
client.waitForBonding()
client.connectionStateWithStatus client.connectionStateWithStatus
.onEach { repository.onConnectionStateChanged(it) } .onEach { repository.onConnectionStateChanged(it) }
.filterNotNull() .filterNotNull()