1package { 2 default_applicable_licenses: [ 3 "frameworks_base_media_jni_soundpool_license", 4 ], 5} 6 7// Added automatically by a large-scale-change 8// See: http://go/android-license-faq 9license { 10 name: "frameworks_base_media_jni_soundpool_license", 11 visibility: [":__subpackages__"], 12 license_kinds: [ 13 "SPDX-license-identifier-Apache-2.0", 14 ], 15 license_text: [ 16 "NOTICE", 17 ], 18} 19 20tidy_errors = [ 21 // https://clang.llvm.org/extra/clang-tidy/checks/list.html 22 // For many categories, the checks are too many to specify individually. 23 // Feel free to disable as needed - as warnings are generally ignored, 24 // we treat warnings as errors. 25 "android-*", 26 "bugprone-*", 27 "cert-*", 28 "clang-analyzer-security*", 29 "google-*", 30 "misc-*", 31 //"modernize-*", // explicitly list the modernize as they can be subjective. 32 "modernize-avoid-bind", 33 //"modernize-avoid-c-arrays", // std::array<> can be verbose 34 "modernize-concat-nested-namespaces", 35 //"modernize-deprecated-headers", // C headers still ok even if there is C++ equivalent. 36 "modernize-deprecated-ios-base-aliases", 37 "modernize-loop-convert", 38 "modernize-make-shared", 39 "modernize-make-unique", 40 "modernize-pass-by-value", 41 "modernize-raw-string-literal", 42 "modernize-redundant-void-arg", 43 "modernize-replace-auto-ptr", 44 "modernize-replace-random-shuffle", 45 "modernize-return-braced-init-list", 46 "modernize-shrink-to-fit", 47 "modernize-unary-static-assert", 48 // "modernize-use-auto", // found in StreamManager.h, debatable - auto can obscure type 49 "modernize-use-bool-literals", 50 "modernize-use-default-member-init", 51 "modernize-use-emplace", 52 "modernize-use-equals-default", 53 "modernize-use-equals-delete", 54 // "modernize-use-nodiscard", // found in SteamManager.h 55 "modernize-use-noexcept", 56 "modernize-use-nullptr", 57 "modernize-use-override", 58 //"modernize-use-trailing-return-type", // not necessarily more readable 59 "modernize-use-transparent-functors", 60 "modernize-use-uncaught-exceptions", 61 //"modernize-use-using", // found in SoundManager.h 62 "performance-*", 63 64 // Remove some pedantic stylistic requirements. 65 "-google-readability-casting", // C++ casts not always necessary and may be verbose 66 "-google-readability-todo", // do not require TODO(info) 67 "-google-build-using-namespace", // Reenable and fix later. 68 69 "-google-explicit-constructor", // found in StreamManager.h 70 "-misc-non-private-member-variables-in-classes", // found in SoundManager.h 71 "-performance-unnecessary-value-param", // found in StreamManager.h 72] 73 74cc_defaults { 75 name: "soundpool_flags_defaults", 76 // https://clang.llvm.org/docs/UsersManual.html#command-line-options 77 // https://clang.llvm.org/docs/DiagnosticsReference.html 78 cflags: [ 79 "-Wall", 80 "-Wdeprecated", 81 "-Werror", 82 "-Werror=implicit-fallthrough", 83 "-Werror=sometimes-uninitialized", 84 //"-Werror=conditional-uninitialized", 85 "-Wextra", 86 "-Wredundant-decls", 87 "-Wshadow", 88 "-Wstrict-aliasing", 89 "-fstrict-aliasing", 90 "-Wthread-safety", 91 //"-Wthread-safety-negative", // experimental - looks broken in R. 92 "-Wunreachable-code", 93 "-Wunreachable-code-break", 94 "-Wunreachable-code-return", 95 "-Wunused", 96 "-Wused-but-marked-unused", 97 ], 98 // https://clang.llvm.org/extra/clang-tidy/ 99 tidy: true, 100 tidy_checks: tidy_errors, 101 tidy_checks_as_errors: tidy_errors, 102 tidy_flags: [ 103 "-format-style=file", 104 ], 105} 106 107cc_library_shared { 108 name: "libsoundpool", 109 defaults: [ 110 "soundpool_flags_defaults", 111 ], 112 113 srcs: [ 114 "android_media_SoundPool.cpp", 115 "Sound.cpp", 116 "SoundDecoder.cpp", 117 "SoundManager.cpp", 118 "SoundPool.cpp", 119 "Stream.cpp", 120 "StreamManager.cpp", 121 ], 122 123 header_libs: [ 124 "libmedia_headers", 125 "libmediametrics_headers", 126 ], 127 128 shared_libs: [ 129 "framework-permission-aidl-cpp", 130 "libaudioutils", 131 "liblog", 132 "libcutils", 133 "libutils", 134 "libandroid_runtime", 135 "libnativehelper", 136 "libaudioclient", 137 "libmediandk", 138 "libbinder", 139 ], 140 141 cflags: [ 142 "-Wall", 143 "-Werror", 144 "-Wno-error=deprecated-declarations", 145 "-Wunused", 146 "-Wunreachable-code", 147 ], 148} 149