• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Bluetooth main HW module / shared library for target
2package {
3    // See: http://go/android-license-faq
4    // A large-scale-change added 'default_applicable_licenses' to import
5    // all of the 'license_kinds' from "system_bt_license"
6    // to get the below license kinds:
7    //   SPDX-license-identifier-Apache-2.0
8    default_applicable_licenses: ["system_bt_license"],
9}
10
11filegroup {
12    name: "LibBluetoothSources",
13    srcs: [
14        "stack_config.cc",
15    ],
16}
17
18cc_library_static {
19    name: "libbte",
20    defaults: ["fluoride_defaults"],
21    srcs: [
22        ":BluetoothStackManagerSources",
23        ":LibBluetoothShimSources",
24        ":LibBluetoothSources",
25    ],
26    include_dirs: [
27        "packages/modules/Bluetooth/system",
28        "packages/modules/Bluetooth/system/bta/include",
29        "packages/modules/Bluetooth/system/gd",
30        "packages/modules/Bluetooth/system/stack/include",
31    ],
32    apex_available: ["com.android.bt"],
33    host_supported: true,
34    min_sdk_version: "Tiramisu",
35    static_libs: [
36        "bluetooth_flags_c_lib",
37        "libbluetooth_gd",
38        "libbluetooth_log",
39        "libbt-platform-protos-lite",
40        "libcom.android.sysprop.bluetooth.wrapped",
41    ],
42    header_libs: ["libbluetooth_headers"],
43}
44
45cc_test {
46    name: "net_test_main_shim",
47    test_suites: ["general-tests"],
48    host_supported: true,
49    test_options: {
50        unit_test: true,
51    },
52    defaults: [
53        "fluoride_defaults",
54        "mts_defaults",
55    ],
56    include_dirs: [
57        "packages/modules/Bluetooth/system",
58        "packages/modules/Bluetooth/system/gd",
59        "packages/modules/Bluetooth/system/stack/btm",
60        "packages/modules/Bluetooth/system/stack/include",
61    ],
62    srcs: [
63        ":TestCommonMainHandler",
64        ":TestCommonMockFunctions",
65        ":TestFakeOsi",
66        ":TestMockBta",
67        ":TestMockBtif",
68        ":TestMockBtu",
69        ":TestMockJni",
70        ":TestMockLegacyHciInterface",
71        ":TestMockMainShimEntry",
72        ":TestMockStack",
73        "shim/acl.cc",
74        "shim/acl_api.cc",
75        "shim/acl_interface.cc",
76        "shim/btm_api.cc",
77        "shim/config.cc",
78        "shim/distance_measurement_manager.cc",
79        "shim/dumpsys.cc",
80        "shim/hci_layer.cc",
81        "shim/le_advertising_manager.cc",
82        "shim/le_scanning_manager.cc",
83        "shim/metric_id_api.cc",
84        "shim/metrics_api.cc",
85        "shim/shim.cc",
86        "shim/stack.cc",
87        "shim/utils.cc",
88        "test/common_stack_test.cc",
89        "test/main_shim_test.cc",
90    ],
91    static_libs: [
92        "bluetooth_flags_c_lib_for_test",
93        "libbase",
94        "libbluetooth-types",
95        "libbluetooth_core_rs_bridge",
96        "libbluetooth_crypto_toolbox",
97        "libbluetooth_gd",
98        "libbluetooth_hci_pdl",
99        "libbluetooth_log",
100        "libbt-common",
101        "libbt-platform-protos-lite",
102        "libbtdevice",
103        "libchrome",
104        "libcom.android.sysprop.bluetooth.wrapped",
105        "libcutils",
106        "libevent",
107        "libflatbuffers-cpp",
108        "libgmock",
109        "liblog",
110        "libosi",
111        "libstatslog_bt",
112    ],
113    aidl: {
114        libs: ["bluetooth_constants"],
115    },
116    shared_libs: [
117        "libPlatformProperties",
118        "libaconfig_storage_read_api_cc",
119        "libbinder",
120        "libbinder_ndk",
121        "libcrypto",
122        "server_configurable_flags",
123    ],
124    target: {
125        android: {
126            static_libs: [
127                "android.system.suspend-V1-ndk",
128                "android.system.suspend.control-V1-ndk",
129                "libperfetto_client_experimental",
130            ],
131            shared_libs: [
132                "libstatssocket",
133            ],
134        },
135    },
136    sanitize: {
137        address: true,
138        all_undefined: true,
139        cfi: true,
140        integer_overflow: true,
141        scs: true,
142        diag: {
143            undefined: true,
144        },
145    },
146    min_sdk_version: "Tiramisu",
147    header_libs: ["libbluetooth_headers"],
148}
149