summaryrefslogtreecommitdiffstats
path: root/btif/src/btif_hh.c
diff options
context:
space:
mode:
authorZhihai Xu <zhihaixu@google.com>2013-11-15 21:18:25 -0800
committerZhihai Xu <zhihaixu@google.com>2013-12-16 13:41:53 -0800
commit03c26931a463dd079bda26bfd19f323743f57f3e (patch)
tree26163254fbc6a1375f9c05c019bfaed8af4f5cb3 /btif/src/btif_hh.c
parentcaf8deb58af8a5480d325ab443d5c49649222456 (diff)
downloadandroid_system_bt-03c26931a463dd079bda26bfd19f323743f57f3e.tar.gz
android_system_bt-03c26931a463dd079bda26bfd19f323743f57f3e.tar.bz2
android_system_bt-03c26931a463dd079bda26bfd19f323743f57f3e.zip
the HID device state is out of sync after upair.
the HID device state is out of sync between java layer and bluedroid stack after upair. This will cause the HID device can't be connected after repair. YOu can find the following error message E/HidService( 1452): Hid Device not disconnected: 00:15:9E:20:29:41 bug:11718702 Change-Id: I271bb77a2cc205c5a0ef396db86b87902d29966b
Diffstat (limited to 'btif/src/btif_hh.c')
-rw-r--r--btif/src/btif_hh.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/btif/src/btif_hh.c b/btif/src/btif_hh.c
index ee7277d68..a8420a255 100644
--- a/btif/src/btif_hh.c
+++ b/btif/src/btif_hh.c
@@ -534,6 +534,9 @@ void btif_hh_remove_device(bt_bdaddr_t bd_addr)
return;
}
+ /* need to notify up-layer device is disconnected to avoid state out of sync with up-layer */
+ HAL_CBACK(bt_hh_callbacks, connection_state_cb, &(p_dev->bd_addr), BTHH_CONN_STATE_DISCONNECTED);
+
p_dev->dev_status = BTHH_CONN_STATE_UNKNOWN;
p_dev->dev_handle = BTA_HH_INVALID_HANDLE;
if (btif_hh_cb.device_num > 0) {