summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
authorJaikumar Ganesh <jaikumar@google.com>2010-09-09 10:23:55 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-09-09 10:23:55 -0700
commit9395b4656aca4b00d080ada89a44631459ad7b85 (patch)
tree2fac2ecc541da42e1d15ce1b7873898dca89cf2a /core/java/android
parentf3de053c0a525f85f763ab9b8781ae95ef3e930e (diff)
parent4226415bd9f376c41d85f4cd2e11da59a866d241 (diff)
downloadframeworks_base-9395b4656aca4b00d080ada89a44631459ad7b85.zip
frameworks_base-9395b4656aca4b00d080ada89a44631459ad7b85.tar.gz
frameworks_base-9395b4656aca4b00d080ada89a44631459ad7b85.tar.bz2
Merge "Fix to get A2DP to connect after unpairing" into gingerbread
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/server/BluetoothEventLoop.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/java/android/server/BluetoothEventLoop.java b/core/java/android/server/BluetoothEventLoop.java
index e1d3f13..094258b 100644
--- a/core/java/android/server/BluetoothEventLoop.java
+++ b/core/java/android/server/BluetoothEventLoop.java
@@ -404,7 +404,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);