am b392c53f: Merge change Iba6fd660 into eclair

Merge commit 'b392c53f1f0bf3c757496295d5ad7a7d00ef151a' into eclair-plus-aosp

* commit 'b392c53f1f0bf3c757496295d5ad7a7d00ef151a':
  Set BondState to Bonding only if it not Bonded already.
This commit is contained in:
Jaikumar Ganesh
2009-09-30 15:29:00 -07:00
committed by Android Git Automerger

View File

@@ -403,9 +403,13 @@ 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);
// Set state to BONDING. For incoming connections it will be set here.
// For outgoing connections, it gets set when we call createBond.
// Also set it only when the state is not already Bonded, we can sometimes
// get an authorization request from the remote end if it doesn't have the link key
// while we still have it.
if (mBluetoothService.getBondState().getBondState(address) != BluetoothDevice.BOND_BONDED)
mBluetoothService.getBondState().setBondState(address, BluetoothDevice.BOND_BONDING);
return address;
}