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

Commit 95daa00f authored by Joseph Pirozzo's avatar Joseph Pirozzo Committed by Android (Google) Code Review
Browse files

Merge "Bluetooth Multi Connect"

parents c83a1628 43eba083
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -122,9 +122,6 @@ final class A2dpSinkProfile implements LocalBluetoothProfile {
                    return true;
                }
            }
            for (BluetoothDevice src : srcs) {
                mService.disconnect(src);
            }
        }
        return mService.connect(device);
    }
+0 −5
Original line number Diff line number Diff line
@@ -132,11 +132,6 @@ final class HfpClientProfile implements LocalBluetoothProfile {
                    return true;
                }
            }
            // Handsfree HF only supports one source connection and hence it is OK to disconnect
            // the only connected device here.
            for (BluetoothDevice src : srcs) {
                mService.disconnect(src);
            }
        }
        return mService.connect(device);
    }
+4 −4
Original line number Diff line number Diff line
@@ -115,10 +115,10 @@ public final class MapClientProfile implements LocalBluetoothProfile {
    public boolean connect(BluetoothDevice device) {
        if (mService == null) return false;
        List<BluetoothDevice> connectedDevices = getConnectedDevices();
        if (connectedDevices != null) {
            for (BluetoothDevice connectedDevice : connectedDevices) {
                mService.disconnect(connectedDevice);
            }
        if (connectedDevices != null && connectedDevices.contains(device)) {
            // Connect to same device, Ignore it
            Log.d(TAG,"Ignoring Connect");
            return true;
        }
        return mService.connect(device);
    }
+0 −3
Original line number Diff line number Diff line
@@ -144,9 +144,6 @@ final class PbapClientProfile implements LocalBluetoothProfile {
                    return true;
                }
            }
            for (BluetoothDevice src : srcs) {
                mService.disconnect(src);
            }
        }
        Log.d(TAG,"PBAPClientProfile attempting to connect to " + device.getAddress());