Loading flags/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ java_aconfig_library { cc_aconfig_library { name: "bluetooth_flags_c_lib", aconfig_declarations: "bluetooth_aconfig_flags", export_include_dirs: ["exported_include"], host_supported: true, visibility: [ "//packages/modules/Bluetooth/system:__subpackages__", Loading flags/exported_include/android_bluetooth_flags.hdeleted 100644 → 0 +0 −22 Original line number Diff line number Diff line /* * Copyright 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once #include <com_android_bluetooth_flags.h> #define IS_FLAG_ENABLED(flag_name) com::android::bluetooth::flags::flag_name() #define IS_FLAG_ENABLED_P(provider, flag_name) provider.flag_name() system/audio_hal_interface/aidl/a2dp_provider_info.cc +2 −2 Original line number Diff line number Diff line Loading @@ -19,8 +19,8 @@ #include "a2dp_provider_info.h" #include <android/binder_manager.h> #include <android_bluetooth_flags.h> #include <bluetooth/log.h> #include <com_android_bluetooth_flags.h> #include <optional> #include <vector> Loading Loading @@ -52,7 +52,7 @@ using ::aidl::android::hardware::bluetooth::audio::SessionType; ***/ std::unique_ptr<ProviderInfo> ProviderInfo::GetProviderInfo( bool supports_a2dp_hw_offload_v2) { if (!IS_FLAG_ENABLED(a2dp_offload_codec_extensibility)) { if (!com::android::bluetooth::flags::a2dp_offload_codec_extensibility()) { log::info( "a2dp offload codec extensibility is disabled," " not going to load the ProviderInfo"); Loading system/audio_hal_interface/aidl/client_interface_aidl.cc +3 −3 Original line number Diff line number Diff line Loading @@ -19,8 +19,8 @@ #include "client_interface_aidl.h" #include <android/binder_manager.h> #include <android_bluetooth_flags.h> #include <bluetooth/log.h> #include <com_android_bluetooth_flags.h> #include <thread> #include <vector> Loading Loading @@ -101,7 +101,7 @@ BluetoothAudioClientInterface::GetProviderInfo( SessionType session_type, std::shared_ptr<IBluetoothAudioProviderFactory> provider_factory) { if (!is_aidl_available() || !IS_FLAG_ENABLED(a2dp_offload_codec_extensibility)) { !com::android::bluetooth::flags::a2dp_offload_codec_extensibility()) { return std::nullopt; } Loading Loading @@ -135,7 +135,7 @@ BluetoothAudioClientInterface::GetA2dpConfiguration( std::vector<A2dpRemoteCapabilities> const& remote_capabilities, A2dpConfigurationHint const& hint) const { if (!is_aidl_available() || !IS_FLAG_ENABLED(a2dp_offload_codec_extensibility)) { !com::android::bluetooth::flags::a2dp_offload_codec_extensibility()) { return std::nullopt; } Loading system/audio_hal_interface/aidl/le_audio_software_aidl.cc +7 −6 Original line number Diff line number Diff line Loading @@ -19,8 +19,8 @@ #include "le_audio_software_aidl.h" #include <android_bluetooth_flags.h> #include <bluetooth/log.h> #include <com_android_bluetooth_flags.h> #include <atomic> #include <bitset> Loading Loading @@ -199,7 +199,7 @@ void LeAudioTransport::SetLatencyMode(LatencyMode latency_mode) { return; } if (IS_FLAG_ENABLED(leaudio_dynamic_spatial_audio)) { if (com::android::bluetooth::flags::leaudio_dynamic_spatial_audio()) { if (dsa_mode_ != prev_dsa_mode && cached_source_metadata_.tracks != nullptr && cached_source_metadata_.tracks != 0) { Loading Loading @@ -234,7 +234,7 @@ void LeAudioTransport::SourceMetadataChanged( return; } if (IS_FLAG_ENABLED(leaudio_dynamic_spatial_audio)) { if (com::android::bluetooth::flags::leaudio_dynamic_spatial_audio()) { if (cached_source_metadata_.tracks != nullptr) { free(cached_source_metadata_.tracks); cached_source_metadata_.tracks = nullptr; Loading Loading @@ -342,7 +342,8 @@ bool LeAudioTransport::IsRequestCompletedAfterUpdate( } StartRequestState LeAudioTransport::GetStartRequestState(void) { if (IS_FLAG_ENABLED(leaudio_start_request_state_mutex_check)) { if (com::android::bluetooth::flags:: leaudio_start_request_state_mutex_check()) { std::lock_guard<std::mutex> guard(start_request_state_mutex_); } return start_request_state_; Loading Loading @@ -389,7 +390,7 @@ LeAudioSinkTransport::LeAudioSinkTransport(SessionType session_type, LeAudioSinkTransport::~LeAudioSinkTransport() { delete transport_; } BluetoothAudioCtrlAck LeAudioSinkTransport::StartRequest(bool is_low_latency) { if (IS_FLAG_ENABLED(leaudio_start_stream_race_fix)) { if (com::android::bluetooth::flags::leaudio_start_stream_race_fix()) { return transport_->StartRequestV2(is_low_latency); } return transport_->StartRequest(is_low_latency); Loading Loading @@ -488,7 +489,7 @@ LeAudioSourceTransport::~LeAudioSourceTransport() { delete transport_; } BluetoothAudioCtrlAck LeAudioSourceTransport::StartRequest( bool is_low_latency) { if (IS_FLAG_ENABLED(leaudio_start_stream_race_fix)) { if (com::android::bluetooth::flags::leaudio_start_stream_race_fix()) { return transport_->StartRequestV2(is_low_latency); } return transport_->StartRequest(is_low_latency); Loading Loading
flags/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ java_aconfig_library { cc_aconfig_library { name: "bluetooth_flags_c_lib", aconfig_declarations: "bluetooth_aconfig_flags", export_include_dirs: ["exported_include"], host_supported: true, visibility: [ "//packages/modules/Bluetooth/system:__subpackages__", Loading
flags/exported_include/android_bluetooth_flags.hdeleted 100644 → 0 +0 −22 Original line number Diff line number Diff line /* * Copyright 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once #include <com_android_bluetooth_flags.h> #define IS_FLAG_ENABLED(flag_name) com::android::bluetooth::flags::flag_name() #define IS_FLAG_ENABLED_P(provider, flag_name) provider.flag_name()
system/audio_hal_interface/aidl/a2dp_provider_info.cc +2 −2 Original line number Diff line number Diff line Loading @@ -19,8 +19,8 @@ #include "a2dp_provider_info.h" #include <android/binder_manager.h> #include <android_bluetooth_flags.h> #include <bluetooth/log.h> #include <com_android_bluetooth_flags.h> #include <optional> #include <vector> Loading Loading @@ -52,7 +52,7 @@ using ::aidl::android::hardware::bluetooth::audio::SessionType; ***/ std::unique_ptr<ProviderInfo> ProviderInfo::GetProviderInfo( bool supports_a2dp_hw_offload_v2) { if (!IS_FLAG_ENABLED(a2dp_offload_codec_extensibility)) { if (!com::android::bluetooth::flags::a2dp_offload_codec_extensibility()) { log::info( "a2dp offload codec extensibility is disabled," " not going to load the ProviderInfo"); Loading
system/audio_hal_interface/aidl/client_interface_aidl.cc +3 −3 Original line number Diff line number Diff line Loading @@ -19,8 +19,8 @@ #include "client_interface_aidl.h" #include <android/binder_manager.h> #include <android_bluetooth_flags.h> #include <bluetooth/log.h> #include <com_android_bluetooth_flags.h> #include <thread> #include <vector> Loading Loading @@ -101,7 +101,7 @@ BluetoothAudioClientInterface::GetProviderInfo( SessionType session_type, std::shared_ptr<IBluetoothAudioProviderFactory> provider_factory) { if (!is_aidl_available() || !IS_FLAG_ENABLED(a2dp_offload_codec_extensibility)) { !com::android::bluetooth::flags::a2dp_offload_codec_extensibility()) { return std::nullopt; } Loading Loading @@ -135,7 +135,7 @@ BluetoothAudioClientInterface::GetA2dpConfiguration( std::vector<A2dpRemoteCapabilities> const& remote_capabilities, A2dpConfigurationHint const& hint) const { if (!is_aidl_available() || !IS_FLAG_ENABLED(a2dp_offload_codec_extensibility)) { !com::android::bluetooth::flags::a2dp_offload_codec_extensibility()) { return std::nullopt; } Loading
system/audio_hal_interface/aidl/le_audio_software_aidl.cc +7 −6 Original line number Diff line number Diff line Loading @@ -19,8 +19,8 @@ #include "le_audio_software_aidl.h" #include <android_bluetooth_flags.h> #include <bluetooth/log.h> #include <com_android_bluetooth_flags.h> #include <atomic> #include <bitset> Loading Loading @@ -199,7 +199,7 @@ void LeAudioTransport::SetLatencyMode(LatencyMode latency_mode) { return; } if (IS_FLAG_ENABLED(leaudio_dynamic_spatial_audio)) { if (com::android::bluetooth::flags::leaudio_dynamic_spatial_audio()) { if (dsa_mode_ != prev_dsa_mode && cached_source_metadata_.tracks != nullptr && cached_source_metadata_.tracks != 0) { Loading Loading @@ -234,7 +234,7 @@ void LeAudioTransport::SourceMetadataChanged( return; } if (IS_FLAG_ENABLED(leaudio_dynamic_spatial_audio)) { if (com::android::bluetooth::flags::leaudio_dynamic_spatial_audio()) { if (cached_source_metadata_.tracks != nullptr) { free(cached_source_metadata_.tracks); cached_source_metadata_.tracks = nullptr; Loading Loading @@ -342,7 +342,8 @@ bool LeAudioTransport::IsRequestCompletedAfterUpdate( } StartRequestState LeAudioTransport::GetStartRequestState(void) { if (IS_FLAG_ENABLED(leaudio_start_request_state_mutex_check)) { if (com::android::bluetooth::flags:: leaudio_start_request_state_mutex_check()) { std::lock_guard<std::mutex> guard(start_request_state_mutex_); } return start_request_state_; Loading Loading @@ -389,7 +390,7 @@ LeAudioSinkTransport::LeAudioSinkTransport(SessionType session_type, LeAudioSinkTransport::~LeAudioSinkTransport() { delete transport_; } BluetoothAudioCtrlAck LeAudioSinkTransport::StartRequest(bool is_low_latency) { if (IS_FLAG_ENABLED(leaudio_start_stream_race_fix)) { if (com::android::bluetooth::flags::leaudio_start_stream_race_fix()) { return transport_->StartRequestV2(is_low_latency); } return transport_->StartRequest(is_low_latency); Loading Loading @@ -488,7 +489,7 @@ LeAudioSourceTransport::~LeAudioSourceTransport() { delete transport_; } BluetoothAudioCtrlAck LeAudioSourceTransport::StartRequest( bool is_low_latency) { if (IS_FLAG_ENABLED(leaudio_start_stream_race_fix)) { if (com::android::bluetooth::flags::leaudio_start_stream_race_fix()) { return transport_->StartRequestV2(is_low_latency); } return transport_->StartRequest(is_low_latency); Loading