Loading system/BUILD.gn +1 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ config("target_defaults") { ]), ] cflags_cc = [ "-std=c++17" ] cflags_cc = [ "-std=c++20" ] defines = [ "TARGET_FLOSS", Loading system/btif/include/core_callbacks.h +2 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ struct EventCallbacks { int packets_not_receive_count, int negative_acknowledgement_count); EventCallbacks() = default; EventCallbacks(const EventCallbacks&) = delete; EventCallbacks& operator=(const EventCallbacks&) = delete; }; Loading Loading @@ -126,6 +127,7 @@ struct HACK_ProfileInterface { // AVRCP hacks uint16_t (*AVRC_GetProfileVersion)(); HACK_ProfileInterface() = default; HACK_ProfileInterface(const HACK_ProfileInterface&) = delete; HACK_ProfileInterface& operator=(const HACK_ProfileInterface&) = delete; }; Loading system/btif/src/bluetooth.cc +48 −31 Original line number Diff line number Diff line Loading @@ -328,44 +328,61 @@ struct CoreInterfaceImpl : bluetooth::core::CoreInterface { }; static bluetooth::core::CoreInterface* CreateInterfaceToProfiles() { static auto eventCallbacks = bluetooth::core::EventCallbacks{ .invoke_adapter_state_changed_cb = invoke_adapter_state_changed_cb, .invoke_adapter_properties_cb = invoke_adapter_properties_cb, .invoke_remote_device_properties_cb = invoke_remote_device_properties_cb, .invoke_device_found_cb = invoke_device_found_cb, .invoke_discovery_state_changed_cb = invoke_discovery_state_changed_cb, .invoke_pin_request_cb = invoke_pin_request_cb, .invoke_ssp_request_cb = invoke_ssp_request_cb, .invoke_oob_data_request_cb = invoke_oob_data_request_cb, .invoke_bond_state_changed_cb = invoke_bond_state_changed_cb, .invoke_address_consolidate_cb = invoke_address_consolidate_cb, .invoke_le_address_associate_cb = invoke_le_address_associate_cb, .invoke_acl_state_changed_cb = invoke_acl_state_changed_cb, .invoke_thread_evt_cb = invoke_thread_evt_cb, .invoke_le_test_mode_cb = invoke_le_test_mode_cb, .invoke_energy_info_cb = invoke_energy_info_cb, .invoke_link_quality_report_cb = invoke_link_quality_report_cb}; static auto eventCallbacks = bluetooth::core::EventCallbacks(); static bool eventCallbacks_initialized; if (!eventCallbacks_initialized) { eventCallbacks.invoke_adapter_state_changed_cb = invoke_adapter_state_changed_cb; eventCallbacks.invoke_adapter_properties_cb = invoke_adapter_properties_cb; eventCallbacks.invoke_remote_device_properties_cb = invoke_remote_device_properties_cb; eventCallbacks.invoke_device_found_cb = invoke_device_found_cb; eventCallbacks.invoke_discovery_state_changed_cb = invoke_discovery_state_changed_cb; eventCallbacks.invoke_pin_request_cb = invoke_pin_request_cb; eventCallbacks.invoke_ssp_request_cb = invoke_ssp_request_cb; eventCallbacks.invoke_oob_data_request_cb = invoke_oob_data_request_cb; eventCallbacks.invoke_bond_state_changed_cb = invoke_bond_state_changed_cb; eventCallbacks.invoke_address_consolidate_cb = invoke_address_consolidate_cb; eventCallbacks.invoke_le_address_associate_cb = invoke_le_address_associate_cb; eventCallbacks.invoke_acl_state_changed_cb = invoke_acl_state_changed_cb; eventCallbacks.invoke_thread_evt_cb = invoke_thread_evt_cb; eventCallbacks.invoke_le_test_mode_cb = invoke_le_test_mode_cb; eventCallbacks.invoke_energy_info_cb = invoke_energy_info_cb; eventCallbacks.invoke_link_quality_report_cb = invoke_link_quality_report_cb; eventCallbacks_initialized = true; } static auto configInterface = ConfigInterfaceImpl(); static auto msbcCodecInterface = MSBCCodec(); static auto lc3CodecInterface = LC3Codec(); static auto profileInterface = bluetooth::core::HACK_ProfileInterface{ static auto profileInterface = bluetooth::core::HACK_ProfileInterface(); static bool profileInterface_initialized; if (!profileInterface_initialized) { // HID .btif_hh_connect = btif_hh_connect, .btif_hh_virtual_unplug = btif_hh_virtual_unplug, .bta_hh_read_ssr_param = bta_hh_read_ssr_param, profileInterface.btif_hh_connect = btif_hh_connect; profileInterface.btif_hh_virtual_unplug = btif_hh_virtual_unplug; profileInterface.bta_hh_read_ssr_param = bta_hh_read_ssr_param; // AVDTP .btif_av_set_dynamic_audio_buffer_size = btif_av_set_dynamic_audio_buffer_size, profileInterface.btif_av_set_dynamic_audio_buffer_size = btif_av_set_dynamic_audio_buffer_size; // ASHA .GetHearingAidDeviceCount = HearingAid::GetDeviceCount, profileInterface.GetHearingAidDeviceCount = HearingAid::GetDeviceCount; // LE Audio .IsLeAudioClientRunning = LeAudioClient::IsLeAudioClientRunning, profileInterface.IsLeAudioClientRunning = LeAudioClient::IsLeAudioClientRunning; // AVRCP .AVRC_GetProfileVersion = AVRC_GetProfileVersion}; profileInterface.AVRC_GetProfileVersion = AVRC_GetProfileVersion; profileInterface_initialized = true; } static auto interfaceForCore = CoreInterfaceImpl(&eventCallbacks, &configInterface, &msbcCodecInterface, Loading system/gd/rust/topshim/build.rs +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ fn main() { } // "-x" and "c++" must be separate due to a bug let clang_args: Vec<&str> = vec!["-x", "c++", "-std=c++17"]; let clang_args: Vec<&str> = vec!["-x", "c++", "-std=c++20"]; // The bindgen::Builder is the main entry point // to bindgen, and lets you build up options for Loading system/stack/btm/btm_ble_gap.cc +5 −2 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ #include <cstdint> #include <list> #include <memory> #include <type_traits> #include <vector> #include "bta/include/bta_api.h" Loading Loading @@ -1584,8 +1585,10 @@ static uint8_t btm_set_conn_mode_adv_init_addr( evt_type = p_cb->directed_conn; if (p_cb->directed_conn == BTM_BLE_CONNECT_DIR_EVT || p_cb->directed_conn == BTM_BLE_CONNECT_LO_DUTY_DIR_EVT) { if (static_cast<std::underlying_type_t<tBTM_BLE_EVT>>( p_cb->directed_conn) == BTM_BLE_CONNECT_DIR_EVT || static_cast<std::underlying_type_t<tBTM_BLE_EVT>>( p_cb->directed_conn) == BTM_BLE_CONNECT_LO_DUTY_DIR_EVT) { /* for privacy 1.2, convert peer address as static, own address set as ID * addr */ if (btm_cb.ble_ctr_cb.privacy_mode == BTM_PRIVACY_1_2 || Loading Loading
system/BUILD.gn +1 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ config("target_defaults") { ]), ] cflags_cc = [ "-std=c++17" ] cflags_cc = [ "-std=c++20" ] defines = [ "TARGET_FLOSS", Loading
system/btif/include/core_callbacks.h +2 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ struct EventCallbacks { int packets_not_receive_count, int negative_acknowledgement_count); EventCallbacks() = default; EventCallbacks(const EventCallbacks&) = delete; EventCallbacks& operator=(const EventCallbacks&) = delete; }; Loading Loading @@ -126,6 +127,7 @@ struct HACK_ProfileInterface { // AVRCP hacks uint16_t (*AVRC_GetProfileVersion)(); HACK_ProfileInterface() = default; HACK_ProfileInterface(const HACK_ProfileInterface&) = delete; HACK_ProfileInterface& operator=(const HACK_ProfileInterface&) = delete; }; Loading
system/btif/src/bluetooth.cc +48 −31 Original line number Diff line number Diff line Loading @@ -328,44 +328,61 @@ struct CoreInterfaceImpl : bluetooth::core::CoreInterface { }; static bluetooth::core::CoreInterface* CreateInterfaceToProfiles() { static auto eventCallbacks = bluetooth::core::EventCallbacks{ .invoke_adapter_state_changed_cb = invoke_adapter_state_changed_cb, .invoke_adapter_properties_cb = invoke_adapter_properties_cb, .invoke_remote_device_properties_cb = invoke_remote_device_properties_cb, .invoke_device_found_cb = invoke_device_found_cb, .invoke_discovery_state_changed_cb = invoke_discovery_state_changed_cb, .invoke_pin_request_cb = invoke_pin_request_cb, .invoke_ssp_request_cb = invoke_ssp_request_cb, .invoke_oob_data_request_cb = invoke_oob_data_request_cb, .invoke_bond_state_changed_cb = invoke_bond_state_changed_cb, .invoke_address_consolidate_cb = invoke_address_consolidate_cb, .invoke_le_address_associate_cb = invoke_le_address_associate_cb, .invoke_acl_state_changed_cb = invoke_acl_state_changed_cb, .invoke_thread_evt_cb = invoke_thread_evt_cb, .invoke_le_test_mode_cb = invoke_le_test_mode_cb, .invoke_energy_info_cb = invoke_energy_info_cb, .invoke_link_quality_report_cb = invoke_link_quality_report_cb}; static auto eventCallbacks = bluetooth::core::EventCallbacks(); static bool eventCallbacks_initialized; if (!eventCallbacks_initialized) { eventCallbacks.invoke_adapter_state_changed_cb = invoke_adapter_state_changed_cb; eventCallbacks.invoke_adapter_properties_cb = invoke_adapter_properties_cb; eventCallbacks.invoke_remote_device_properties_cb = invoke_remote_device_properties_cb; eventCallbacks.invoke_device_found_cb = invoke_device_found_cb; eventCallbacks.invoke_discovery_state_changed_cb = invoke_discovery_state_changed_cb; eventCallbacks.invoke_pin_request_cb = invoke_pin_request_cb; eventCallbacks.invoke_ssp_request_cb = invoke_ssp_request_cb; eventCallbacks.invoke_oob_data_request_cb = invoke_oob_data_request_cb; eventCallbacks.invoke_bond_state_changed_cb = invoke_bond_state_changed_cb; eventCallbacks.invoke_address_consolidate_cb = invoke_address_consolidate_cb; eventCallbacks.invoke_le_address_associate_cb = invoke_le_address_associate_cb; eventCallbacks.invoke_acl_state_changed_cb = invoke_acl_state_changed_cb; eventCallbacks.invoke_thread_evt_cb = invoke_thread_evt_cb; eventCallbacks.invoke_le_test_mode_cb = invoke_le_test_mode_cb; eventCallbacks.invoke_energy_info_cb = invoke_energy_info_cb; eventCallbacks.invoke_link_quality_report_cb = invoke_link_quality_report_cb; eventCallbacks_initialized = true; } static auto configInterface = ConfigInterfaceImpl(); static auto msbcCodecInterface = MSBCCodec(); static auto lc3CodecInterface = LC3Codec(); static auto profileInterface = bluetooth::core::HACK_ProfileInterface{ static auto profileInterface = bluetooth::core::HACK_ProfileInterface(); static bool profileInterface_initialized; if (!profileInterface_initialized) { // HID .btif_hh_connect = btif_hh_connect, .btif_hh_virtual_unplug = btif_hh_virtual_unplug, .bta_hh_read_ssr_param = bta_hh_read_ssr_param, profileInterface.btif_hh_connect = btif_hh_connect; profileInterface.btif_hh_virtual_unplug = btif_hh_virtual_unplug; profileInterface.bta_hh_read_ssr_param = bta_hh_read_ssr_param; // AVDTP .btif_av_set_dynamic_audio_buffer_size = btif_av_set_dynamic_audio_buffer_size, profileInterface.btif_av_set_dynamic_audio_buffer_size = btif_av_set_dynamic_audio_buffer_size; // ASHA .GetHearingAidDeviceCount = HearingAid::GetDeviceCount, profileInterface.GetHearingAidDeviceCount = HearingAid::GetDeviceCount; // LE Audio .IsLeAudioClientRunning = LeAudioClient::IsLeAudioClientRunning, profileInterface.IsLeAudioClientRunning = LeAudioClient::IsLeAudioClientRunning; // AVRCP .AVRC_GetProfileVersion = AVRC_GetProfileVersion}; profileInterface.AVRC_GetProfileVersion = AVRC_GetProfileVersion; profileInterface_initialized = true; } static auto interfaceForCore = CoreInterfaceImpl(&eventCallbacks, &configInterface, &msbcCodecInterface, Loading
system/gd/rust/topshim/build.rs +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ fn main() { } // "-x" and "c++" must be separate due to a bug let clang_args: Vec<&str> = vec!["-x", "c++", "-std=c++17"]; let clang_args: Vec<&str> = vec!["-x", "c++", "-std=c++20"]; // The bindgen::Builder is the main entry point // to bindgen, and lets you build up options for Loading
system/stack/btm/btm_ble_gap.cc +5 −2 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ #include <cstdint> #include <list> #include <memory> #include <type_traits> #include <vector> #include "bta/include/bta_api.h" Loading Loading @@ -1584,8 +1585,10 @@ static uint8_t btm_set_conn_mode_adv_init_addr( evt_type = p_cb->directed_conn; if (p_cb->directed_conn == BTM_BLE_CONNECT_DIR_EVT || p_cb->directed_conn == BTM_BLE_CONNECT_LO_DUTY_DIR_EVT) { if (static_cast<std::underlying_type_t<tBTM_BLE_EVT>>( p_cb->directed_conn) == BTM_BLE_CONNECT_DIR_EVT || static_cast<std::underlying_type_t<tBTM_BLE_EVT>>( p_cb->directed_conn) == BTM_BLE_CONNECT_LO_DUTY_DIR_EVT) { /* for privacy 1.2, convert peer address as static, own address set as ID * addr */ if (btm_cb.ble_ctr_cb.privacy_mode == BTM_PRIVACY_1_2 || Loading