// Copyright (C) 2019 The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package { default_visibility: [ ":__pkg__" ], default_applicable_licenses: ["Android-Apache-2.0"], } genrule { name: "statslog-statsd-java-gen", tools: ["stats-log-api-gen"], cmd: "$(location stats-log-api-gen) --java $(out) --module statsd" + " --javaPackage com.android.internal.statsd --javaClass StatsdStatsLog --minApiLevel 30", out: ["com/android/internal/statsd/StatsdStatsLog.java"], } java_library_static { name: "statslog-statsd", srcs: [ ":statslog-statsd-java-gen", ], visibility: [ "//cts/hostsidetests/statsd/apps:__subpackages__", "//vendor:__subpackages__", ], } filegroup { name: "framework-statsd-sources", srcs: [ "java/**/*.java", ":framework-statsd-aidl-sources", ":statslog-statsd-java-gen", ], visibility: [ "//frameworks/base", // For the "global" stubs. "//frameworks/base/apex/statsd:__subpackages__", "//packages/modules/StatsD/framework:__subpackages__", ], } // This target is used by service-statsd to bypass the prebuilt SDK artifacts // for framework-statsd when SDK prebuilts are enabled. // // When SDK prebuilts are disabled, the target framework-statsd exposes all // Java classes/methods, not only those that are a part of a stable API surface. // When SDK prebuilts are enabled however, only the stable API surface is // exposed from that target. java_library { name: "framework-statsd-internal", defaults: ["framework-module-defaults"], sdk_version: "module_current", srcs: [ ":framework-statsd-sources", ], apex_available: [ "com.android.os.statsd", "test_com.android.os.statsd", ], min_sdk_version: "30", visibility: [ "//packages/modules/StatsD:__subpackages__", ], } java_sdk_library { name: "framework-statsd", defaults: ["framework-module-defaults"], installable: true, srcs: [ ":framework-statsd-sources", ], permitted_packages: [ "android.app", "android.os", "android.util", // From :statslog-statsd-java-gen "com.android.internal.statsd", ], api_packages: [ "android.app", "android.os", "android.util", ], hostdex: true, // for hiddenapi check impl_library_visibility: [ "//frameworks/base/apex/statsd/framework/test:__subpackages__", "//packages/modules/StatsD/framework/test:__subpackages__", ], apex_available: [ "com.android.os.statsd", "test_com.android.os.statsd", ], min_sdk_version: "30", } // JNI library for StatsLog.write cc_library_shared { name: "libstats_jni", srcs: ["jni/**/*.cpp"], header_libs: ["libnativehelper_header_only"], shared_libs: [ "liblog", // Has a stable abi - should not be copied into apex. "libstatssocket", ], stl: "libc++_static", cflags: [ "-Wall", "-Werror", "-Wextra", "-Wno-unused-parameter", ], apex_available: [ "com.android.os.statsd", "test_com.android.os.statsd", ], min_sdk_version: "30", visibility: [ "//packages/modules/StatsD/apex:__subpackages__", ], }