Loading system/bta/hh/bta_hh_le.cc +3 −0 Original line number Diff line number Diff line Loading @@ -1780,6 +1780,9 @@ static void write_report_cb(uint16_t conn_id, tGATT_STATUS status, const gatt::Characteristic* p_char = BTA_GATTC_GetCharacteristic(conn_id, handle); if (p_char == nullptr) return; uint16_t uuid = p_char->uuid.As16Bit(); if (uuid != GATT_UUID_HID_REPORT && uuid != GATT_UUID_HID_BT_KB_INPUT && uuid != GATT_UUID_HID_BT_MOUSE_INPUT && Loading system/bta/hh/bta_hh_main.cc +4 −6 Original line number Diff line number Diff line Loading @@ -282,15 +282,13 @@ void bta_hh_sm_execute(tBTA_HH_DEV_CB* p_cb, uint16_t event, bta_hh_better_state_machine(p_cb, event, p_data); if (in_state != p_cb->state) { APPL_TRACE_DEBUG("HH State Change: [%s] -> [%s] after Event [%s]", bta_hh_state_code(in_state), bta_hh_state_code(p_cb->state), LOG_DEBUG("HHID State Change: [%s] -> [%s] after Event [%s]", bta_hh_state_code(in_state), bta_hh_state_code(p_cb->state), bta_hh_evt_code(debug_event)); } } return; } /******************************************************************************* * * Function bta_hh_hdl_event Loading system/btif/co/bta_hh_co.cc +4 −1 Original line number Diff line number Diff line Loading @@ -229,7 +229,6 @@ static inline pthread_t create_thread(void* (*start_routine)(void*), ******************************************************************************/ static void* btif_hh_poll_event_thread(void* arg) { btif_hh_device_t* p_dev = (btif_hh_device_t*)arg; APPL_TRACE_DEBUG("%s: Thread created fd = %d", __func__, p_dev->fd); struct pollfd pfds[1]; // This thread is created by bt_main_thread with RT priority. Lower the thread Loading @@ -241,7 +240,10 @@ static void* btif_hh_poll_event_thread(void* arg) { p_dev->hh_poll_thread_id = -1; return 0; } p_dev->pid = gettid(); pthread_setname_np(pthread_self(), BT_HH_THREAD); LOG_DEBUG("Host hid polling thread created name:%s pid:%d fd:%d", BT_HH_THREAD, p_dev->pid, p_dev->fd); pfds[0].fd = p_dev->fd; pfds[0].events = POLLIN; Loading @@ -265,6 +267,7 @@ static void* btif_hh_poll_event_thread(void* arg) { } p_dev->hh_poll_thread_id = -1; p_dev->pid = -1; return 0; } Loading system/btif/include/btif_hh.h +2 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ inline std::string btif_hh_status_text(const BTIF_HH_STATUS& status) { } #undef CASE_RETURN_TEXT // Shared with uhid polling thread typedef struct { bthh_connection_state_t dev_status; uint8_t dev_handle; Loading @@ -85,6 +86,7 @@ typedef struct { int fd; bool ready_for_data; pthread_t hh_poll_thread_id; pid_t pid{-1}; uint8_t hh_keep_polling; alarm_t* vup_timer; fixed_queue_t* get_rpt_id_queue; Loading system/gd/hal/hci_hal_host.cc +1 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #include "hal/hci_hal_host.h" #include <netdb.h> #include <netinet/in.h> #include <poll.h> #include <sys/socket.h> #include <sys/types.h> Loading Loading
system/bta/hh/bta_hh_le.cc +3 −0 Original line number Diff line number Diff line Loading @@ -1780,6 +1780,9 @@ static void write_report_cb(uint16_t conn_id, tGATT_STATUS status, const gatt::Characteristic* p_char = BTA_GATTC_GetCharacteristic(conn_id, handle); if (p_char == nullptr) return; uint16_t uuid = p_char->uuid.As16Bit(); if (uuid != GATT_UUID_HID_REPORT && uuid != GATT_UUID_HID_BT_KB_INPUT && uuid != GATT_UUID_HID_BT_MOUSE_INPUT && Loading
system/bta/hh/bta_hh_main.cc +4 −6 Original line number Diff line number Diff line Loading @@ -282,15 +282,13 @@ void bta_hh_sm_execute(tBTA_HH_DEV_CB* p_cb, uint16_t event, bta_hh_better_state_machine(p_cb, event, p_data); if (in_state != p_cb->state) { APPL_TRACE_DEBUG("HH State Change: [%s] -> [%s] after Event [%s]", bta_hh_state_code(in_state), bta_hh_state_code(p_cb->state), LOG_DEBUG("HHID State Change: [%s] -> [%s] after Event [%s]", bta_hh_state_code(in_state), bta_hh_state_code(p_cb->state), bta_hh_evt_code(debug_event)); } } return; } /******************************************************************************* * * Function bta_hh_hdl_event Loading
system/btif/co/bta_hh_co.cc +4 −1 Original line number Diff line number Diff line Loading @@ -229,7 +229,6 @@ static inline pthread_t create_thread(void* (*start_routine)(void*), ******************************************************************************/ static void* btif_hh_poll_event_thread(void* arg) { btif_hh_device_t* p_dev = (btif_hh_device_t*)arg; APPL_TRACE_DEBUG("%s: Thread created fd = %d", __func__, p_dev->fd); struct pollfd pfds[1]; // This thread is created by bt_main_thread with RT priority. Lower the thread Loading @@ -241,7 +240,10 @@ static void* btif_hh_poll_event_thread(void* arg) { p_dev->hh_poll_thread_id = -1; return 0; } p_dev->pid = gettid(); pthread_setname_np(pthread_self(), BT_HH_THREAD); LOG_DEBUG("Host hid polling thread created name:%s pid:%d fd:%d", BT_HH_THREAD, p_dev->pid, p_dev->fd); pfds[0].fd = p_dev->fd; pfds[0].events = POLLIN; Loading @@ -265,6 +267,7 @@ static void* btif_hh_poll_event_thread(void* arg) { } p_dev->hh_poll_thread_id = -1; p_dev->pid = -1; return 0; } Loading
system/btif/include/btif_hh.h +2 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ inline std::string btif_hh_status_text(const BTIF_HH_STATUS& status) { } #undef CASE_RETURN_TEXT // Shared with uhid polling thread typedef struct { bthh_connection_state_t dev_status; uint8_t dev_handle; Loading @@ -85,6 +86,7 @@ typedef struct { int fd; bool ready_for_data; pthread_t hh_poll_thread_id; pid_t pid{-1}; uint8_t hh_keep_polling; alarm_t* vup_timer; fixed_queue_t* get_rpt_id_queue; Loading
system/gd/hal/hci_hal_host.cc +1 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #include "hal/hci_hal_host.h" #include <netdb.h> #include <netinet/in.h> #include <poll.h> #include <sys/socket.h> #include <sys/types.h> Loading