Loading system/btif/src/btif_hh.cc +15 −2 Original line number Diff line number Diff line Loading @@ -127,7 +127,7 @@ void bta_hh_co_send_hid_info(btif_hh_device_t* p_dev, const char* dev_name, uint16_t version, uint8_t ctry_code, int dscp_len, uint8_t* p_dscp); void bta_hh_co_write(int fd, uint8_t* rpt, uint16_t len); void bte_hh_evt(tBTA_HH_EVT event, tBTA_HH* p_data); static void bte_hh_evt(tBTA_HH_EVT event, tBTA_HH* p_data); void btif_dm_hh_open_failed(RawAddress* bdaddr); void btif_hd_service_registration(); void btif_hh_timer_timeout(void* data); Loading Loading @@ -1174,7 +1174,7 @@ static void btif_hh_hsdata_rpt_copy_cb(uint16_t event, char* p_dest, * ******************************************************************************/ void bte_hh_evt(tBTA_HH_EVT event, tBTA_HH* p_data) { static void bte_hh_evt(tBTA_HH_EVT event, tBTA_HH* p_data) { bt_status_t status; int param_len = 0; tBTIF_COPY_CBACK* p_copy_cback = NULL; Loading Loading @@ -1900,4 +1900,17 @@ void DumpsysHid(int fd) { } } } namespace bluetooth { namespace legacy { namespace testing { void bte_hh_evt(tBTA_HH_EVT event, tBTA_HH* p_data) { ::bte_hh_evt(event, p_data); } } // namespace testing } // namespace legacy } // namespace bluetooth #undef DUMPSYS_TAG system/btif/test/btif_hh_test.cc +11 −2 Original line number Diff line number Diff line Loading @@ -47,11 +47,20 @@ module_t rust_module; const tBTA_AG_RES_DATA tBTA_AG_RES_DATA::kEmpty = {}; void bte_hh_evt(tBTA_HH_EVT event, tBTA_HH* p_data); const bthh_interface_t* btif_hh_get_interface(); bt_status_t btif_hh_connect(const RawAddress* bd_addr); bt_status_t btif_hh_virtual_unplug(const RawAddress* bd_addr); namespace bluetooth { namespace legacy { namespace testing { void bte_hh_evt(tBTA_HH_EVT event, tBTA_HH* p_data); } // namespace testing } // namespace legacy } // namespace bluetooth namespace test { namespace mock { extern bool bluetooth_shim_is_gd_stack_started_up; Loading Loading @@ -256,7 +265,7 @@ TEST_F(BtifHhWithDevice, BTA_HH_GET_RPT_EVT) { g_bthh_callbacks_get_report_promise.set_value(report); }; bte_hh_evt(BTA_HH_GET_RPT_EVT, &data); bluetooth::legacy::testing::bte_hh_evt(BTA_HH_GET_RPT_EVT, &data); osi_free(data.hs_data.rsp_data.p_rpt_data); ASSERT_EQ(std::future_status::ready, future.wait_for(2s)); Loading Loading
system/btif/src/btif_hh.cc +15 −2 Original line number Diff line number Diff line Loading @@ -127,7 +127,7 @@ void bta_hh_co_send_hid_info(btif_hh_device_t* p_dev, const char* dev_name, uint16_t version, uint8_t ctry_code, int dscp_len, uint8_t* p_dscp); void bta_hh_co_write(int fd, uint8_t* rpt, uint16_t len); void bte_hh_evt(tBTA_HH_EVT event, tBTA_HH* p_data); static void bte_hh_evt(tBTA_HH_EVT event, tBTA_HH* p_data); void btif_dm_hh_open_failed(RawAddress* bdaddr); void btif_hd_service_registration(); void btif_hh_timer_timeout(void* data); Loading Loading @@ -1174,7 +1174,7 @@ static void btif_hh_hsdata_rpt_copy_cb(uint16_t event, char* p_dest, * ******************************************************************************/ void bte_hh_evt(tBTA_HH_EVT event, tBTA_HH* p_data) { static void bte_hh_evt(tBTA_HH_EVT event, tBTA_HH* p_data) { bt_status_t status; int param_len = 0; tBTIF_COPY_CBACK* p_copy_cback = NULL; Loading Loading @@ -1900,4 +1900,17 @@ void DumpsysHid(int fd) { } } } namespace bluetooth { namespace legacy { namespace testing { void bte_hh_evt(tBTA_HH_EVT event, tBTA_HH* p_data) { ::bte_hh_evt(event, p_data); } } // namespace testing } // namespace legacy } // namespace bluetooth #undef DUMPSYS_TAG
system/btif/test/btif_hh_test.cc +11 −2 Original line number Diff line number Diff line Loading @@ -47,11 +47,20 @@ module_t rust_module; const tBTA_AG_RES_DATA tBTA_AG_RES_DATA::kEmpty = {}; void bte_hh_evt(tBTA_HH_EVT event, tBTA_HH* p_data); const bthh_interface_t* btif_hh_get_interface(); bt_status_t btif_hh_connect(const RawAddress* bd_addr); bt_status_t btif_hh_virtual_unplug(const RawAddress* bd_addr); namespace bluetooth { namespace legacy { namespace testing { void bte_hh_evt(tBTA_HH_EVT event, tBTA_HH* p_data); } // namespace testing } // namespace legacy } // namespace bluetooth namespace test { namespace mock { extern bool bluetooth_shim_is_gd_stack_started_up; Loading Loading @@ -256,7 +265,7 @@ TEST_F(BtifHhWithDevice, BTA_HH_GET_RPT_EVT) { g_bthh_callbacks_get_report_promise.set_value(report); }; bte_hh_evt(BTA_HH_GET_RPT_EVT, &data); bluetooth::legacy::testing::bte_hh_evt(BTA_HH_GET_RPT_EVT, &data); osi_free(data.hs_data.rsp_data.p_rpt_data); ASSERT_EQ(std::future_status::ready, future.wait_for(2s)); Loading