forked from upstream-mirrors/OpenTracks
BLE: do not try to connect twice.
Might had some interesting side effects. Part of #1352.
This commit is contained in:
@@ -122,6 +122,7 @@ public abstract class BluetoothConnectionManager<DataType> {
|
|||||||
synchronized void connect(Context context, @NonNull BluetoothDevice device) {
|
synchronized void connect(Context context, @NonNull BluetoothDevice device) {
|
||||||
if (bluetoothGatt != null) {
|
if (bluetoothGatt != null) {
|
||||||
Log.w(TAG, "Already connected; ignoring.");
|
Log.w(TAG, "Already connected; ignoring.");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.d(TAG, "Connecting to: " + device);
|
Log.d(TAG, "Connecting to: " + device);
|
||||||
|
|||||||
Reference in New Issue
Block a user