summaryrefslogtreecommitdiffstats
path: root/core/java/android/server
diff options
context:
space:
mode:
authorJaikumar Ganesh <jaikumar@google.com>2009-09-22 09:04:03 -0700
committerJaikumar Ganesh <jaikumar@google.com>2009-09-22 12:08:49 -0700
commit7633b89443986b35a701a6f41235707de2107bd0 (patch)
tree8cd4e1a38ba690a5a1f5d1096f07bbc453b1a289 /core/java/android/server
parentdee76be487fcdc975877f85221a693b87b9669a7 (diff)
downloadframeworks_base-7633b89443986b35a701a6f41235707de2107bd0.zip
frameworks_base-7633b89443986b35a701a6f41235707de2107bd0.tar.gz
frameworks_base-7633b89443986b35a701a6f41235707de2107bd0.tar.bz2
Set the bonding for incoming connections only when authentication is requested.
Change-Id: Ic44ac0e6dedcb310b0cf47020e5c2ff3d0a4459a
Diffstat (limited to 'core/java/android/server')
-rw-r--r--core/java/android/server/BluetoothEventLoop.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/server/BluetoothEventLoop.java b/core/java/android/server/BluetoothEventLoop.java
index f9ab31c..f3bc3a6 100644
--- a/core/java/android/server/BluetoothEventLoop.java
+++ b/core/java/android/server/BluetoothEventLoop.java
@@ -247,7 +247,6 @@ class BluetoothEventLoop {
addDevice(address, properties);
}
}
- mBluetoothService.getBondState().setBondState(address, BluetoothDevice.BOND_BONDING);
return;
}
@@ -404,6 +403,9 @@ class BluetoothEventLoop {
mBluetoothService.cancelPairingUserInput(address);
return null;
}
+ // Set state to BONDING, for incoming connections it will be set here.
+ // For outgoing connections, it gets set when call createBond.
+ mBluetoothService.getBondState().setBondState(address, BluetoothDevice.BOND_BONDING);
return address;
}