diff options
author | Ravi Nagarajan <nravi@broadcom.com> | 2012-06-29 19:19:59 +0530 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2012-07-26 22:33:54 -0700 |
commit | 15d72a0c3338645bcc409023150aec40b08aadc1 (patch) | |
tree | e318cd27de6a375577d573b074c9d73475653830 /src/com/android/bluetooth/hid | |
parent | 74a598e0a8d50343227e3f96bbe56c6be1c240f9 (diff) | |
download | android_packages_apps_Bluetooth-15d72a0c3338645bcc409023150aec40b08aadc1.tar.gz android_packages_apps_Bluetooth-15d72a0c3338645bcc409023150aec40b08aadc1.tar.bz2 android_packages_apps_Bluetooth-15d72a0c3338645bcc409023150aec40b08aadc1.zip |
Resolve incoming pairing and connection issue
When the remote side initiates pairing & connection, occassionally
connection is made before the phone has had a chance to do SDP.
In this case, the profile priorities are not initialized, which caused
us to incorrectly reject the incoming connection. Allow connection
if priority is undefined, but device is not unpaired
Change-Id: Icd8257adea19fc9a4d3853cd85da9bd791cfe505
Conflicts:
src/com/android/bluetooth/a2dp/A2dpStateMachine.java
Diffstat (limited to 'src/com/android/bluetooth/hid')
-rwxr-xr-x | src/com/android/bluetooth/hid/HidService.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/bluetooth/hid/HidService.java b/src/com/android/bluetooth/hid/HidService.java index 5cccb0929..2ed02b7eb 100755 --- a/src/com/android/bluetooth/hid/HidService.java +++ b/src/com/android/bluetooth/hid/HidService.java @@ -125,7 +125,8 @@ public class HidService extends ProfileService { convertHalState(halState)+", prevState:"+prevState); if(halState == CONN_STATE_CONNECTED && prevState == BluetoothInputDevice.STATE_DISCONNECTED && - BluetoothProfile.PRIORITY_OFF >= getPriority(device)) { + (BluetoothProfile.PRIORITY_OFF == getPriority(device) || + device.getBondState() == BluetoothDevice.BOND_NONE)) { Log.d(TAG,"Incoming HID connection rejected"); disconnectHidNative(Utils.getByteAddress(device)); } else { |