Loading system/stack/sdp/sdp_db.cc +1 −3 Original line number Diff line number Diff line Loading @@ -35,12 +35,10 @@ #include "stack/include/bt_types.h" #include "stack/include/bt_uuid16.h" #include "stack/include/sdpdefs.h" #include "stack/sdp/internal/sdp_api.h" #include "stack/sdp/sdp_discovery_db.h" #include "stack/sdp/sdpint.h" // TODO(b/369381361) Enfore -Wmissing-prototypes #pragma GCC diagnostic ignored "-Wmissing-prototypes" using namespace bluetooth; /******************************************************************************* Loading system/stack/sdp/sdp_discovery.cc +1 −4 Original line number Diff line number Diff line Loading @@ -38,9 +38,6 @@ #include "types/bluetooth/uuid.h" #include "types/raw_address.h" // TODO(b/369381361) Enfore -Wmissing-prototypes #pragma GCC diagnostic ignored "-Wmissing-prototypes" using bluetooth::Uuid; using namespace bluetooth; Loading Loading @@ -252,7 +249,7 @@ static bool sdp_copy_raw_data(tCONN_CB* p_ccb, bool offset) { * Returns pointer to next byte in data stream * ******************************************************************************/ tSDP_DISC_REC* add_record(tSDP_DISCOVERY_DB* p_db, const RawAddress& bd_addr) { static tSDP_DISC_REC* add_record(tSDP_DISCOVERY_DB* p_db, const RawAddress& bd_addr) { tSDP_DISC_REC* p_rec; /* See if there is enough space in the database */ Loading system/stack/sdp/sdp_server.cc +1 −4 Original line number Diff line number Diff line Loading @@ -61,9 +61,6 @@ #define PBAP_1_2 0x0102 #define PBAP_1_2_BL_LEN 14 // TODO(b/369381361) Enfore -Wmissing-prototypes #pragma GCC diagnostic ignored "-Wmissing-prototypes" using namespace bluetooth; /* Used to set PBAP local SDP device record for PBAP 1.2 upgrade */ Loading Loading @@ -163,7 +160,7 @@ bool sdp_dynamic_change_hfp_version(const tSDP_ATTRIBUTE* p_attr, * Returns void * *****************************************************************************/ void hfp_fallback(bool& is_hfp_fallback, const tSDP_ATTRIBUTE* p_attr) { static void hfp_fallback(bool& is_hfp_fallback, const tSDP_ATTRIBUTE* p_attr) { /* Update HFP version back to 1.6 */ p_attr->value_ptr[PROFILE_VERSION_POSITION] = HFP_PROFILE_MINOR_VERSION_6; log::verbose("Restore HFP version to 1.6"); Loading system/stack/sdp/sdpint.h +4 −6 Original line number Diff line number Diff line Loading @@ -292,19 +292,17 @@ bool sdpu_process_pend_ccb_new_cid(const tCONN_CB& ccb); void sdpu_clear_pend_ccb(const tCONN_CB& ccb); void sdpu_callback(const tCONN_CB& ccb, tSDP_REASON reason); /* Functions provided by sdp_db.cc */ /* Functions provided by sdp_db.cc */ const tSDP_RECORD* sdp_db_service_search(const tSDP_RECORD* p_rec, const tSDP_UUID_SEQ* p_seq); tSDP_RECORD* sdp_db_find_record(uint32_t handle); const tSDP_ATTRIBUTE* sdp_db_find_attr_in_rec(const tSDP_RECORD* p_rec, uint16_t start_attr, uint16_t end_attr); /* Functions provided by sdp_server.cc */ /* Functions provided by sdp_server.cc */ void sdp_server_handle_client_req(tCONN_CB* p_ccb, BT_HDR* p_msg); bool sdp_dynamic_change_hfp_version(const tSDP_ATTRIBUTE* p_attr, const RawAddress& remote_address); /* Functions provided by sdp_discovery.cc */ /* Functions provided by sdp_discovery.cc */ void sdp_disc_connected(tCONN_CB* p_ccb); void sdp_disc_server_rsp(tCONN_CB* p_ccb, BT_HDR* p_msg); Loading system/stack/test/sdp/stack_sdp_utils_test.cc +1 −7 Original line number Diff line number Diff line Loading @@ -64,9 +64,6 @@ using ::testing::ReturnArg; using ::testing::SaveArg; using ::testing::SetArrayArgument; bool sdp_dynamic_change_hfp_version(const tSDP_ATTRIBUTE* p_attr, const RawAddress& remote_address); void hfp_fallback(bool& is_hfp_fallback, const tSDP_ATTRIBUTE* p_attr); void sdp_callback(const RawAddress& bd_addr, tSDP_RESULT result); tCONN_CB* find_ccb(uint16_t cid, uint8_t state); Loading Loading @@ -577,10 +574,7 @@ TEST_F(StackSdpUtilsTest, check_HFP_version_fallback_success) { EXPECT_CALL(*localIopMock, InteropMatchAddrOrName(INTEROP_HFP_1_9_ALLOWLIST, &bdaddr, &btif_storage_get_remote_device_property)) .WillOnce(Return(true)); bool is_hfp_fallback = sdp_dynamic_change_hfp_version(&hfp_attr, bdaddr); ASSERT_EQ(hfp_attr.value_ptr[PROFILE_VERSION_POSITION], HFP_PROFILE_MINOR_VERSION_7); hfp_fallback(is_hfp_fallback, &hfp_attr); ASSERT_EQ(hfp_attr.value_ptr[PROFILE_VERSION_POSITION], HFP_PROFILE_MINOR_VERSION_6); ASSERT_TRUE(sdp_dynamic_change_hfp_version(&hfp_attr, bdaddr)); } TEST_F(StackSdpUtilsTest, sdpu_compare_uuid_with_attr_u16) { Loading Loading
system/stack/sdp/sdp_db.cc +1 −3 Original line number Diff line number Diff line Loading @@ -35,12 +35,10 @@ #include "stack/include/bt_types.h" #include "stack/include/bt_uuid16.h" #include "stack/include/sdpdefs.h" #include "stack/sdp/internal/sdp_api.h" #include "stack/sdp/sdp_discovery_db.h" #include "stack/sdp/sdpint.h" // TODO(b/369381361) Enfore -Wmissing-prototypes #pragma GCC diagnostic ignored "-Wmissing-prototypes" using namespace bluetooth; /******************************************************************************* Loading
system/stack/sdp/sdp_discovery.cc +1 −4 Original line number Diff line number Diff line Loading @@ -38,9 +38,6 @@ #include "types/bluetooth/uuid.h" #include "types/raw_address.h" // TODO(b/369381361) Enfore -Wmissing-prototypes #pragma GCC diagnostic ignored "-Wmissing-prototypes" using bluetooth::Uuid; using namespace bluetooth; Loading Loading @@ -252,7 +249,7 @@ static bool sdp_copy_raw_data(tCONN_CB* p_ccb, bool offset) { * Returns pointer to next byte in data stream * ******************************************************************************/ tSDP_DISC_REC* add_record(tSDP_DISCOVERY_DB* p_db, const RawAddress& bd_addr) { static tSDP_DISC_REC* add_record(tSDP_DISCOVERY_DB* p_db, const RawAddress& bd_addr) { tSDP_DISC_REC* p_rec; /* See if there is enough space in the database */ Loading
system/stack/sdp/sdp_server.cc +1 −4 Original line number Diff line number Diff line Loading @@ -61,9 +61,6 @@ #define PBAP_1_2 0x0102 #define PBAP_1_2_BL_LEN 14 // TODO(b/369381361) Enfore -Wmissing-prototypes #pragma GCC diagnostic ignored "-Wmissing-prototypes" using namespace bluetooth; /* Used to set PBAP local SDP device record for PBAP 1.2 upgrade */ Loading Loading @@ -163,7 +160,7 @@ bool sdp_dynamic_change_hfp_version(const tSDP_ATTRIBUTE* p_attr, * Returns void * *****************************************************************************/ void hfp_fallback(bool& is_hfp_fallback, const tSDP_ATTRIBUTE* p_attr) { static void hfp_fallback(bool& is_hfp_fallback, const tSDP_ATTRIBUTE* p_attr) { /* Update HFP version back to 1.6 */ p_attr->value_ptr[PROFILE_VERSION_POSITION] = HFP_PROFILE_MINOR_VERSION_6; log::verbose("Restore HFP version to 1.6"); Loading
system/stack/sdp/sdpint.h +4 −6 Original line number Diff line number Diff line Loading @@ -292,19 +292,17 @@ bool sdpu_process_pend_ccb_new_cid(const tCONN_CB& ccb); void sdpu_clear_pend_ccb(const tCONN_CB& ccb); void sdpu_callback(const tCONN_CB& ccb, tSDP_REASON reason); /* Functions provided by sdp_db.cc */ /* Functions provided by sdp_db.cc */ const tSDP_RECORD* sdp_db_service_search(const tSDP_RECORD* p_rec, const tSDP_UUID_SEQ* p_seq); tSDP_RECORD* sdp_db_find_record(uint32_t handle); const tSDP_ATTRIBUTE* sdp_db_find_attr_in_rec(const tSDP_RECORD* p_rec, uint16_t start_attr, uint16_t end_attr); /* Functions provided by sdp_server.cc */ /* Functions provided by sdp_server.cc */ void sdp_server_handle_client_req(tCONN_CB* p_ccb, BT_HDR* p_msg); bool sdp_dynamic_change_hfp_version(const tSDP_ATTRIBUTE* p_attr, const RawAddress& remote_address); /* Functions provided by sdp_discovery.cc */ /* Functions provided by sdp_discovery.cc */ void sdp_disc_connected(tCONN_CB* p_ccb); void sdp_disc_server_rsp(tCONN_CB* p_ccb, BT_HDR* p_msg); Loading
system/stack/test/sdp/stack_sdp_utils_test.cc +1 −7 Original line number Diff line number Diff line Loading @@ -64,9 +64,6 @@ using ::testing::ReturnArg; using ::testing::SaveArg; using ::testing::SetArrayArgument; bool sdp_dynamic_change_hfp_version(const tSDP_ATTRIBUTE* p_attr, const RawAddress& remote_address); void hfp_fallback(bool& is_hfp_fallback, const tSDP_ATTRIBUTE* p_attr); void sdp_callback(const RawAddress& bd_addr, tSDP_RESULT result); tCONN_CB* find_ccb(uint16_t cid, uint8_t state); Loading Loading @@ -577,10 +574,7 @@ TEST_F(StackSdpUtilsTest, check_HFP_version_fallback_success) { EXPECT_CALL(*localIopMock, InteropMatchAddrOrName(INTEROP_HFP_1_9_ALLOWLIST, &bdaddr, &btif_storage_get_remote_device_property)) .WillOnce(Return(true)); bool is_hfp_fallback = sdp_dynamic_change_hfp_version(&hfp_attr, bdaddr); ASSERT_EQ(hfp_attr.value_ptr[PROFILE_VERSION_POSITION], HFP_PROFILE_MINOR_VERSION_7); hfp_fallback(is_hfp_fallback, &hfp_attr); ASSERT_EQ(hfp_attr.value_ptr[PROFILE_VERSION_POSITION], HFP_PROFILE_MINOR_VERSION_6); ASSERT_TRUE(sdp_dynamic_change_hfp_version(&hfp_attr, bdaddr)); } TEST_F(StackSdpUtilsTest, sdpu_compare_uuid_with_attr_u16) { Loading