mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
ble: fix GattCallback.onConnectionStateChange is never called
This commit is contained in:
@@ -564,6 +564,11 @@ public final class BtLEQueue {
|
||||
LOG.warn("connection state event with error status {}", BleNamesResolver.getStatusString(status));
|
||||
}
|
||||
|
||||
final GattCallback callback = getCallbackToUse();
|
||||
if (callback != null) {
|
||||
callback.onConnectionStateChange(gatt, status, newState);
|
||||
}
|
||||
|
||||
switch (newState) {
|
||||
case BluetoothProfile.STATE_CONNECTED:
|
||||
LOG.info("Connected to GATT server.");
|
||||
|
||||
Reference in New Issue
Block a user