summaryrefslogtreecommitdiffstats
path: root/btif/src/btif_hh.c
diff options
context:
space:
mode:
authorAndre Eisenbach <eisenbach@google.com>2015-09-17 15:16:20 -0700
committerAndre Eisenbach <eisenbach@google.com>2015-09-17 15:32:52 -0700
commitef7d8cb8b012e77c9b0c596c5ad4b0ffb7e5dde9 (patch)
treec22fb15081ec9974e435d07fc4e9fb0c5d2db41a /btif/src/btif_hh.c
parent03ca189412e3f8ec7c5963339af172c9276b3b9b (diff)
downloadandroid_system_bt-ef7d8cb8b012e77c9b0c596c5ad4b0ffb7e5dde9.tar.gz
android_system_bt-ef7d8cb8b012e77c9b0c596c5ad4b0ffb7e5dde9.tar.bz2
android_system_bt-ef7d8cb8b012e77c9b0c596c5ad4b0ffb7e5dde9.zip
Change UHID socket to be non-blocking
On some platforms, the logs indicate that the BTU task is stalled by UHID driver when writing the HID descriptor to the kernel. This patch converts the UHID socket to non-blocking to avoid stalling the main BTU task. Bug: 23978964 Change-Id: I5a7a3e106fb2c967d68f077faedcd4fe62bbd912
Diffstat (limited to 'btif/src/btif_hh.c')
-rw-r--r--btif/src/btif_hh.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/btif/src/btif_hh.c b/btif/src/btif_hh.c
index 3b9220aef..633975d5d 100644
--- a/btif/src/btif_hh.c
+++ b/btif/src/btif_hh.c
@@ -527,6 +527,8 @@ void btif_hh_remove_device(bt_bdaddr_t bd_addr)
p_dev->dev_status = BTHH_CONN_STATE_UNKNOWN;
p_dev->dev_handle = BTA_HH_INVALID_HANDLE;
+ p_dev->ready_for_data = FALSE;
+
if (btif_hh_cb.device_num > 0) {
btif_hh_cb.device_num--;
}