Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd960f82 authored by Vasu Nori's avatar Vasu Nori
Browse files

When a duplicate connect request is received, return success to caller.

Returning fail is causing the caller to tear down the connection
in progress.

Test: tested manually

Change-Id: I368cfe96b683d9b20d56c645d1d780a3ab90f4b4
parent e32c5466
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ public class MapClientService extends ProfileService {
        if (state == BluetoothProfile.STATE_CONNECTED
                || state == BluetoothProfile.STATE_CONNECTING) {
            Log.w(TAG, "Received connect request while already connecting/connected.");
            return false;
            return true;
        }

        // Statemachine exists but not in connecting or connected state! it should
@@ -527,7 +527,7 @@ public class MapClientService extends ProfileService {
                Log.d(TAG, "broadcast has device: (" + device.getAddress() + ", "
                        + device.getName() + ")");
            }
            MceStateMachine stateMachine = MapClientService.this.mMapInstanceMap.get(device);
            MceStateMachine stateMachine = mMapInstanceMap.get(device);
            if (stateMachine == null) {
                Log.e(TAG, "No Statemachine found for the device from broadcast");
                return;