OSDN Git Service

Fix the issue where HID connection was failing on first connection randomly.
authorSyed Ibrahim M <syedibra@broadcom.com>
Thu, 31 May 2012 10:30:04 +0000 (16:00 +0530)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Tue, 17 Jul 2012 05:10:25 +0000 (22:10 -0700)
commit99a6ee18f09cf8e7ddff91d68267db21867b3cdf
tree7fcd8b429c3c455c6971c1f948e62e4d35b8134f
parente479e18951a375a548e617e86e3b1b7d121351a1
Fix the issue where HID connection was failing on first connection randomly.
Made changes in HidService to send a STATE_CONNECTING broadcast when HIDService.connect() is invoked;
Also before rejecting the incoming connection, check if the connection is transitioning from STATE_DISCONNECTED to STATE_CONNECTED and then only do a disconnectHidNative(). The normal flow of HID connect would transition from STATE_CONNECTING to STATE_CONNECTED

Change-Id: Ia416e3a70fc6c3561c3530091691367c5da2674c
src/com/android/bluetooth/hid/HidService.java