summaryrefslogtreecommitdiff
path: root/system/main/Android.bp
blob: e36f7ff3bc01ebc96fc62e5c39c64c0ea6ca5a76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
// Bluetooth main HW module / shared 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"],
}

filegroup {
    name: "LibBluetoothSources",
    srcs: [
        "stack_config.cc",
    ],
}

cc_library_static {
    name: "libbte",
    defaults: ["fluoride_defaults"],
    srcs: [
        ":BluetoothStackManagerSources",
        ":LibBluetoothShimSources",
        ":LibBluetoothSources",
    ],
    include_dirs: [
        "packages/modules/Bluetooth/system",
        "packages/modules/Bluetooth/system/bta/include",
        "packages/modules/Bluetooth/system/gd",
        "packages/modules/Bluetooth/system/stack/include",
    ],
    apex_available: ["com.android.bt"],
    host_supported: true,
    min_sdk_version: "Tiramisu",
    static_libs: [
        "bluetooth_flags_c_lib",
        "libbluetooth_gd",
        "libbluetooth_log",
        "libbt-platform-protos-lite",
        "libcom.android.sysprop.bluetooth.wrapped",
    ],
    header_libs: ["libbluetooth_headers"],
}

cc_test {
    name: "net_test_main_shim",
    test_suites: ["general-tests"],
    host_supported: true,
    test_options: {
        unit_test: true,
    },
    defaults: [
        "fluoride_defaults",
        "mts_defaults",
    ],
    include_dirs: [
        "packages/modules/Bluetooth/system",
        "packages/modules/Bluetooth/system/gd",
        "packages/modules/Bluetooth/system/stack/btm",
        "packages/modules/Bluetooth/system/stack/include",
    ],
    srcs: [
        ":TestCommonMainHandler",
        ":TestCommonMockFunctions",
        ":TestFakeOsi",
        ":TestMockBta",
        ":TestMockBtif",
        ":TestMockBtu",
        ":TestMockJni",
        ":TestMockLegacyHciInterface",
        ":TestMockMainShimEntry",
        ":TestMockStack",
        "shim/acl.cc",
        "shim/acl_api.cc",
        "shim/acl_interface.cc",
        "shim/btm_api.cc",
        "shim/config.cc",
        "shim/distance_measurement_manager.cc",
        "shim/dumpsys.cc",
        "shim/hci_layer.cc",
        "shim/le_advertising_manager.cc",
        "shim/le_scanning_manager.cc",
        "shim/metric_id_api.cc",
        "shim/metrics_api.cc",
        "shim/shim.cc",
        "shim/stack.cc",
        "shim/utils.cc",
        "test/common_stack_test.cc",
        "test/main_shim_test.cc",
    ],
    static_libs: [
        "bluetooth_flags_c_lib_for_test",
        "libbase",
        "libbluetooth-types",
        "libbluetooth_core_rs_bridge",
        "libbluetooth_crypto_toolbox",
        "libbluetooth_gd",
        "libbluetooth_hci_pdl",
        "libbluetooth_log",
        "libbt-common",
        "libbt-platform-protos-lite",
        "libbtdevice",
        "libchrome",
        "libcom.android.sysprop.bluetooth.wrapped",
        "libcutils",
        "libevent",
        "libflatbuffers-cpp",
        "libgmock",
        "liblog",
        "libosi",
        "libstatslog_bt",
    ],
    aidl: {
        libs: ["bluetooth_constants"],
    },
    shared_libs: [
        "libPlatformProperties",
        "libaconfig_storage_read_api_cc",
        "libbinder",
        "libbinder_ndk",
        "libcrypto",
        "server_configurable_flags",
    ],
    target: {
        android: {
            static_libs: [
                "android.system.suspend-V1-ndk",
                "android.system.suspend.control-V1-ndk",
                "libperfetto_client_experimental",
            ],
            shared_libs: [
                "libstatssocket",
            ],
        },
    },
    sanitize: {
        address: true,
        all_undefined: true,
        cfi: true,
        integer_overflow: true,
        scs: true,
        diag: {
            undefined: true,
        },
    },
    min_sdk_version: "Tiramisu",
    header_libs: ["libbluetooth_headers"],
}