blob: 3b196925b91c0508566870edf981233bdc059cc9 [file] [log] [blame]
Muhammad Qureshi564b3642019-08-16 16:32:29 -07001// Copyright (C) 2019 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15apex {
16 name: "com.android.os.statsd",
Howard Ro92e1c6e2019-12-10 19:04:44 -080017 defaults: ["com.android.os.statsd-defaults"],
Muhammad Qureshi564b3642019-08-16 16:32:29 -070018 manifest: "apex_manifest.json",
Howard Ro92e1c6e2019-12-10 19:04:44 -080019}
20
21apex_defaults {
Tej Singh0ff1bb32020-01-29 19:07:38 -080022 native_shared_libs: [
23 "libstats_jni",
24 ],
Howard Robb6cd0b2020-02-20 04:57:00 +000025 binaries: ["statsd"],
Muhammad Qureshiff02d482019-12-12 11:03:55 -080026 java_libs: [
27 "framework-statsd",
28 "service-statsd",
29 ],
Muhammad Qureshi1b89df12020-02-18 11:30:17 -080030 compile_multilib: "both",
Howard Robb6cd0b2020-02-20 04:57:00 +000031 prebuilts: ["com.android.os.statsd.init.rc"],
Howard Ro92e1c6e2019-12-10 19:04:44 -080032 name: "com.android.os.statsd-defaults",
Muhammad Qureshi564b3642019-08-16 16:32:29 -070033 key: "com.android.os.statsd.key",
34 certificate: ":com.android.os.statsd.certificate",
35}
36
37apex_key {
38 name: "com.android.os.statsd.key",
39 public_key: "com.android.os.statsd.avbpubkey",
40 private_key: "com.android.os.statsd.pem",
41}
42
43android_app_certificate {
44 name: "com.android.os.statsd.certificate",
45 // This will use com.android.os.statsd.x509.pem (the cert) and
46 // com.android.os.statsd.pk8 (the private key)
47 certificate: "com.android.os.statsd",
48}
Tej Singh0ff1bb32020-01-29 19:07:38 -080049
Howard Robb6cd0b2020-02-20 04:57:00 +000050prebuilt_etc {
51 name: "com.android.os.statsd.init.rc",
52 src: "statsd.rc",
53 filename: "init.rc",
54 installable: false,
55}
Tej Singh0ff1bb32020-01-29 19:07:38 -080056
57// JNI library for StatsLog.write
58cc_library_shared {
59 name: "libstats_jni",
60 srcs: ["jni/**/*.cpp"],
61 shared_libs: [
62 "libnativehelper", // Has stable abi - should not be copied into apex.
63 "liblog", // Has a stable abi - should not be copied into apex.
64 ],
65 static_libs: [
66 //TODO: make shared - need libstatssocket to also live in the apex.
67 "libstatssocket",
68 "libcutils", // TODO: remove - needed by libstatssocket
69 ],
70 //TODO: is libc++_static correct?
71 stl: "libc++_static",
72 cflags: [
73 "-Wall",
74 "-Werror",
75 "-Wextra",
76 "-Wno-unused-parameter",
77 ],
78 apex_available: [
79 "com.android.os.statsd",
80 "test_com.android.os.statsd",
Tej Singh0ff1bb32020-01-29 19:07:38 -080081 ],
Muhammad Qureshi1b89df12020-02-18 11:30:17 -080082}