From 7633b89443986b35a701a6f41235707de2107bd0 Mon Sep 17 00:00:00 2001 From: Jaikumar Ganesh Date: Tue, 22 Sep 2009 09:04:03 -0700 Subject: Set the bonding for incoming connections only when authentication is requested. Change-Id: Ic44ac0e6dedcb310b0cf47020e5c2ff3d0a4459a --- core/java/android/server/BluetoothEventLoop.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/java/android/server') 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; } -- cgit v1.1