mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-20 07:21:40 +02:00
Log and handle discoverServices() returning false
This commit is contained in:
@@ -553,7 +553,11 @@ public abstract class BluetoothCommunication {
|
||||
catch (Exception e) {
|
||||
// Empty
|
||||
}
|
||||
gatt.discoverServices();
|
||||
if (!gatt.discoverServices()) {
|
||||
Timber.e("Could not start service discovery");
|
||||
setBtStatus(BT_STATUS_CODE.BT_CONNECTION_LOST);
|
||||
disconnect(false);
|
||||
}
|
||||
}
|
||||
else if (newState == BluetoothProfile.STATE_DISCONNECTED) {
|
||||
setBtStatus(connectionEstablished
|
||||
|
Reference in New Issue
Block a user