Merge "Don't disconnect an A2DP device when connecting to same device"

This commit is contained in:
Treehugger Robot
2016-11-17 06:58:42 +00:00
committed by Gerrit Code Review

View File

@@ -116,6 +116,10 @@ public final class A2dpProfile implements LocalBluetoothProfile {
List<BluetoothDevice> sinks = getConnectedDevices();
if (sinks != null) {
for (BluetoothDevice sink : sinks) {
if (sink.equals(device)) {
Log.w(TAG, "Connecting to device " + device + " : disconnect skipped");
continue;
}
mService.disconnect(sink);
}
}