Another small change to BTLE device connection #156

here
cpfeiffer 2015-11-13 23:53:48 +01:00
parent 5864189b91
commit f349846f4a
1 changed files with 2 additions and 2 deletions

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);
}