1// 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 15package { 16 default_applicable_licenses: ["Android-Apache-2.0"], 17} 18 19soong_config_module_type_import { 20 from: "packages/modules/common/Android.bp", 21 module_types: [ 22 "module_apex", 23 ], 24} 25 26module_apex { 27 name: "com.android.os.statsd", 28 defaults: ["com.android.os.statsd-defaults"], 29 manifest: "apex_manifest.json", 30 enabled: false, 31 soong_config_variables: { 32 module_build_from_source: { 33 enabled: true, 34 }, 35 }, 36} 37 38apex_defaults { 39 bootclasspath_fragments: ["com.android.os.statsd-bootclasspath-fragment"], 40 jni_libs: [ 41 "libstats_jni", 42 ], 43 native_shared_libs: [ 44 "libstatspull", 45 "libstatssocket", 46 ], 47 binaries: ["statsd"], 48 java_libs: [ 49 "service-statsd", 50 ], 51 compile_multilib: "both", 52 prebuilts: [ 53 "com.android.os.statsd.init.rc", 54 "current_sdkinfo", 55 ], 56 name: "com.android.os.statsd-defaults", 57 updatable: true, 58 min_sdk_version: "30", 59 key: "com.android.os.statsd.key", 60 certificate: ":com.android.os.statsd.certificate", 61} 62 63apex_key { 64 name: "com.android.os.statsd.key", 65 public_key: "com.android.os.statsd.avbpubkey", 66 private_key: "com.android.os.statsd.pem", 67} 68 69android_app_certificate { 70 name: "com.android.os.statsd.certificate", 71 // This will use com.android.os.statsd.x509.pem (the cert) and 72 // com.android.os.statsd.pk8 (the private key) 73 certificate: "com.android.os.statsd", 74} 75 76prebuilt_etc { 77 name: "com.android.os.statsd.init.rc", 78 src: "statsd.rc", 79 filename: "init.rc", 80 installable: false, 81} 82 83// ========================================================== 84// Make libstatssocket available to unbundled modules 85// ========================================================== 86sdk { 87 name: "statsd-module-sdk", 88 bootclasspath_fragments: ["com.android.os.statsd-bootclasspath-fragment"], 89 native_shared_libs: [ 90 "libstatssocket", 91 ], 92} 93 94// TODO(b/180769414): ART should be able to use the statsd-module-sdk entry, 95// but unfortunately that conflicts with internal builds. Make a special copy 96// for ART for the time being. 97sdk { 98 name: "statsd-module-sdk-for-art", 99 native_shared_libs: [ 100 "libstatssocket", 101 ], 102} 103 104// Encapsulate the contributions made by the com.android.os.statsd to the bootclasspath. 105bootclasspath_fragment { 106 name: "com.android.os.statsd-bootclasspath-fragment", 107 contents: ["framework-statsd"], 108 apex_available: ["com.android.os.statsd"], 109 110 // The bootclasspath_fragments that provide APIs on which this depends. 111 fragments: [ 112 { 113 apex: "com.android.art", 114 module: "art-bootclasspath-fragment", 115 }, 116 ], 117 118 // Additional stubs libraries that this fragment's contents use which are 119 // not provided by another bootclasspath_fragment. 120 additional_stubs: [ 121 "android-non-updatable", 122 ], 123 124 hidden_api: { 125 max_target_o_low_priority: ["hiddenapi/hiddenapi-max-target-o-low-priority.txt"], 126 }, 127} 128