diff options
author | Mike J. Chen <mjchen@google.com> | 2014-02-13 18:17:56 -0800 |
---|---|---|
committer | Mike J. Chen <mjchen@google.com> | 2014-02-13 18:20:04 -0800 |
commit | bf6cab9332f81f7bcd4b3040c2c1edd3062ecb40 (patch) | |
tree | d28eb68a0eb97309e926bb912bcbbd63a38fe92c /btif/src/btif_hh.c | |
parent | 597c5778ca69fec26c96bda48b83935c1a90660d (diff) | |
download | android_system_bt-bf6cab9332f81f7bcd4b3040c2c1edd3062ecb40.tar.gz android_system_bt-bf6cab9332f81f7bcd4b3040c2c1edd3062ecb40.tar.bz2 android_system_bt-bf6cab9332f81f7bcd4b3040c2c1edd3062ecb40.zip |
Don't send a dummy 0 HID event when connection is closed
This was put there by Broadcom to try to handle held keys
on disconnect, but the best place to do that is in InputManager.
There's no guarantee that a report_id 1 is keyboard, and
in particular it causes game controllers to get a false
joystick move event to 0,0.
Bug 12785130
Change-Id: I85fbafa44d927082def3848132344550e8b94bb0
Signed-off-by: Mike J. Chen <mjchen@google.com>
Diffstat (limited to 'btif/src/btif_hh.c')
-rw-r--r-- | btif/src/btif_hh.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/btif/src/btif_hh.c b/btif/src/btif_hh.c index d41cdb18c..e1b2f6906 100644 --- a/btif/src/btif_hh.c +++ b/btif/src/btif_hh.c @@ -857,12 +857,6 @@ static void btif_hh_upstreams_evt(UINT16 event, char* p_param) p_dev = btif_hh_find_connected_dev_by_handle(p_data->dev_status.handle); if (p_dev != NULL) { BTIF_TRACE_DEBUG2("%s: uhid fd = %d", __FUNCTION__, p_dev->fd); - if (p_dev->fd >= 0){ - UINT8 hidreport[9]; - memset(hidreport,0,9); - hidreport[0]=1; - bta_hh_co_write(p_dev->fd , hidreport, sizeof(hidreport)); - } if(p_dev->vup_timer_active) { btif_hh_stop_vup_timer(&(p_dev->bd_addr)); |