blob: 89511a71b7776eb0ea85e4bb41bfdb15a8882dd4 [file] [log] [blame]
markchien0abdd112019-11-28 10:17:03 +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
Bob Badour97e6be22021-02-12 14:45:04 -080017package {
18 default_applicable_licenses: ["Android-Apache-2.0"],
19}
20
Maciej Żenczykowski760d1ed2022-07-08 05:57:10 -070021prebuilt_etc {
22 name: "TetheringInProcessFlag",
23 src: "in-process",
24 filename_from_src: true,
25 sub_dir: "flag",
26}
27
28prebuilt_etc {
29 name: "TetheringOutOfProcessFlag",
30 src: "out-of-process",
31 filename_from_src: true,
32 sub_dir: "flag",
33}
34
markchien598a75b2021-11-22 10:36:32 +080035// Defaults to enable/disable java targets which uses development APIs. "enabled" may have a
36// different value depending on the branch.
37java_defaults {
38 name: "ConnectivityNextEnableDefaults",
39 enabled: true,
40}
Remi NGUYEN VAN02eee9a2023-01-30 19:19:48 +090041java_defaults {
42 name: "NetworkStackApiShimSettingsForCurrentBranch",
43 // API shims to include in the networking modules built from the branch. Branches that disable
44 // the "next" targets must use stable shims (latest stable API level) instead of current shims
45 // (X_current API level).
46 static_libs: ["NetworkStackApiCurrentShims"],
47}
markchien598a75b2021-11-22 10:36:32 +080048apex_defaults {
49 name: "ConnectivityApexDefaults",
50 // Tethering app to include in the AOSP apex. Branches that disable the "next" targets may use
51 // a stable tethering app instead, but will generally override the AOSP apex to use updatable
52 // package names and keys, so that apex will be unused anyway.
53 apps: ["TetheringNext"], // Replace to "Tethering" if ConnectivityNextEnableDefaults is false.
54}
Remi NGUYEN VANf24553d2022-01-27 13:16:12 +090055enable_tethering_next_apex = true
markchien598a75b2021-11-22 10:36:32 +080056// This is a placeholder comment to avoid merge conflicts
57// as the above target may have different "enabled" values
58// depending on the branch
59
Dan Stahre2be25f2023-01-16 18:02:30 +000060apex_defaults {
61 name: "CronetInTetheringApexDefaults",
Stefano Duo43d89f62023-03-15 16:11:52 +000062 jni_libs: [
Mohannad Farrag9c6801f2023-03-23 12:45:45 +000063 "cronet_aml_components_cronet_android_cronet",
Stefano Duo43d89f62023-03-15 16:11:52 +000064 "//external/cronet/third_party/boringssl:libcrypto",
65 "//external/cronet/third_party/boringssl:libssl",
66 ],
Dan Stahre2be25f2023-01-16 18:02:30 +000067 arch: {
68 riscv64: {
69 // TODO: remove this when there is a riscv64 libcronet
Stefano Duo43d89f62023-03-15 16:11:52 +000070 exclude_jni_libs: [
Mohannad Farrag9c6801f2023-03-23 12:45:45 +000071 "cronet_aml_components_cronet_android_cronet",
Stefano Duo43d89f62023-03-15 16:11:52 +000072 "//external/cronet/third_party/boringssl:libcrypto",
73 "//external/cronet/third_party/boringssl:libssl",
74 ],
Dan Stahre2be25f2023-01-16 18:02:30 +000075 },
76 },
77}
78
markchien0abdd112019-11-28 10:17:03 +080079apex {
markchien8f831c02019-12-18 17:47:26 +080080 name: "com.android.tethering",
Gurpreet Singha12858d2022-03-04 15:34:29 +000081 defaults: [
82 "ConnectivityApexDefaults",
Dan Stahre2be25f2023-01-16 18:02:30 +000083 "CronetInTetheringApexDefaults",
Gurpreet Singha12858d2022-03-04 15:34:29 +000084 "r-launched-apex-module",
85 ],
Remi NGUYEN VAN6d575ca2021-01-13 15:44:38 +090086 compile_multilib: "both",
satayev8bb425a2021-05-12 13:28:58 +010087 bootclasspath_fragments: [
88 "com.android.tethering-bootclasspath-fragment",
89 ],
Jiakai Zhang9ecc66d2021-12-20 16:54:13 +000090 systemserverclasspath_fragments: [
91 "com.android.tethering-systemserverclasspath-fragment",
Remi NGUYEN VAN2812f602021-01-08 01:19:44 +000092 ],
Remi NGUYEN VAN6d575ca2021-01-13 15:44:38 +090093 multilib: {
94 first: {
markchien8fb75e32021-11-11 17:53:56 +080095 jni_libs: [
96 "libservice-connectivity",
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090097 "libandroid_net_connectivity_com_android_net_module_util_jni",
markchien8fb75e32021-11-11 17:53:56 +080098 ],
Remi NGUYEN VANfb70eba2022-04-04 20:26:16 +090099 native_shared_libs: [
100 "libcom.android.tethering.connectivity_native",
101 "libnetd_updatable",
102 ],
Remi NGUYEN VAN6d575ca2021-01-13 15:44:38 +0900103 },
104 both: {
Remi NGUYEN VANc8aa43c2022-02-02 13:03:29 +0900105 jni_libs: [
106 "libframework-connectivity-jni",
107 "libframework-connectivity-tiramisu-jni"
108 ],
Paul Duffinb28cb442021-05-26 10:46:20 +0100109 },
Remi NGUYEN VAN6d575ca2021-01-13 15:44:38 +0900110 },
Hungming Chen378e3232021-12-16 21:56:02 +0800111 binaries: [
112 "clatd",
113 ],
Hungming Chenf9d40ae2022-01-14 17:42:43 +0800114 canned_fs_config: "canned_fs_config",
Maciej Żenczykowskie9810ff2021-01-14 20:02:08 -0800115 bpfs: [
Tyler Wearb37f5512021-10-01 13:22:00 -0700116 "block.o",
Maciej Żenczykowskid72a5a72022-05-02 00:43:51 -0700117 "clatd.o",
Ken Chen74ff3ee2022-07-14 16:46:39 +0800118 "dscpPolicy.o",
Maciej Żenczykowskid72a5a72022-05-02 00:43:51 -0700119 "netd.o",
Maciej Żenczykowskie9810ff2021-01-14 20:02:08 -0800120 "offload.o",
Maciej Żenczykowski07d30132022-04-23 12:33:32 -0700121 "offload@btf.o",
Maciej Żenczykowskie9810ff2021-01-14 20:02:08 -0800122 "test.o",
Maciej Żenczykowski07d30132022-04-23 12:33:32 -0700123 "test@btf.o",
Maciej Żenczykowskie9810ff2021-01-14 20:02:08 -0800124 ],
Remi NGUYEN VANaffd94b2021-03-08 23:09:31 +0900125 apps: [
126 "ServiceConnectivityResources",
Remi NGUYEN VAN51935fc2022-01-07 13:18:54 +0900127 "HalfSheetUX",
Remi NGUYEN VANaffd94b2021-03-08 23:09:31 +0900128 ],
Andrei Onea52eac022021-12-03 15:11:27 +0000129 prebuilts: [
130 "current_sdkinfo",
131 "privapp_allowlist_com.android.tethering",
Maciej Żenczykowski760d1ed2022-07-08 05:57:10 -0700132 "TetheringOutOfProcessFlag",
Andrei Onea52eac022021-12-03 15:11:27 +0000133 ],
markchien0abdd112019-11-28 10:17:03 +0800134 manifest: "manifest.json",
markchien8f831c02019-12-18 17:47:26 +0800135 key: "com.android.tethering.key",
Nikita Ioffe5f333572021-02-04 01:42:45 +0000136 // Indicates that pre-installed version of this apex can be compressed.
137 // Whether it actually will be compressed is controlled on per-device basis.
138 compressible: true,
markchien0abdd112019-11-28 10:17:03 +0800139
140 androidManifest: "AndroidManifest.xml",
Taras Antoshchuk30d41e52021-08-02 18:06:35 +0200141
Remi NGUYEN VAN348bbb02022-07-19 16:33:04 +0900142 compat_configs: [
143 "connectivity-platform-compat-config",
Remi NGUYEN VAN348bbb02022-07-19 16:33:04 +0900144 ],
markchien0abdd112019-11-28 10:17:03 +0800145}
146
147apex_key {
markchien8f831c02019-12-18 17:47:26 +0800148 name: "com.android.tethering.key",
149 public_key: "com.android.tethering.avbpubkey",
150 private_key: "com.android.tethering.pem",
markchien0abdd112019-11-28 10:17:03 +0800151}
152
153android_app_certificate {
markchien8f831c02019-12-18 17:47:26 +0800154 name: "com.android.tethering.certificate",
155 certificate: "com.android.tethering",
markchien0abdd112019-11-28 10:17:03 +0800156}
markchiendbaff662020-05-05 17:42:44 +0800157
Remi NGUYEN VANe55a88d2022-04-20 15:59:16 +0900158filegroup {
159 name: "connectivity-hiddenapi-files",
Paul Duffinc8164e42022-07-28 10:52:09 +0000160 srcs: [
161 ":connectivity-t-hiddenapi-files",
162 "hiddenapi/*.txt",
163 ],
Remi NGUYEN VANe55a88d2022-04-20 15:59:16 +0900164 visibility: ["//packages/modules/Connectivity:__subpackages__"],
165}
166
satayev8bb425a2021-05-12 13:28:58 +0100167// Encapsulate the contributions made by the com.android.tethering to the bootclasspath.
168bootclasspath_fragment {
169 name: "com.android.tethering-bootclasspath-fragment",
170 contents: [
171 "framework-connectivity",
paulhu699477a2022-02-08 21:25:28 +0800172 "framework-connectivity-t",
satayev8bb425a2021-05-12 13:28:58 +0100173 "framework-tethering",
174 ],
175 apex_available: ["com.android.tethering"],
Paul Duffinb28cb442021-05-26 10:46:20 +0100176
177 // The bootclasspath_fragments that provide APIs on which this depends.
178 fragments: [
179 {
180 apex: "com.android.art",
181 module: "art-bootclasspath-fragment",
182 },
183 ],
184
185 // Additional stubs libraries that this fragment's contents use which are
186 // not provided by another bootclasspath_fragment.
187 additional_stubs: [
188 "android-non-updatable",
189 ],
190
191 // Additional hidden API flag files to override the defaults. This must only be
192 // modified by the Soong or platform compat team.
193 hidden_api: {
Remi NGUYEN VAN955c33c2021-12-16 15:10:40 +0000194 max_target_o_low_priority: [
195 "hiddenapi/hiddenapi-max-target-o-low-priority.txt",
Paul Duffin8be17642022-03-10 17:44:54 +0000196 ],
Junyu Lai2ef865e2022-01-17 11:52:57 +0000197 unsupported: [
198 "hiddenapi/hiddenapi-unsupported.txt",
Junyu Lai2ef865e2022-01-17 11:52:57 +0000199 ],
Paul Duffin8be17642022-03-10 17:44:54 +0000200
201 // The following packages contain classes from other modules on the
202 // bootclasspath. That means that the hidden API flags for this module
203 // has to explicitly list every single class this module provides in
204 // that package to differentiate them from the classes provided by other
205 // modules. That can include private classes that are not part of the
206 // API.
207 split_packages: [
208 "android.app.usage",
209 "android.nearby",
210 "android.net",
Dan Stahre2be25f2023-01-16 18:02:30 +0000211 "android.net.http",
Paul Duffin8be17642022-03-10 17:44:54 +0000212 "android.net.netstats",
213 "android.net.util",
214 ],
215
216 // The following packages and all their subpackages currently only
217 // contain classes from this bootclasspath_fragment. Listing a package
218 // here won't prevent other bootclasspath modules from adding classes in
219 // any of those packages but it will prevent them from adding those
220 // classes into an API surface, e.g. public, system, etc.. Doing so will
221 // result in a build failure due to inconsistent flags.
222 package_prefixes: [
223 "android.nearby.aidl",
224 "android.net.apf",
225 "android.net.connectivity",
Dan Stahre2be25f2023-01-16 18:02:30 +0000226 "android.net.http.apihelpers",
Paul Duffin8be17642022-03-10 17:44:54 +0000227 "android.net.netstats.provider",
228 "android.net.nsd",
Igor Chernyshev9dac6602022-12-13 19:28:32 -0800229 "android.net.wear",
Paul Duffin8be17642022-03-10 17:44:54 +0000230 ],
Paul Duffinb28cb442021-05-26 10:46:20 +0100231 },
satayev8bb425a2021-05-12 13:28:58 +0100232}
233
Jiakai Zhang9ecc66d2021-12-20 16:54:13 +0000234systemserverclasspath_fragment {
235 name: "com.android.tethering-systemserverclasspath-fragment",
236 standalone_contents: ["service-connectivity"],
237 apex_available: ["com.android.tethering"],
238}
239
markchiendbaff662020-05-05 17:42:44 +0800240override_apex {
241 name: "com.android.tethering.inprocess",
242 base: "com.android.tethering",
243 package_name: "com.android.tethering.inprocess",
Remi NGUYEN VANf24553d2022-01-27 13:16:12 +0900244 enabled: enable_tethering_next_apex,
Maciej Żenczykowskiccce4a32022-07-17 01:28:38 -0700245 bpfs: [
246 "block.o",
247 "clatd.o",
Ken Chen74ff3ee2022-07-14 16:46:39 +0800248 "dscpPolicy.o",
Maciej Żenczykowskiccce4a32022-07-17 01:28:38 -0700249 "netd.o",
250 "offload@inprocess.o",
251 "test@inprocess.o",
252 ],
markchiendbaff662020-05-05 17:42:44 +0800253 apps: [
Remi NGUYEN VANf0f0cca2021-03-12 15:04:29 +0000254 "ServiceConnectivityResources",
markchiendbaff662020-05-05 17:42:44 +0800255 "InProcessTethering",
256 ],
Maciej Żenczykowski760d1ed2022-07-08 05:57:10 -0700257 prebuilts: [
258 "current_sdkinfo",
259 "privapp_allowlist_com.android.tethering",
260 "TetheringInProcessFlag",
261 ],
markchiendbaff662020-05-05 17:42:44 +0800262}