1// 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 17package { 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21prebuilt_etc { 22 name: "TetheringOutOfProcessFlag", 23 src: "out-of-process", 24 filename_from_src: true, 25 sub_dir: "flag", 26} 27 28// Defaults to enable/disable java targets which uses development APIs. "enabled" may have a 29// different value depending on the branch. 30java_defaults { 31 name: "ConnectivityNextEnableDefaults", 32 enabled: true, 33} 34java_defaults { 35 name: "NetworkStackApiShimSettingsForCurrentBranch", 36 // API shims to include in the networking modules built from the branch. Branches that disable 37 // the "next" targets must use stable shims (latest stable API level) instead of current shims 38 // (X_current API level). 39 static_libs: ["NetworkStackApiCurrentShims"], 40} 41apex_defaults { 42 name: "ConnectivityApexDefaults", 43 // Tethering app to include in the AOSP apex. Branches that disable the "next" targets may use 44 // a stable tethering app instead, but will generally override the AOSP apex to use updatable 45 // package names and keys, so that apex will be unused anyway. 46 apps: ["TetheringNext"], // Replace to "Tethering" if ConnectivityNextEnableDefaults is false. 47} 48enable_tethering_next_apex = true 49// This is a placeholder comment to avoid merge conflicts 50// as the above target may have different "enabled" values 51// depending on the branch 52 53apex_defaults { 54 name: "CronetInTetheringApexDefaults", 55 jni_libs: [ 56 "cronet_aml_components_cronet_android_cronet", 57 "//external/cronet/third_party/boringssl:libcrypto", 58 "//external/cronet/third_party/boringssl:libssl", 59 ], 60 arch: { 61 riscv64: { 62 // TODO: remove this when there is a riscv64 libcronet 63 exclude_jni_libs: [ 64 "cronet_aml_components_cronet_android_cronet", 65 "//external/cronet/third_party/boringssl:libcrypto", 66 "//external/cronet/third_party/boringssl:libssl", 67 ], 68 }, 69 }, 70} 71 72apex { 73 name: "com.android.tethering", 74 defaults: [ 75 "ConnectivityApexDefaults", 76 "CronetInTetheringApexDefaults", 77 "r-launched-apex-module", 78 ], 79 compile_multilib: "both", 80 bootclasspath_fragments: [ 81 "com.android.tethering-bootclasspath-fragment", 82 ], 83 systemserverclasspath_fragments: [ 84 "com.android.tethering-systemserverclasspath-fragment", 85 ], 86 multilib: { 87 first: { 88 jni_libs: [ 89 "libservice-connectivity", 90 "libandroid_net_connectivity_com_android_net_module_util_jni", 91 ], 92 native_shared_libs: [ 93 "libcom.android.tethering.connectivity_native", 94 "libnetd_updatable", 95 ], 96 }, 97 both: { 98 jni_libs: [ 99 "libframework-connectivity-jni", 100 "libframework-connectivity-tiramisu-jni" 101 ], 102 }, 103 }, 104 binaries: [ 105 "clatd", 106 ], 107 canned_fs_config: "canned_fs_config", 108 bpfs: [ 109 "block.o", 110 "clatd.o", 111 "dscpPolicy.o", 112 "netd.o", 113 "offload.o", 114 "offload@btf.o", 115 "test.o", 116 "test@btf.o", 117 ], 118 apps: [ 119 "ServiceConnectivityResources", 120 "HalfSheetUX", 121 ], 122 prebuilts: [ 123 "current_sdkinfo", 124 "privapp_allowlist_com.android.tethering", 125 "TetheringOutOfProcessFlag", 126 ], 127 manifest: "manifest.json", 128 key: "com.android.tethering.key", 129 // Indicates that pre-installed version of this apex can be compressed. 130 // Whether it actually will be compressed is controlled on per-device basis. 131 compressible: true, 132 133 androidManifest: "AndroidManifest.xml", 134 135 compat_configs: [ 136 "connectivity-platform-compat-config", 137 ], 138} 139 140apex_key { 141 name: "com.android.tethering.key", 142 public_key: "com.android.tethering.avbpubkey", 143 private_key: "com.android.tethering.pem", 144} 145 146android_app_certificate { 147 name: "com.android.tethering.certificate", 148 certificate: "com.android.tethering", 149} 150 151filegroup { 152 name: "connectivity-hiddenapi-files", 153 srcs: [ 154 ":connectivity-t-hiddenapi-files", 155 "hiddenapi/*.txt", 156 ], 157 visibility: ["//packages/modules/Connectivity:__subpackages__"], 158} 159 160// Encapsulate the contributions made by the com.android.tethering to the bootclasspath. 161bootclasspath_fragment { 162 name: "com.android.tethering-bootclasspath-fragment", 163 contents: [ 164 "framework-connectivity", 165 "framework-connectivity-t", 166 "framework-tethering", 167 ], 168 apex_available: ["com.android.tethering"], 169 170 // The bootclasspath_fragments that provide APIs on which this depends. 171 fragments: [ 172 { 173 apex: "com.android.art", 174 module: "art-bootclasspath-fragment", 175 }, 176 ], 177 178 // Additional stubs libraries that this fragment's contents use which are 179 // not provided by another bootclasspath_fragment. 180 additional_stubs: [ 181 "android-non-updatable", 182 ], 183 184 // Additional hidden API flag files to override the defaults. This must only be 185 // modified by the Soong or platform compat team. 186 hidden_api: { 187 max_target_o_low_priority: [ 188 "hiddenapi/hiddenapi-max-target-o-low-priority.txt", 189 ], 190 unsupported: [ 191 "hiddenapi/hiddenapi-unsupported.txt", 192 ], 193 194 // The following packages contain classes from other modules on the 195 // bootclasspath. That means that the hidden API flags for this module 196 // has to explicitly list every single class this module provides in 197 // that package to differentiate them from the classes provided by other 198 // modules. That can include private classes that are not part of the 199 // API. 200 split_packages: [ 201 "android.app.usage", 202 "android.nearby", 203 "android.net", 204 "android.net.http", 205 "android.net.netstats", 206 "android.net.util", 207 ], 208 209 // The following packages and all their subpackages currently only 210 // contain classes from this bootclasspath_fragment. Listing a package 211 // here won't prevent other bootclasspath modules from adding classes in 212 // any of those packages but it will prevent them from adding those 213 // classes into an API surface, e.g. public, system, etc.. Doing so will 214 // result in a build failure due to inconsistent flags. 215 package_prefixes: [ 216 "android.nearby.aidl", 217 "android.net.apf", 218 "android.net.connectivity", 219 "android.net.http.apihelpers", 220 "android.net.netstats.provider", 221 "android.net.nsd", 222 "android.net.wear", 223 ], 224 }, 225} 226 227systemserverclasspath_fragment { 228 name: "com.android.tethering-systemserverclasspath-fragment", 229 standalone_contents: ["service-connectivity"], 230 apex_available: ["com.android.tethering"], 231} 232