Loading system/btif/avrcp/avrcp_service.cc +4 −1 Original line number Diff line number Diff line Loading @@ -55,6 +55,8 @@ class A2dpInterfaceImpl : public A2dpInterface { class AvrcpInterfaceImpl : public AvrcpInterface { public: uint16_t GetAvrcpControlVersion() { return AVRC_GetControlProfileVersion(); } uint16_t GetAvrcpVersion() { return AVRC_GetProfileVersion(); } Loading Loading @@ -312,7 +314,8 @@ void AvrcpService::Init(MediaInterface* media_interface, avrcp_interface_.AddRecord(UUID_SERVCLASS_AV_REMOTE_CONTROL, "AV Remote Control", NULL, AVRCP_SUPF_TG_CT, ct_sdp_record_handle, false, AVRC_REV_1_3, 0); ct_sdp_record_handle, false, avrcp_interface_.GetAvrcpControlVersion(), 0); bta_sys_add_uuid(UUID_SERVCLASS_AV_REMOTE_CONTROL); media_interface_ = new MediaInterfaceWrapper(media_interface); Loading system/gd/sysprops/sysprops_module.cc +2 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,8 @@ void SyspropsModule::parse_config(std::string file_path) { "bluetooth.core.le.inquiry_scan_window", // SCO "bluetooth.sco.disable_enhanced_connection", // Profile "persist.bluetooth.avrcpcontrolversion", }; auto config = storage::LegacyConfigFile::FromPath(file_path).Read(kDefaultCapacity); Loading system/stack/avrc/avrc_api.cc +28 −0 Original line number Diff line number Diff line Loading @@ -948,6 +948,34 @@ static BT_HDR* avrc_pass_msg(tAVRC_MSG_PASS* p_msg) { return p_cmd; } /****************************************************************************** * * Function ARVC_GetControlProfileVersion * * Description Get the AVRCP profile version * * Returns The AVRCP control profile version * *****************************************************************************/ uint16_t AVRC_GetControlProfileVersion() { uint16_t profile_version = AVRC_REV_1_3; char avrcp_version[PROPERTY_VALUE_MAX] = {0}; osi_property_get(AVRC_CONTROL_VERSION_PROPERTY, avrcp_version, AVRC_1_3_STRING); if (!strncmp(AVRC_1_6_STRING, avrcp_version, sizeof(AVRC_1_6_STRING))) { profile_version = AVRC_REV_1_6; } else if (!strncmp(AVRC_1_5_STRING, avrcp_version, sizeof(AVRC_1_5_STRING))) { profile_version = AVRC_REV_1_5; } else if (!strncmp(AVRC_1_4_STRING, avrcp_version, sizeof(AVRC_1_4_STRING))) { profile_version = AVRC_REV_1_4; } return profile_version; } /****************************************************************************** * * Function ARVC_GetProfileVersion Loading system/stack/include/avrc_api.h +16 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,11 @@ #define AVRC_VERSION_PROPERTY "persist.bluetooth.avrcpversion" #endif /* Configurable avrcp control version key */ #ifndef AVRC_CONTROL_VERSION_PROPERTY #define AVRC_CONTROL_VERSION_PROPERTY "persist.bluetooth.avrcpcontrolversion" #endif #ifndef AVRC_1_6_STRING #define AVRC_1_6_STRING "avrcp16" #endif Loading Loading @@ -237,6 +242,17 @@ typedef struct { * external function declarations ****************************************************************************/ /****************************************************************************** * * Function AVRC_GetControlProfileVersion * * Description Get the overlaid AVRCP control profile version * * Returns The AVRCP control profile version * *****************************************************************************/ extern uint16_t AVRC_GetControlProfileVersion(); /****************************************************************************** * * Function ARVC_GetProfileVersion Loading system/test/mock/mock_stack_avrc_api.cc +4 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,10 @@ uint16_t AVRC_CloseBrowse(uint8_t handle) { mock_function_count_map[__func__]++; return 0; } uint16_t AVRC_GetControlProfileVersion() { mock_function_count_map[__func__]++; return 0; } uint16_t AVRC_GetProfileVersion() { mock_function_count_map[__func__]++; return 0; Loading Loading
system/btif/avrcp/avrcp_service.cc +4 −1 Original line number Diff line number Diff line Loading @@ -55,6 +55,8 @@ class A2dpInterfaceImpl : public A2dpInterface { class AvrcpInterfaceImpl : public AvrcpInterface { public: uint16_t GetAvrcpControlVersion() { return AVRC_GetControlProfileVersion(); } uint16_t GetAvrcpVersion() { return AVRC_GetProfileVersion(); } Loading Loading @@ -312,7 +314,8 @@ void AvrcpService::Init(MediaInterface* media_interface, avrcp_interface_.AddRecord(UUID_SERVCLASS_AV_REMOTE_CONTROL, "AV Remote Control", NULL, AVRCP_SUPF_TG_CT, ct_sdp_record_handle, false, AVRC_REV_1_3, 0); ct_sdp_record_handle, false, avrcp_interface_.GetAvrcpControlVersion(), 0); bta_sys_add_uuid(UUID_SERVCLASS_AV_REMOTE_CONTROL); media_interface_ = new MediaInterfaceWrapper(media_interface); Loading
system/gd/sysprops/sysprops_module.cc +2 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,8 @@ void SyspropsModule::parse_config(std::string file_path) { "bluetooth.core.le.inquiry_scan_window", // SCO "bluetooth.sco.disable_enhanced_connection", // Profile "persist.bluetooth.avrcpcontrolversion", }; auto config = storage::LegacyConfigFile::FromPath(file_path).Read(kDefaultCapacity); Loading
system/stack/avrc/avrc_api.cc +28 −0 Original line number Diff line number Diff line Loading @@ -948,6 +948,34 @@ static BT_HDR* avrc_pass_msg(tAVRC_MSG_PASS* p_msg) { return p_cmd; } /****************************************************************************** * * Function ARVC_GetControlProfileVersion * * Description Get the AVRCP profile version * * Returns The AVRCP control profile version * *****************************************************************************/ uint16_t AVRC_GetControlProfileVersion() { uint16_t profile_version = AVRC_REV_1_3; char avrcp_version[PROPERTY_VALUE_MAX] = {0}; osi_property_get(AVRC_CONTROL_VERSION_PROPERTY, avrcp_version, AVRC_1_3_STRING); if (!strncmp(AVRC_1_6_STRING, avrcp_version, sizeof(AVRC_1_6_STRING))) { profile_version = AVRC_REV_1_6; } else if (!strncmp(AVRC_1_5_STRING, avrcp_version, sizeof(AVRC_1_5_STRING))) { profile_version = AVRC_REV_1_5; } else if (!strncmp(AVRC_1_4_STRING, avrcp_version, sizeof(AVRC_1_4_STRING))) { profile_version = AVRC_REV_1_4; } return profile_version; } /****************************************************************************** * * Function ARVC_GetProfileVersion Loading
system/stack/include/avrc_api.h +16 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,11 @@ #define AVRC_VERSION_PROPERTY "persist.bluetooth.avrcpversion" #endif /* Configurable avrcp control version key */ #ifndef AVRC_CONTROL_VERSION_PROPERTY #define AVRC_CONTROL_VERSION_PROPERTY "persist.bluetooth.avrcpcontrolversion" #endif #ifndef AVRC_1_6_STRING #define AVRC_1_6_STRING "avrcp16" #endif Loading Loading @@ -237,6 +242,17 @@ typedef struct { * external function declarations ****************************************************************************/ /****************************************************************************** * * Function AVRC_GetControlProfileVersion * * Description Get the overlaid AVRCP control profile version * * Returns The AVRCP control profile version * *****************************************************************************/ extern uint16_t AVRC_GetControlProfileVersion(); /****************************************************************************** * * Function ARVC_GetProfileVersion Loading
system/test/mock/mock_stack_avrc_api.cc +4 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,10 @@ uint16_t AVRC_CloseBrowse(uint8_t handle) { mock_function_count_map[__func__]++; return 0; } uint16_t AVRC_GetControlProfileVersion() { mock_function_count_map[__func__]++; return 0; } uint16_t AVRC_GetProfileVersion() { mock_function_count_map[__func__]++; return 0; Loading