mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-21 07:51:46 +02:00
Log and handle discoverServices() returning false
This commit is contained in:
@@ -553,7 +553,11 @@ public abstract class BluetoothCommunication {
|
|||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
// Empty
|
// 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) {
|
else if (newState == BluetoothProfile.STATE_DISCONNECTED) {
|
||||||
setBtStatus(connectionEstablished
|
setBtStatus(connectionEstablished
|
||||||
|
Reference in New Issue
Block a user