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: "libaudiopermission_headers", 8 host_supported: true, 9 export_include_dirs: ["include"], 10} 11 12cc_library { 13 name: "libaudiopermission", 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 "liblog", 38 "libutils", 39 ], 40 41 host_supported: true, 42 sanitize: { 43 integer_overflow: true, 44 }, 45 cflags: [ 46 "-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION", 47 "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION", 48 "-Wall", 49 "-Wconditional-uninitialized", 50 "-Wdeprecated", 51 "-Werror", 52 "-Werror=format", 53 "-Werror=reorder-init-list", 54 "-Wextra", 55 "-Wextra-semi", 56 "-Wimplicit-fallthrough", 57 "-Wreorder-init-list", 58 "-Wshadow-all", 59 "-Wthread-safety", 60 "-Wunreachable-code-aggressive", 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: "libaudiopermission_tests", 87 host_supported: true, 88 defaults: [ 89 "libmediautils_tests_config", 90 ], 91 static_libs: [ 92 "audio-permission-aidl-cpp", 93 "libaudiopermission", 94 "framework-permission-aidl-cpp", 95 "libgmock", 96 ], 97 shared_libs: [ 98 "libbase", 99 "libbinder", 100 "liblog", 101 "libutils", 102 ], 103 srcs: ["tests/*.cpp"], 104 test_options: { 105 unit_test: true, 106 }, 107 test_suites: ["general-tests"], 108} 109