diff options
| author | 2010-09-09 10:26:54 -0700 | |
|---|---|---|
| committer | 2010-09-09 10:26:54 -0700 | |
| commit | 049912b76f320c55cfe56394e520ee2c35f913b8 (patch) | |
| tree | e9e31bad4e72e7ab67f5d6fb1f5a5c9fe32e6779 | |
| parent | 8986f62b30e494b68476ff8ef81acd4b1dd22674 (diff) | |
| parent | 9395b4656aca4b00d080ada89a44631459ad7b85 (diff) | |
am 9395b465: Merge "Fix to get A2DP to connect after unpairing" into gingerbread
Merge commit '9395b4656aca4b00d080ada89a44631459ad7b85' into gingerbread-plus-aosp
* commit '9395b4656aca4b00d080ada89a44631459ad7b85':
Fix to get A2DP to connect after unpairing
| -rw-r--r-- | core/java/android/server/BluetoothEventLoop.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/java/android/server/BluetoothEventLoop.java b/core/java/android/server/BluetoothEventLoop.java index 35a582d0a8c3..05be52aa5a2d 100644 --- a/core/java/android/server/BluetoothEventLoop.java +++ b/core/java/android/server/BluetoothEventLoop.java @@ -414,7 +414,13 @@ class BluetoothEventLoop { mBluetoothService.sendUuidIntent(address); } else if (name.equals("Paired")) { if (propValues[1].equals("true")) { - mBluetoothService.getBondState().setBondState(address, BluetoothDevice.BOND_BONDED); + // If locally initiated pairing, we will + // not go to BOND_BONDED state until we have received a + // successful return value in onCreatePairedDeviceResult + if (null == mBluetoothService.getBondState().getPendingOutgoingBonding()) { + mBluetoothService.getBondState().setBondState(address, + BluetoothDevice.BOND_BONDED); + } } else { mBluetoothService.getBondState().setBondState(address, BluetoothDevice.BOND_NONE); |