blob: 5541b6b10b1451941f034bae204ccf02347c7231 [file] [log] [blame]
// Bluetooth Audio library for target
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "system_bt_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["system_bt_license"],
}
cc_library_static {
name: "libbt-audio-hal-interface",
defaults: [
"fluoride_defaults",
"latest_android_hardware_bluetooth_audio_ndk_android_shared",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/bta/include",
"packages/modules/Bluetooth/system/bta/sys",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/stack/include",
],
shared_libs: [
"android.hardware.bluetooth.audio@2.0",
"android.hardware.bluetooth.audio@2.1",
"libhidlbase",
"libutils",
],
static_libs: [
"bluetooth_flags_c_lib",
"libbluetooth_hci_pdl",
"libbluetooth_log",
"libbluetooth_metrics",
"libbluetooth_types",
"libbt-common",
"libosi",
],
target: {
android: {
shared_libs: [
"libbinder_ndk",
"libfmq",
],
srcs: [
"a2dp_encoding.cc",
"aidl/a2dp/a2dp_encoding_aidl.cc",
"aidl/a2dp/a2dp_encoding_aidl_utils.cc",
"aidl/a2dp/a2dp_provider_info.cc",
"aidl/a2dp/bluetooth_audio_port_impl.cc",
"aidl/a2dp/client_interface_aidl.cc",
"aidl/a2dp/codec_status_aidl.cc",
"aidl/bluetooth_audio_port_impl.cc",
"aidl/client_interface_aidl.cc",
"aidl/hearing_aid_software_encoding_aidl.cc",
"aidl/hfp_client_interface_aidl.cc",
"aidl/le_audio_software_aidl.cc",
"aidl/le_audio_utils.cc",
"aidl/provider_info.cc",
"hal_version_manager.cc",
"hearing_aid_software_encoding.cc",
"hfp_client_interface.cc",
"hidl/a2dp_encoding_hidl.cc",
"hidl/client_interface_hidl.cc",
"hidl/codec_status_hidl.cc",
"hidl/hearing_aid_software_encoding_hidl.cc",
"hidl/le_audio_software_hidl.cc",
"le_audio_software.cc",
],
},
host: {
srcs: [
"a2dp_encoding_host.cc",
"hal_version_manager_host.cc",
"hearing_aid_software_encoding_host.cc",
"hfp_client_interface_host.cc",
"le_audio_software_host.cc",
"le_audio_software_host_transport.cc",
],
},
},
host_supported: true,
apex_available: ["com.android.bt"],
min_sdk_version: "36",
header_libs: ["libbluetooth_headers"],
}
// Bluetooth Audio A2dp Encoding AIDL unit tests
cc_test {
name: "bluetooth-test-audio-hal-a2dp",
test_suites: ["general-tests"],
defaults: [
"fluoride_defaults",
"latest_android_hardware_audio_common_ndk_static",
"latest_android_hardware_bluetooth_audio_ndk_static",
"latest_android_media_audio_common_types_ndk_static",
"mts_defaults",
],
cflags: [
"-DUNIT_TESTS",
],
host_supported: true,
test_options: {
unit_test: true,
},
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/audio_hal_interface",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/stack/include",
],
sanitize: {
cfi: true,
scs: true,
address: true,
all_undefined: true,
integer_overflow: true,
diag: {
undefined: true,
},
},
srcs: [
":TestCommonMockFunctions",
":TestMockAudioHalInterface",
":TestMockStackA2dp",
"aidl/a2dp/a2dp_encoding_aidl_utils.cc",
"aidl/a2dp/a2dp_provider_info.cc",
"aidl/a2dp/a2dp_provider_info_unittest.cc",
"test/a2dp_encoding_aidl_utils_unittest.cc",
],
shared_libs: [
"libaconfig_storage_read_api_cc",
"libbinder_ndk",
"libcutils",
"libhidlbase",
"liblog",
"libutils",
"server_configurable_flags",
],
static_libs: [
"android.hardware.audio.common@5.0",
"android.hardware.bluetooth.audio@2.0",
"android.hardware.bluetooth.audio@2.1",
"android.hardware.bluetooth@1.0",
"android.hardware.bluetooth@1.1",
"android.hardware.common-V2-ndk",
"android.hardware.common.fmq-V1-ndk",
"bluetooth_flags_c_lib_for_test",
"libbase",
"libbluetooth_log",
"libbluetooth_types",
"libbt-common",
"libchrome",
"libcom.android.sysprop.bluetooth.wrapped",
"libflagtest",
"libfmq",
"libgmock",
"libgtest",
"libosi",
],
header_libs: ["libbluetooth_headers"],
}
cc_defaults {
name: "libbt_audio_hal_interface_test_defaults",
header_libs: [
"avrcp_headers",
"libbluetooth_headers",
],
defaults: [
"aconfig_lib_cc_shared_link.defaults",
"bluetooth_cflags",
"latest_android_hardware_audio_common_ndk_static",
"latest_android_hardware_bluetooth_audio_ndk_static",
"latest_android_media_audio_common_types_ndk_static",
],
shared_libs: [
"libPlatformProperties",
"libbinder_ndk",
"libcrypto",
"libfmq",
"libz",
"server_configurable_flags",
],
static_libs: [
"android.hardware.audio.common@5.0",
"android.hardware.bluetooth.audio@2.0",
"android.hardware.bluetooth.audio@2.1",
"android.hardware.bluetooth@1.0",
"android.hardware.bluetooth@1.1",
"android.hardware.common-V2-ndk",
"android.hardware.common.fmq-V1-ndk",
"libFraunhoferAAC",
"libbase",
"libbluetooth_core_rs",
"libbluetooth_crypto_toolbox",
"libbluetooth_gd",
"libbluetooth_log",
"libbluetooth_metrics_mock",
"libbluetooth_types",
"libbt-common", // needed for MessageLoopThread
"libbt-jni-thread",
"libbt-sbc-decoder",
"libbt-sbc-encoder",
"libbt-stack",
"libbtcore",
"libbtdevice",
"libbte",
"libbtif",
"libchrome",
"libcom.android.sysprop.bluetooth.wrapped",
"libcutils",
"libevent",
"libg722codec",
"libgmock",
"libgtest",
"libhidlbase",
"libjsoncpp",
"liblc3",
"liblog",
"libopus",
"libosi",
"libprotobuf-cpp-lite",
"libudrv-uipc",
"libutils",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/bta/include",
"packages/modules/Bluetooth/system/btif",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/stack/include",
],
}
// Bluetooth Audio client interface library unit tests
cc_test {
name: "bluetooth-test-audio-hal-aidl-leaudio-utils",
test_suites: ["general-tests"],
host_supported: true,
defaults: [
"fluoride_defaults",
"latest_android_hardware_audio_common_ndk_static",
"latest_android_hardware_bluetooth_audio_ndk_static",
"latest_android_media_audio_common_types_ndk_static",
"mts_defaults",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/bta/include",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/stack/include",
],
srcs: [
"aidl/le_audio_utils.cc",
"aidl/le_audio_utils_unittest.cc",
],
shared_libs: [
"libaconfig_storage_read_api_cc",
"libbase",
"libbinder_ndk",
"libcutils",
"libfmq",
"liblog",
"libutils",
"server_configurable_flags",
],
static_libs: [
"android.hardware.common-V2-ndk",
"android.hardware.common.fmq-V1-ndk",
"bluetooth_flags_c_lib_for_test",
"libbluetooth_log",
"libbluetooth_types",
"libbt-bta",
"libbt-common",
"libchrome",
"libevent",
"libgmock",
"libgtest",
"server_configurable_flags",
],
cflags: [
"-DBUILDCFG",
],
header_libs: ["libbluetooth_headers"],
}
// Bluetooth Audio client interface library unit tests
cc_test {
name: "bluetooth-test-audio-hal-le-audio-software",
test_suites: ["general-tests"],
host_supported: true,
defaults: [
"libbt_audio_hal_interface_test_defaults",
"mts_defaults",
],
include_dirs: [
"packages/modules/Bluetooth/system/audio_hal_interface",
"packages/modules/Bluetooth/system/bta",
],
srcs: [
":TestCommonMockFunctions",
":TestMockAudioHalInterface",
":TestMockCodecManager",
":TestMockOsi",
"aidl/le_audio_software_aidl.cc",
"aidl/le_audio_utils.cc",
"hidl/le_audio_software_hidl.cc",
"le_audio_software.cc",
"le_audio_software_unittest.cc",
],
static_libs: [
"bluetooth_flags_c_lib_for_test",
"libbt-bta",
"libcutils",
"libgmock",
"libgtest",
"server_configurable_flags",
],
header_libs: ["libbluetooth_headers"],
cflags: [
"-DBUILDCFG",
],
}
// HFP client interface library unit tests
cc_test {
name: "bluetooth-test-audio-hal-hfp-client-interface",
test_suites: ["general-tests"],
host_supported: true,
defaults: [
"libbt_audio_hal_interface_test_defaults",
"mts_defaults",
],
include_dirs: [
"packages/modules/Bluetooth/system/audio_hal_interface",
"packages/modules/Bluetooth/system/audio_hal_interface/aidl",
"packages/modules/Bluetooth/system/bta",
],
srcs: [
":TestMockBtaAg",
"hfp_client_interface.cc",
"hfp_client_interface_unittest.cc",
],
static_libs: [
"server_configurable_flags",
],
header_libs: ["libbluetooth_headers"],
cflags: [
"-DBUILDCFG",
],
}