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