summaryrefslogtreecommitdiffstats
path: root/btif
diff options
context:
space:
mode:
authorPriti Aghera <paghera@broadcom.com>2012-05-04 14:47:26 -0700
committerMatthew Xie <mattx@google.com>2012-07-14 11:19:20 -0700
commit5ea31910ef79943ef321465e10c7707c68a49abd (patch)
treef3ac45147cb1e9335b239ab4cd790ffabd78f445 /btif
parent14d27c61fc40537f70fd6a4999db46d1864971ef (diff)
downloadexternal_bluetooth_bluedroid-5ea31910ef79943ef321465e10c7707c68a49abd.zip
external_bluetooth_bluedroid-5ea31910ef79943ef321465e10c7707c68a49abd.tar.gz
external_bluetooth_bluedroid-5ea31910ef79943ef321465e10c7707c68a49abd.tar.bz2
Fix for BLTH01416119: Cannot unpair hid mouse when it is disconnected
Change-Id: I6bca8ef4f41ea0eb6b82ac2b0df3659173f93ec0
Diffstat (limited to 'btif')
-rwxr-xr-xbtif/src/btif_hh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/btif/src/btif_hh.c b/btif/src/btif_hh.c
index 788e4c6..ef1e907 100755
--- a/btif/src/btif_hh.c
+++ b/btif/src/btif_hh.c
@@ -400,7 +400,7 @@ bt_status_t btif_hh_virtual_unpug(bt_bdaddr_t *bd_addr)
bd_addr->address[0], bd_addr->address[1], bd_addr->address[2], bd_addr->address[3],
bd_addr->address[4], bd_addr->address[5]);
p_dev = btif_hh_find_dev_by_bda(bd_addr);
- if (p_dev != NULL)
+ if ((p_dev != NULL) && (p_dev->dev_status == BTHH_CONN_STATE_CONNECTED))
{
BTIF_TRACE_DEBUG1("%s Sending BTA_HH_CTRL_VIRTUAL_CABLE_UNPLUG", __FUNCTION__);
BTA_HhSendCtrl(p_dev->dev_handle, BTA_HH_CTRL_VIRTUAL_CABLE_UNPLUG);