summaryrefslogtreecommitdiffstats
path: root/btif/src/btif_dm.c
diff options
context:
space:
mode:
authorSyed Ibrahim M <syedibra@broadcom.com>2012-05-28 18:28:23 +0530
committerMatthew Xie <mattx@google.com>2012-07-14 11:19:21 -0700
commit001b6bbb50d8d371015efc12401ae1a2014b5f20 (patch)
tree806898e1b5542c0bb2beee1f82933fec64bc5a2c /btif/src/btif_dm.c
parent4583aa99e8985f15f81c3e069a29ac0fa7cc1f83 (diff)
downloadexternal_bluetooth_bluedroid-001b6bbb50d8d371015efc12401ae1a2014b5f20.zip
external_bluetooth_bluedroid-001b6bbb50d8d371015efc12401ae1a2014b5f20.tar.gz
external_bluetooth_bluedroid-001b6bbb50d8d371015efc12401ae1a2014b5f20.tar.bz2
Modified the BT stack to check for HID_VIRTUAL_UNPLUG SDP attribute and send a virtual unplug for all HID devices for device disconnect event;
Change-Id: I0068958800103037998eeaa01a45aad1f1605729
Diffstat (limited to 'btif/src/btif_dm.c')
-rwxr-xr-xbtif/src/btif_dm.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c
index da37db5..422927c 100755
--- a/btif/src/btif_dm.c
+++ b/btif/src/btif_dm.c
@@ -362,11 +362,11 @@ static void btif_dm_cb_hid_remote_name(tBTM_REMOTE_DEV_NAME *p_remote_name)
int remove_hid_bond(bt_bdaddr_t *bd_addr)
{
- /* For HID mouse,we did connection before pairing
- * so we need to do virtual unplug
+ /* For HID device, inorder to avoid the HID device from re-connecting again after unpairing,
+ * we need to do virtual unplug
*/
bdstr_t bdstr;
- BTIF_TRACE_DEBUG2("%s---Removing HID mouse bond--%s", __FUNCTION__,bd2str((bt_bdaddr_t *)bd_addr, &bdstr));
+ BTIF_TRACE_DEBUG2("%s---Removing HID bond--%s", __FUNCTION__,bd2str((bt_bdaddr_t *)bd_addr, &bdstr));
return btif_hh_virtual_unpug(bd_addr);
}
/*******************************************************************************
@@ -410,7 +410,9 @@ void btif_dm_cb_remove_bond(bt_bdaddr_t *bd_addr)
{
bdstr_t bdstr;
/*special handling for HID devices */
- if (check_cod(bd_addr, COD_HID_POINTING))
+ if (check_cod(bd_addr, COD_HID_POINTING) ||
+ check_cod(bd_addr, COD_HID_KEYBOARD) ||
+ check_cod(bd_addr, COD_HID_COMBO))
{
#if (defined(BTA_HH_INCLUDED) && (BTA_HH_INCLUDED == TRUE))
if(remove_hid_bond(bd_addr) != BTA_SUCCESS)