blob: 253fb0067a5319bb4936f57d40da44c66cab7dfc [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 {
Maciej Żenczykowski760d1ed2022-07-08 05:57:10 -070022 name: "TetheringOutOfProcessFlag",
23 src: "out-of-process",
24 filename_from_src: true,
25 sub_dir: "flag",
26}
27
markchien598a75b2021-11-22 10:36:32 +080028// 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}
Remi NGUYEN VAN02eee9a2023-01-30 19:19:48 +090034java_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}
markchien598a75b2021-11-22 10:36:32 +080041apex_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}
Remi NGUYEN VANf24553d2022-01-27 13:16:12 +090048enable_tethering_next_apex = true
markchien598a75b2021-11-22 10:36:32 +080049// 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
Dan Stahre2be25f2023-01-16 18:02:30 +000053apex_defaults {
54 name: "CronetInTetheringApexDefaults",
Stefano Duo43d89f62023-03-15 16:11:52 +000055 jni_libs: [
Mohannad Farrag9c6801f2023-03-23 12:45:45 +000056 "cronet_aml_components_cronet_android_cronet",
Stefano Duo43d89f62023-03-15 16:11:52 +000057 "//external/cronet/third_party/boringssl:libcrypto",
58 "//external/cronet/third_party/boringssl:libssl",
59 ],
Dan Stahre2be25f2023-01-16 18:02:30 +000060 arch: {
61 riscv64: {
62 // TODO: remove this when there is a riscv64 libcronet
Stefano Duo43d89f62023-03-15 16:11:52 +000063 exclude_jni_libs: [
Mohannad Farrag9c6801f2023-03-23 12:45:45 +000064 "cronet_aml_components_cronet_android_cronet",
Stefano Duo43d89f62023-03-15 16:11:52 +000065 "//external/cronet/third_party/boringssl:libcrypto",
66 "//external/cronet/third_party/boringssl:libssl",
67 ],
Dan Stahre2be25f2023-01-16 18:02:30 +000068 },
69 },
70}
71
markchien0abdd112019-11-28 10:17:03 +080072apex {
markchien8f831c02019-12-18 17:47:26 +080073 name: "com.android.tethering",
Gurpreet Singha12858d2022-03-04 15:34:29 +000074 defaults: [
75 "ConnectivityApexDefaults",
Dan Stahre2be25f2023-01-16 18:02:30 +000076 "CronetInTetheringApexDefaults",
Gurpreet Singha12858d2022-03-04 15:34:29 +000077 "r-launched-apex-module",
78 ],
Remi NGUYEN VAN6d575ca2021-01-13 15:44:38 +090079 compile_multilib: "both",
satayev8bb425a2021-05-12 13:28:58 +010080 bootclasspath_fragments: [
81 "com.android.tethering-bootclasspath-fragment",
82 ],
Jiakai Zhang9ecc66d2021-12-20 16:54:13 +000083 systemserverclasspath_fragments: [
84 "com.android.tethering-systemserverclasspath-fragment",
Remi NGUYEN VAN2812f602021-01-08 01:19:44 +000085 ],
Remi NGUYEN VAN6d575ca2021-01-13 15:44:38 +090086 multilib: {
87 first: {
markchien8fb75e32021-11-11 17:53:56 +080088 jni_libs: [
89 "libservice-connectivity",
Remi NGUYEN VAN6a20eed2022-01-31 11:21:08 +090090 "libandroid_net_connectivity_com_android_net_module_util_jni",
markchien8fb75e32021-11-11 17:53:56 +080091 ],
Remi NGUYEN VANfb70eba2022-04-04 20:26:16 +090092 native_shared_libs: [
93 "libcom.android.tethering.connectivity_native",
94 "libnetd_updatable",
95 ],
Remi NGUYEN VAN6d575ca2021-01-13 15:44:38 +090096 },
97 both: {
Remi NGUYEN VANc8aa43c2022-02-02 13:03:29 +090098 jni_libs: [
99 "libframework-connectivity-jni",
100 "libframework-connectivity-tiramisu-jni"
101 ],
Paul Duffinb28cb442021-05-26 10:46:20 +0100102 },
Remi NGUYEN VAN6d575ca2021-01-13 15:44:38 +0900103 },
Hungming Chen378e3232021-12-16 21:56:02 +0800104 binaries: [
105 "clatd",
106 ],
Hungming Chenf9d40ae2022-01-14 17:42:43 +0800107 canned_fs_config: "canned_fs_config",
Maciej Żenczykowskie9810ff2021-01-14 20:02:08 -0800108 bpfs: [
Tyler Wearb37f5512021-10-01 13:22:00 -0700109 "block.o",
Maciej Żenczykowskid72a5a72022-05-02 00:43:51 -0700110 "clatd.o",
Ken Chen74ff3ee2022-07-14 16:46:39 +0800111 "dscpPolicy.o",
Maciej Żenczykowskid72a5a72022-05-02 00:43:51 -0700112 "netd.o",
Maciej Żenczykowskie9810ff2021-01-14 20:02:08 -0800113 "offload.o",
Maciej Żenczykowski07d30132022-04-23 12:33:32 -0700114 "offload@btf.o",
Maciej Żenczykowskie9810ff2021-01-14 20:02:08 -0800115 "test.o",
Maciej Żenczykowski07d30132022-04-23 12:33:32 -0700116 "test@btf.o",
Maciej Żenczykowskie9810ff2021-01-14 20:02:08 -0800117 ],
Remi NGUYEN VANaffd94b2021-03-08 23:09:31 +0900118 apps: [
119 "ServiceConnectivityResources",
Remi NGUYEN VAN51935fc2022-01-07 13:18:54 +0900120 "HalfSheetUX",
Remi NGUYEN VANaffd94b2021-03-08 23:09:31 +0900121 ],
Andrei Onea52eac022021-12-03 15:11:27 +0000122 prebuilts: [
123 "current_sdkinfo",
124 "privapp_allowlist_com.android.tethering",
Maciej Żenczykowski760d1ed2022-07-08 05:57:10 -0700125 "TetheringOutOfProcessFlag",
Andrei Onea52eac022021-12-03 15:11:27 +0000126 ],
markchien0abdd112019-11-28 10:17:03 +0800127 manifest: "manifest.json",
markchien8f831c02019-12-18 17:47:26 +0800128 key: "com.android.tethering.key",
Nikita Ioffe5f333572021-02-04 01:42:45 +0000129 // 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,
markchien0abdd112019-11-28 10:17:03 +0800132
133 androidManifest: "AndroidManifest.xml",
Taras Antoshchuk30d41e52021-08-02 18:06:35 +0200134
Remi NGUYEN VAN348bbb02022-07-19 16:33:04 +0900135 compat_configs: [
136 "connectivity-platform-compat-config",
Remi NGUYEN VAN348bbb02022-07-19 16:33:04 +0900137 ],
markchien0abdd112019-11-28 10:17:03 +0800138}
139
140apex_key {
markchien8f831c02019-12-18 17:47:26 +0800141 name: "com.android.tethering.key",
142 public_key: "com.android.tethering.avbpubkey",
143 private_key: "com.android.tethering.pem",
markchien0abdd112019-11-28 10:17:03 +0800144}
145
146android_app_certificate {
markchien8f831c02019-12-18 17:47:26 +0800147 name: "com.android.tethering.certificate",
148 certificate: "com.android.tethering",
markchien0abdd112019-11-28 10:17:03 +0800149}
markchiendbaff662020-05-05 17:42:44 +0800150
Remi NGUYEN VANe55a88d2022-04-20 15:59:16 +0900151filegroup {
152 name: "connectivity-hiddenapi-files",
Paul Duffinc8164e42022-07-28 10:52:09 +0000153 srcs: [
154 ":connectivity-t-hiddenapi-files",
155 "hiddenapi/*.txt",
156 ],
Remi NGUYEN VANe55a88d2022-04-20 15:59:16 +0900157 visibility: ["//packages/modules/Connectivity:__subpackages__"],
158}
159
satayev8bb425a2021-05-12 13:28:58 +0100160// 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",
paulhu699477a2022-02-08 21:25:28 +0800165 "framework-connectivity-t",
satayev8bb425a2021-05-12 13:28:58 +0100166 "framework-tethering",
167 ],
168 apex_available: ["com.android.tethering"],
Paul Duffinb28cb442021-05-26 10:46:20 +0100169
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: {
Remi NGUYEN VAN955c33c2021-12-16 15:10:40 +0000187 max_target_o_low_priority: [
188 "hiddenapi/hiddenapi-max-target-o-low-priority.txt",
Paul Duffin8be17642022-03-10 17:44:54 +0000189 ],
Junyu Lai2ef865e2022-01-17 11:52:57 +0000190 unsupported: [
191 "hiddenapi/hiddenapi-unsupported.txt",
Junyu Lai2ef865e2022-01-17 11:52:57 +0000192 ],
Paul Duffin8be17642022-03-10 17:44:54 +0000193
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",
Dan Stahre2be25f2023-01-16 18:02:30 +0000204 "android.net.http",
Paul Duffin8be17642022-03-10 17:44:54 +0000205 "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",
Dan Stahre2be25f2023-01-16 18:02:30 +0000219 "android.net.http.apihelpers",
Paul Duffin8be17642022-03-10 17:44:54 +0000220 "android.net.netstats.provider",
221 "android.net.nsd",
Igor Chernyshev9dac6602022-12-13 19:28:32 -0800222 "android.net.wear",
Paul Duffin8be17642022-03-10 17:44:54 +0000223 ],
Paul Duffinb28cb442021-05-26 10:46:20 +0100224 },
satayev8bb425a2021-05-12 13:28:58 +0100225}
226
Jiakai Zhang9ecc66d2021-12-20 16:54:13 +0000227systemserverclasspath_fragment {
228 name: "com.android.tethering-systemserverclasspath-fragment",
229 standalone_contents: ["service-connectivity"],
230 apex_available: ["com.android.tethering"],
231}