OSDN Git Service

PBAP connect to alternate device.
authorJoseph Pirozzo <pirozzoj@google.com>
Tue, 5 Apr 2016 21:50:20 +0000 (14:50 -0700)
committerJoseph Pirozzo <pirozzoj@google.com>
Tue, 5 Apr 2016 21:50:20 +0000 (14:50 -0700)
Fix connect to first disconnect from all connected devices before
attempting to connect to a new device for PBAP Client.

Bug: 28003503
Change-Id: I1299fc146c881f359832dae2da814a4aebbfec59

packages/SettingsLib/src/com/android/settingslib/bluetooth/PbapClientProfile.java

index aa95be2..d7c9eab 100755 (executable)
@@ -144,7 +144,9 @@ final class PbapClientProfile implements LocalBluetoothProfile {
                     return true;
                 }
             }
-            mService.disconnect(device);
+            for (BluetoothDevice src : srcs) {
+                mService.disconnect(device);
+            }
         }
         Log.d(TAG,"PBAPClientProfile attempting to connect to " + device.getAddress());