1package {
2    // See: http://go/android-license-faq
3    // A large-scale-change added 'default_applicable_licenses' to import
4    // all of the 'license_kinds' from "system_bt_license"
5    // to get the below license kinds:
6    //   SPDX-license-identifier-Apache-2.0
7    default_applicable_licenses: ["system_bt_license"],
8}
9
10cc_library_static {
11    name: "avrcp-target-service",
12    defaults: [
13        "fluoride_defaults",
14    ],
15    host_supported: true,
16    include_dirs: [
17        "packages/modules/Bluetooth/system",
18        "packages/modules/Bluetooth/system/gd",
19        "packages/modules/Bluetooth/system/stack/include",
20    ],
21    export_include_dirs: ["./"],
22    srcs: [
23        "connection_handler.cc",
24        "device.cc",
25    ],
26    static_libs: [
27        "lib-bt-packets",
28        "libbluetooth-types",
29        "libbluetooth_log",
30        "libbt_shim_bridge",
31        "libosi",
32    ],
33    whole_static_libs: [
34        "libcom.android.sysprop.bluetooth.wrapped",
35    ],
36    shared_libs: [
37        "liblog",
38    ],
39    apex_available: [
40        "com.android.btservices",
41    ],
42    min_sdk_version: "Tiramisu",
43    header_libs: ["libbluetooth_headers"],
44    cflags: ["-Wno-unused-parameter"],
45}
46
47cc_test {
48    name: "net_test_avrcp",
49    test_suites: ["general-tests"],
50    defaults: [
51        "fluoride_defaults",
52        "mts_defaults",
53    ],
54    host_supported: true,
55    test_options: {
56        unit_test: true,
57    },
58    include_dirs: [
59        "packages/modules/Bluetooth/system",
60        "packages/modules/Bluetooth/system/gd",
61        "packages/modules/Bluetooth/system/stack/include",
62    ],
63    srcs: [
64        "tests/avrcp_connection_handler_test.cc",
65        "tests/avrcp_device_test.cc",
66    ],
67    shared_libs: [
68        "libaconfig_storage_read_api_cc",
69        "server_configurable_flags",
70    ],
71    static_libs: [
72        "avrcp-target-service",
73        "lib-bt-packets",
74        "lib-bt-packets-avrcp",
75        "lib-bt-packets-base",
76        "libbase",
77        "libbluetooth-types",
78        "libbluetooth_gd",
79        "libbluetooth_log",
80        "libbt_shim_bridge",
81        "libbt_shim_ffi",
82        "libbtdevice",
83        "libchrome",
84        "libcutils",
85        "libevent",
86        "libgmock",
87        "liblog",
88        "libosi",
89    ],
90    sanitize: {
91        cfi: false,
92    },
93
94    cflags: [
95        "-Wno-unused-parameter",
96    ],
97    header_libs: ["libbluetooth_headers"],
98}
99
100cc_fuzz {
101    name: "avrcp_device_fuzz",
102    host_supported: true,
103    defaults: [
104        "fluoride_defaults",
105    ],
106    srcs: [
107        "tests/avrcp_device_fuzz/avrcp_device_fuzz.cc",
108    ],
109    include_dirs: [
110        "packages/modules/Bluetooth/system",
111        "packages/modules/Bluetooth/system/gd",
112        "packages/modules/Bluetooth/system/packet/tests",
113        "packages/modules/Bluetooth/system/stack/include",
114    ],
115    static_libs: [
116        "avrcp-target-service",
117        "lib-bt-packets",
118        "lib-bt-packets-avrcp",
119        "lib-bt-packets-base",
120        "libbase",
121        "libbluetooth-types",
122        "libbluetooth_gd",
123        "libbluetooth_log",
124        "libbt_shim_bridge",
125        "libbt_shim_ffi",
126        "libchrome",
127        "libcutils",
128        "libevent",
129        "liblog",
130        "libstatslog_bt",
131        "libutils",
132    ],
133    header_libs: ["libbluetooth_headers"],
134    corpus: [
135        "tests/avrcp_device_fuzz/corpus/*",
136    ],
137    target: {
138        darwin: {
139            enabled: false,
140        },
141    },
142    cflags: ["-Wno-unused-parameter"],
143}
144