blob: 1aa29e0a865d826d951c0b371c6d9cc3a1ccc5a4 [file] [log] [blame]
Atneya Nair9f91a5e2024-05-09 16:25:05 -07001package {
2 default_team: "trendy_team_android_media_audio_framework",
3 default_applicable_licenses: ["Android-Apache-2.0"],
4}
5
6cc_library {
7 name: "audiopermissioncontroller",
8
9 srcs: [
10 "NativePermissionController.cpp",
11 ],
12 export_include_dirs: [
13 "include",
14 ],
15
16 header_libs: [
17 "libcutils_headers",
18 "liberror_headers",
19 ],
20 export_header_lib_headers: [
21 "liberror_headers",
22 ],
23 static_libs: [
24 "audio-permission-aidl-cpp",
25 ],
26 shared_libs: [
27 "libbase",
28 "libbinder",
29 "libutils",
30 "liblog",
31 ],
32
33 host_supported: true,
34 sanitize: {
35 integer_overflow: true,
36 },
37 cflags: [
38 "-Wall",
39 "-Wdeprecated",
40 "-Wextra",
41 "-Werror=format",
42 "-Wextra-semi",
43 "-Wthread-safety",
44 "-Wconditional-uninitialized",
45 "-Wimplicit-fallthrough",
46 "-Wreorder-init-list",
47 "-Werror=reorder-init-list",
48 "-Wshadow-all",
49 "-Wunreachable-code-aggressive",
50 "-Werror",
51 "-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION",
52 "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION",
53 ],
54 tidy: true,
55 tidy_checks: [
56 "android-*",
57 "bugprone-*",
58 "cert-*",
59 "clang-analyzer-security*",
60 "google-*",
61 "misc-*",
62 "modernize-*",
63 "performance-*",
64 ],
65 tidy_checks_as_errors: [
66 "android-*",
67 "bugprone-*",
68 "cert-*",
69 "clang-analyzer-security*",
70 "google-*",
71 "misc-*",
72 "modernize-*",
73 "performance-*",
74 ],
75}
76
77cc_test {
78 name: "audiopermissioncontroller_test",
79 host_supported: true,
80 defaults: [
81 "libmediautils_tests_config",
82 ],
83 static_libs: [
84 "audio-permission-aidl-cpp",
85 "audiopermissioncontroller",
86 "framework-permission-aidl-cpp",
87 "libgmock",
88 ],
89 shared_libs: [
90 "libbase",
91 "libbinder",
92 "liblog",
93 "libutils",
94 ],
95 srcs: [
96 "tests/NativePermissionControllerTest.cpp",
97 ],
98 test_options: {
99 unit_test: true,
100 },
101 test_suites: ["general-tests"],
102}