blob: a7b5d915443c062e8d0c1697f0bd4d933a089be7 [file] [log] [blame]
Tej Singhc03d0092019-11-21 12:47:37 -08001//
2// Copyright (C) 2019 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17// ==========================================================
18// Native library to register a pull atom callback with statsd
19// ==========================================================
Tej Singhd78f4da2020-01-29 15:56:52 -080020cc_defaults {
21 name: "libstatspull_defaults",
Tej Singhc03d0092019-11-21 12:47:37 -080022 srcs: [
Tej Singhc03d0092019-11-21 12:47:37 -080023 "stats_pull_atom_callback.cpp",
24 ],
25 cflags: [
26 "-Wall",
27 "-Werror",
28 ],
29 export_include_dirs: ["include"],
30 shared_libs: [
Ruchir Rastogi223dadb2020-01-24 18:21:36 -080031 "libbinder_ndk",
Jeffrey Huangb0a85dc2020-02-12 14:22:01 -080032 "liblog",
Ruchir Rastogi223dadb2020-01-24 18:21:36 -080033 "statsd-aidl-ndk_platform",
Tej Singhd78f4da2020-01-29 15:56:52 -080034 "libstatssocket",
Tej Singhc03d0092019-11-21 12:47:37 -080035 ],
36 static_libs: [
Tej Singhc03d0092019-11-21 12:47:37 -080037 "libutils",
Tej Singhd78f4da2020-01-29 15:56:52 -080038 ],
39}
40cc_library_shared {
41 name: "libstatspull",
42 defaults: [
43 "libstatspull_defaults"
Tej Singha8fd39d2020-01-14 13:46:27 -080044 ],
45 // enumerate stable entry points for APEX use
46 stubs: {
47 symbol_file: "libstatspull.map.txt",
48 versions: [
49 "30",
50 ],
51 },
Jeffrey Huangb0a85dc2020-02-12 14:22:01 -080052 apex_available: [
53 "com.android.os.statsd",
54 "test_com.android.os.statsd",
55 ],
Hsin-Yi Chene3bdbfa2020-03-23 11:26:38 +080056 // TODO(b/151102177): Enable it when the build error is fixed.
57 header_abi_checker: {
58 enabled: false,
59 },
Tej Singhc03d0092019-11-21 12:47:37 -080060}
Tej Singhd78f4da2020-01-29 15:56:52 -080061
62// ONLY USE IN TESTS.
63cc_library_static {
64 name: "libstatspull_private",
65 defaults: [
66 "libstatspull_defaults",
67 ],
68 visibility: [
69 "//frameworks/base/apex/statsd/tests/libstatspull",
70 ],
71}
Tej Singhc06f1472020-03-13 19:14:05 -070072
73// Note: These unit tests only test PullAtomMetadata.
74// For full E2E tests of libstatspull, use LibStatsPullTests
75cc_test {
76 name: "libstatspull_test",
77 srcs: [
78 "tests/pull_atom_metadata_test.cpp",
79 ],
80 shared_libs: [
81 "libstatspull",
82 "libstatssocket",
83 ],
84 test_suites: ["general-tests"],
85 cflags: [
86 "-Wall",
87 "-Werror",
88 "-Wno-missing-field-initializers",
89 "-Wno-unused-variable",
90 "-Wno-unused-function",
91 "-Wno-unused-parameter",
92 ],
Hsin-Yi Chene3bdbfa2020-03-23 11:26:38 +080093}