You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
149 lines
4.4 KiB
149 lines
4.4 KiB
package {
|
|
default_applicable_licenses: [
|
|
"frameworks_base_media_jni_soundpool_license",
|
|
],
|
|
}
|
|
|
|
// Added automatically by a large-scale-change
|
|
// See: http://go/android-license-faq
|
|
license {
|
|
name: "frameworks_base_media_jni_soundpool_license",
|
|
visibility: [":__subpackages__"],
|
|
license_kinds: [
|
|
"SPDX-license-identifier-Apache-2.0",
|
|
],
|
|
license_text: [
|
|
"NOTICE",
|
|
],
|
|
}
|
|
|
|
tidy_errors = [
|
|
// https://clang.llvm.org/extra/clang-tidy/checks/list.html
|
|
// For many categories, the checks are too many to specify individually.
|
|
// Feel free to disable as needed - as warnings are generally ignored,
|
|
// we treat warnings as errors.
|
|
"android-*",
|
|
"bugprone-*",
|
|
"cert-*",
|
|
"clang-analyzer-security*",
|
|
"google-*",
|
|
"misc-*",
|
|
//"modernize-*", // explicitly list the modernize as they can be subjective.
|
|
"modernize-avoid-bind",
|
|
//"modernize-avoid-c-arrays", // std::array<> can be verbose
|
|
"modernize-concat-nested-namespaces",
|
|
//"modernize-deprecated-headers", // C headers still ok even if there is C++ equivalent.
|
|
"modernize-deprecated-ios-base-aliases",
|
|
"modernize-loop-convert",
|
|
"modernize-make-shared",
|
|
"modernize-make-unique",
|
|
"modernize-pass-by-value",
|
|
"modernize-raw-string-literal",
|
|
"modernize-redundant-void-arg",
|
|
"modernize-replace-auto-ptr",
|
|
"modernize-replace-random-shuffle",
|
|
"modernize-return-braced-init-list",
|
|
"modernize-shrink-to-fit",
|
|
"modernize-unary-static-assert",
|
|
// "modernize-use-auto", // found in StreamManager.h, debatable - auto can obscure type
|
|
"modernize-use-bool-literals",
|
|
"modernize-use-default-member-init",
|
|
"modernize-use-emplace",
|
|
"modernize-use-equals-default",
|
|
"modernize-use-equals-delete",
|
|
// "modernize-use-nodiscard", // found in SteamManager.h
|
|
"modernize-use-noexcept",
|
|
"modernize-use-nullptr",
|
|
"modernize-use-override",
|
|
//"modernize-use-trailing-return-type", // not necessarily more readable
|
|
"modernize-use-transparent-functors",
|
|
"modernize-use-uncaught-exceptions",
|
|
//"modernize-use-using", // found in SoundManager.h
|
|
"performance-*",
|
|
|
|
// Remove some pedantic stylistic requirements.
|
|
"-google-readability-casting", // C++ casts not always necessary and may be verbose
|
|
"-google-readability-todo", // do not require TODO(info)
|
|
"-google-build-using-namespace", // Reenable and fix later.
|
|
|
|
"-google-explicit-constructor", // found in StreamManager.h
|
|
"-misc-non-private-member-variables-in-classes", // found in SoundManager.h
|
|
"-performance-unnecessary-value-param", // found in StreamManager.h
|
|
]
|
|
|
|
cc_defaults {
|
|
name: "soundpool_flags_defaults",
|
|
// https://clang.llvm.org/docs/UsersManual.html#command-line-options
|
|
// https://clang.llvm.org/docs/DiagnosticsReference.html
|
|
cflags: [
|
|
"-Wall",
|
|
"-Wdeprecated",
|
|
"-Werror",
|
|
"-Werror=implicit-fallthrough",
|
|
"-Werror=sometimes-uninitialized",
|
|
//"-Werror=conditional-uninitialized",
|
|
"-Wextra",
|
|
"-Wredundant-decls",
|
|
"-Wshadow",
|
|
"-Wstrict-aliasing",
|
|
"-fstrict-aliasing",
|
|
"-Wthread-safety",
|
|
//"-Wthread-safety-negative", // experimental - looks broken in R.
|
|
"-Wunreachable-code",
|
|
"-Wunreachable-code-break",
|
|
"-Wunreachable-code-return",
|
|
"-Wunused",
|
|
"-Wused-but-marked-unused",
|
|
],
|
|
// https://clang.llvm.org/extra/clang-tidy/
|
|
tidy: true,
|
|
tidy_checks: tidy_errors,
|
|
tidy_checks_as_errors: tidy_errors,
|
|
tidy_flags: [
|
|
"-format-style=file",
|
|
],
|
|
}
|
|
|
|
cc_library_shared {
|
|
name: "libsoundpool",
|
|
defaults: [
|
|
"soundpool_flags_defaults",
|
|
],
|
|
|
|
srcs: [
|
|
"android_media_SoundPool.cpp",
|
|
"Sound.cpp",
|
|
"SoundDecoder.cpp",
|
|
"SoundManager.cpp",
|
|
"SoundPool.cpp",
|
|
"Stream.cpp",
|
|
"StreamManager.cpp",
|
|
],
|
|
|
|
header_libs: [
|
|
"libmedia_headers",
|
|
"libmediametrics_headers",
|
|
],
|
|
|
|
shared_libs: [
|
|
"framework-permission-aidl-cpp",
|
|
"libaudioutils",
|
|
"liblog",
|
|
"libcutils",
|
|
"libutils",
|
|
"libandroid_runtime",
|
|
"libnativehelper",
|
|
"libaudioclient",
|
|
"libmediandk",
|
|
"libbinder",
|
|
],
|
|
|
|
cflags: [
|
|
"-Wall",
|
|
"-Werror",
|
|
"-Wno-error=deprecated-declarations",
|
|
"-Wunused",
|
|
"-Wunreachable-code",
|
|
],
|
|
}
|