1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-28 04:46:51 +01:00

Another small change to BTLE device connection #156

This commit is contained in:
cpfeiffer 2015-11-13 23:53:48 +01:00
parent 5864189b91
commit f349846f4a

View File

@ -156,11 +156,11 @@ public final class BtLEQueue {
LOG.info("Attempting to connect to " + mGbDevice.getName());
mBluetoothAdapter.cancelDiscovery();
BluetoothDevice remoteDevice = mBluetoothAdapter.getRemoteDevice(mGbDevice.getAddress());
boolean result;
synchronized (mGattMonitor) {
mBluetoothGatt = remoteDevice.connectGatt(mContext, false, internalGattCallback);
result = mBluetoothGatt.connect();
// result = mBluetoothGatt.connect();
}
boolean result = mBluetoothGatt != null;
if (result) {
setDeviceConnectionState(State.CONNECTING);
}