blob: e6c7939089645ab68a001aa98e2a03ea2bb2726f [file] [log] [blame]
Dan Albert2a8d9c22016-09-23 15:55:49 -07001// Copyright (C) 2016 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
Colin Crosscf3a0b52017-11-16 00:15:28 -080015// Build the master framework library.
16
17// READ ME: ########################################################
18//
19// When updating this list of aidl files, consider if that aidl is
20// part of the SDK API. If it is, also add it to the list in Android.mk
21// that is preprocessed and distributed with the SDK. This list should
22// not contain any aidl files for parcelables, but the one below should
23// if you intend for 3rd parties to be able to send those objects
24// across process boundaries.
25//
26// READ ME: ########################################################
27
Artur Satayev3cc3fa42019-08-02 16:42:07 +010028filegroup {
Jiyong Parkb3609312019-08-16 21:17:14 +090029 name: "framework-core-sources",
Artur Satayev3cc3fa42019-08-02 16:42:07 +010030 srcs: [
Artur Satayev3cc3fa42019-08-02 16:42:07 +010031 "core/java/**/*.java",
Jiyong Parkb3609312019-08-16 21:17:14 +090032 "core/java/**/*.aidl",
Artur Satayev3cc3fa42019-08-02 16:42:07 +010033 ],
Jiyong Parkb3609312019-08-16 21:17:14 +090034 path: "core/java",
Artur Satayev3cc3fa42019-08-02 16:42:07 +010035}
36
Jiyong Park00ea0b12019-10-31 20:38:47 +090037// These are subset of framework-core-sources that are needed by the
38// android.test.mock library. Ideally, the library should use public APIs only,
39// but unfortunately its API signature has some references to these private APIs.
40filegroup {
41 name: "framework-core-sources-for-test-mock",
42 srcs: [
43 "core/java/android/app/IApplicationThread.aidl",
44 "core/java/android/app/IServiceConnection.aidl",
45 "core/java/android/content/IContentProvider.java",
46 "core/java/android/content/pm/IPackageDataObserver.aidl",
47 "core/java/android/content/pm/InstantAppInfo.java",
48 "core/java/android/content/pm/KeySet.java",
49 "core/java/android/content/pm/PackageManager.java",
50 "core/java/android/content/pm/VerifierDeviceIdentity.java",
51 "core/java/android/content/res/Resources.java",
52 "core/java/android/os/storage/VolumeInfo.java",
53 "core/java/android/view/DisplayAdjustments.java",
54 ],
55 path: "core/java",
Jiyong Park673e2982020-01-17 16:14:57 +090056 visibility: ["//frameworks/base/test-mock"],
Jiyong Park00ea0b12019-10-31 20:38:47 +090057}
58
Jiyong Parkb3609312019-08-16 21:17:14 +090059filegroup {
60 name: "framework-drm-sources",
61 srcs: [
62 "drm/java/**/*.java",
63 ],
64 path: "drm/java",
65}
Jiyong Park1cc95662019-08-07 22:45:07 +090066
Jiyong Parkb3609312019-08-16 21:17:14 +090067filegroup {
68 name: "framework-graphics-sources",
69 srcs: [
70 "graphics/java/**/*.java",
71 "graphics/java/**/*.aidl",
72 ],
73 path: "graphics/java",
74}
75
76filegroup {
David Zeuthen045b6de2019-10-29 15:15:18 -040077 name: "framework-identity-sources",
78 srcs: [
79 "identity/java/**/*.java",
80 ],
81 path: "identity/java",
82}
83
84filegroup {
Jiyong Parkb3609312019-08-16 21:17:14 +090085 name: "framework-keystore-sources",
86 srcs: [
87 "keystore/java/**/*.java",
88 "keystore/java/**/*.aidl",
89 ],
90 path: "keystore/java",
91}
92
93filegroup {
94 name: "framework-location-sources",
95 srcs: [
96 "location/java/**/*.java",
97 "location/java/**/*.aidl",
98 ],
99 path: "location/java",
100}
101
102filegroup {
103 name: "framework-lowpan-sources",
104 srcs: [
105 "lowpan/java/**/*.java",
106 "lowpan/java/**/*.aidl",
107 ],
108 path: "lowpan/java",
109}
110
111filegroup {
112 name: "framework-media-sources",
113 srcs: [
114 "media/java/**/*.java",
115 "media/java/**/*.aidl",
116 ],
117 path: "media/java",
118}
119
120filegroup {
121 name: "framework-mca-effect-sources",
122 srcs: [
123 "media/mca/effect/java/**/*.java",
124 ],
125 path: "media/mca/effect/java",
126}
127
128filegroup {
129 name: "framework-mca-filterfw-sources",
130 srcs: [
131 "media/mca/filterfw/java/**/*.java",
132 ],
133 path: "media/mca/filterfw/java",
134}
135
136filegroup {
137 name: "framework-mca-filterpacks-sources",
138 srcs: [
139 "media/mca/filterpacks/java/**/*.java",
140 ],
141 path: "media/mca/filterpacks/java",
142}
143
144filegroup {
Tobias Thierer878c77b2019-08-18 15:19:45 +0100145 name: "framework-mime-sources",
146 srcs: [
147 "mime/java/**/*.java",
148 ],
149 path: "mime/java",
150}
151
152filegroup {
Jiyong Parkb3609312019-08-16 21:17:14 +0900153 name: "framework-opengl-sources",
154 srcs: [
155 "opengl/java/**/*.java",
156 ],
157 path: "opengl/java",
158}
159
160filegroup {
161 name: "framework-rs-sources",
162 srcs: [
163 "rs/java/**/*.java",
164 ],
165 path: "rs/java",
166}
167
168filegroup {
169 name: "framework-sax-sources",
170 srcs: [
171 "sax/java/**/*.java",
172 ],
173 path: "sax/java",
174}
175
176filegroup {
177 name: "framework-telecomm-sources",
178 srcs: [
179 "telecomm/java/**/*.java",
180 "telecomm/java/**/*.aidl",
181 ],
182 path: "telecomm/java",
183}
184
185filegroup {
186 name: "framework-telephony-sources",
187 srcs: [
188 "telephony/java/**/*.java",
189 "telephony/java/**/*.aidl",
190 ],
191 path: "telephony/java",
192}
193
Muhammad Qureshied8bca02020-01-24 16:07:49 -0800194genrule {
195 name: "statslog-telephony-common-java-gen",
196 tools: ["stats-log-api-gen"],
197 cmd: "$(location stats-log-api-gen) --java $(out) --module telephony_common"
198 + " --javaPackage com.android.internal.telephony --javaClass TelephonyCommonStatsLog",
199 out: ["com/android/internal/telephony/TelephonyCommonStatsLog.java"],
200}
201
Jiyong Parkb3609312019-08-16 21:17:14 +0900202filegroup {
Amit Mahajand3551532019-09-23 17:59:57 -0700203 name: "framework-telephony-common-sources",
204 srcs: [
205 "telephony/common/**/*.java",
Muhammad Qureshied8bca02020-01-24 16:07:49 -0800206 ":statslog-telephony-common-java-gen",
Amit Mahajand3551532019-09-23 17:59:57 -0700207 ],
Amit Mahajand3551532019-09-23 17:59:57 -0700208}
209
210filegroup {
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700211 name: "framework-mms-sources",
212 srcs: [
213 "mms/java/**/*.java",
214 "mms/java/**/*.aidl",
215 ],
216 path: "mms/java",
217}
218
219filegroup {
Jiyong Parkae9972b2019-09-15 20:19:02 +0900220 name: "framework-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900221 srcs: [
222 // Java/AIDL sources under frameworks/base
Sudheer Shankaf5b36962019-10-04 16:16:13 -0700223 ":framework-blobstore-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900224 ":framework-core-sources",
225 ":framework-drm-sources",
226 ":framework-graphics-sources",
Jiyong Park48cc3722019-10-21 14:01:06 +0900227 ":framework-jobscheduler-sources", // jobscheduler is not a module for R
Jiyong Park20426532019-08-19 15:24:49 +0900228 ":framework-keystore-sources",
David Zeuthen045b6de2019-10-29 15:15:18 -0400229 ":framework-identity-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900230 ":framework-location-sources",
231 ":framework-lowpan-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900232 ":framework-mca-effect-sources",
233 ":framework-mca-filterfw-sources",
234 ":framework-mca-filterpacks-sources",
Jiyong Park48cc3722019-10-21 14:01:06 +0900235 ":framework-media-sources",
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700236 ":framework-mms-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900237 ":framework-opengl-sources",
238 ":framework-rs-sources",
239 ":framework-sax-sources",
240 ":framework-telecomm-sources",
Amit Mahajand3551532019-09-23 17:59:57 -0700241 ":framework-telephony-common-sources",
David Su130441b2019-12-14 21:37:20 -0800242 ":framework-wifi-annotations",
David Su6f646ef2019-12-10 13:33:06 -0800243 ":framework-wifi-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900244 ":PacProcessor-aidl-sources",
245 ":ProxyHandler-aidl-sources",
Aaron Huangc4081b22020-01-13 15:03:35 +0800246 ":net-utils-framework-common-srcs",
Jiyong Parkb3609312019-08-16 21:17:14 +0900247
atrost87488352019-10-10 19:27:31 +0100248 // AIDL from frameworks/base/native/
249 ":platform-compat-native-aidl",
250
Jiyong Park20426532019-08-19 15:24:49 +0900251 // AIDL sources from external directories
David Zeuthen045b6de2019-10-29 15:15:18 -0400252 ":credstore_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900253 ":dumpstate_aidl",
254 ":framework_native_aidl",
255 ":gatekeeper_aidl",
256 ":gsiservice_aidl",
257 ":incidentcompanion_aidl",
258 ":installd_aidl",
259 ":keystore_aidl",
260 ":libaudioclient_aidl",
261 ":libbinder_aidl",
262 ":libbluetooth-binder-aidl",
263 ":libcamera_client_aidl",
264 ":libcamera_client_framework_aidl",
265 ":libupdate_engine_aidl",
266 ":storaged_aidl",
267 ":vold_aidl",
Jiyong Park1cc95662019-08-07 22:45:07 +0900268
Jiyong Park20426532019-08-19 15:24:49 +0900269 // For the generated R.java and Manifest.java
270 ":framework-res{.aapt.srcjar}",
271
272 // etc.
273 ":framework-javastream-protos",
Muhammad Qureshi04ec2522020-01-27 16:36:45 -0800274 ":statslog-framework-java-gen", // FrameworkStatsLog.java
Chen Xu546ce5e2020-01-10 08:38:31 -0800275
276 // telephony annotations
277 ":framework-telephony-annotations",
Jiyong Park20426532019-08-19 15:24:49 +0900278 ],
279}
Jiyong Park1cc95662019-08-07 22:45:07 +0900280
Jiyong Parkae9972b2019-09-15 20:19:02 +0900281filegroup {
Anton Hanssonb4f35572019-12-02 16:30:22 +0000282 name: "framework-updatable-sources",
283 srcs: [
Alexander Dorokhine04a05a82019-12-17 10:41:21 -0800284 ":framework-appsearch-sources",
Jeff Sharkey40182832019-12-18 14:06:48 -0700285 ":framework-mediaprovider-sources",
Hai Zhang82a62272020-01-14 21:56:34 -0800286 ":framework-permission-sources",
Anton Hanssone996d432020-03-07 11:40:10 +0000287 ":framework-sdkextensions-sources",
288 ":framework-statsd-sources",
Chen Xu546ce5e2020-01-10 08:38:31 -0800289 ":framework-telephony-sources",
Anton Hanssone996d432020-03-07 11:40:10 +0000290 ":framework-tethering-srcs",
291 ":framework-wifi-updatable-sources",
292 ":updatable-media-srcs",
Anton Hanssonb4f35572019-12-02 16:30:22 +0000293 ]
294}
295
Anton Hanssone996d432020-03-07 11:40:10 +0000296java_library {
297 name: "framework-updatable-stubs-module_libs_api",
298 static_libs: [
299 "framework-appsearch-stubs", // TODO: Update to module_libs_api when there is one.
300 "framework-media-stubs-module_libs_api",
301 "framework-mediaprovider-stubs-module_libs_api",
302 "framework-permission-stubs-module_libs_api",
303 "framework-sdkextensions-stubs-module_libs_api",
304 "framework-statsd-stubs-module_libs_api",
305 "framework-telephony-stubs", // TODO: Update to module_libs_api when there is one.
306 "framework-tethering-stubs-module_libs_api",
307 "framework-wifi-stubs-module_libs_api",
308 ],
309 sdk_version: "module_current",
310 visibility: [":__pkg__"],
311}
312
Anton Hanssonb4f35572019-12-02 16:30:22 +0000313filegroup {
Jiyong Parkae9972b2019-09-15 20:19:02 +0900314 name: "framework-all-sources",
315 srcs: [
Tobias Thiererc0c06082019-11-22 16:33:18 +0000316 ":framework-mime-sources",
Jiyong Parkae9972b2019-09-15 20:19:02 +0900317 ":framework-non-updatable-sources",
Anton Hanssonb4f35572019-12-02 16:30:22 +0000318 ":framework-updatable-sources",
Jiyong Parkae9972b2019-09-15 20:19:02 +0900319 ],
320}
321
Jiyong Park392729f2020-01-17 16:32:53 +0900322// AIDL files under these paths are mixture of public and private ones.
323// They shouldn't be exported across module boundaries.
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100324java_defaults {
Makoto Onuki62242c42019-08-05 12:54:20 -0700325 name: "framework-aidl-export-defaults",
Makoto Onuki62242c42019-08-05 12:54:20 -0700326 aidl: {
Jiyong Parkb3609312019-08-16 21:17:14 +0900327 export_include_dirs: [
328 "core/java",
329 "drm/java",
330 "graphics/java",
David Zeuthen045b6de2019-10-29 15:15:18 -0400331 "identity/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900332 "keystore/java",
333 "location/java",
334 "lowpan/java",
335 "media/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900336 "media/mca/effect/java",
337 "media/mca/filterfw/java",
338 "media/mca/filterpacks/java",
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700339 "mms/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900340 "opengl/java",
341 "rs/java",
342 "sax/java",
343 "telecomm/java",
Anton Hanssone996d432020-03-07 11:40:10 +0000344
345 // TODO(b/148660295): remove this
346 "apex/media/framework/java",
347
348 // TODO(b/147699819): remove this
349 "telephony/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900350 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700351 },
352}
353
Jiyong Park20426532019-08-19 15:24:49 +0900354// Collection of classes that are generated from non-Java files that are not listed in
355// framework_srcs. These have no or very limited dependency to the framework.
356java_library {
357 name: "framework-internal-utils",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800358 static_libs: [
Dario Frenid8bf22e2018-08-31 14:18:04 +0100359 "apex_aidl_interface-java",
Kalesh Singh759af322019-06-19 12:17:43 -0700360 "suspend_control_aidl_interface-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800361 "framework-protos",
Peiyong Lin9ca1dd82019-01-12 17:44:29 -0800362 "game-driver-protos",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800363 "android.hidl.base-V1.0-java",
364 "android.hardware.cas-V1.0-java",
Henry Fang43cab922019-12-27 16:50:20 -0800365 "android.hardware.cas-V1.1-java",
366 "android.hardware.cas-V1.2-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800367 "android.hardware.contexthub-V1.0-java",
Anthony Stange521a9052020-02-07 18:45:47 -0500368 "android.hardware.contexthub-V1.1-java",
Yu-Han Yang9fe06dd2019-11-18 16:23:31 -0800369 "android.hardware.gnss-V1.0-java",
Yu-Han Yangad03c472020-01-14 15:31:01 -0800370 "android.hardware.gnss-V2.1-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800371 "android.hardware.health-V1.0-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800372 "android.hardware.radio-V1.0-java",
373 "android.hardware.radio-V1.1-java",
374 "android.hardware.radio-V1.2-java",
375 "android.hardware.radio-V1.3-java",
376 "android.hardware.radio-V1.4-java",
Sarah Chin21e9c632019-11-05 13:30:10 -0800377 "android.hardware.radio-V1.5-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800378 "android.hardware.thermal-V1.0-java-constants",
Wei Wangfb21bd82019-01-10 14:16:23 -0800379 "android.hardware.thermal-V1.0-java",
Wei Wangbad7c202018-11-01 11:57:39 -0700380 "android.hardware.thermal-V1.1-java",
381 "android.hardware.thermal-V2.0-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800382 "android.hardware.tv.input-V1.0-java-constants",
shubang7e849b02019-10-18 19:36:25 -0700383 "android.hardware.tv.tuner-V1.0-java-constants",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800384 "android.hardware.usb-V1.0-java-constants",
385 "android.hardware.usb-V1.1-java-constants",
Badhri Jagan Sridharane966a382018-12-09 14:49:38 -0800386 "android.hardware.usb-V1.2-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800387 "android.hardware.usb.gadget-V1.0-java",
Michael Wrightf268bf52018-02-07 23:23:34 +0000388 "android.hardware.vibrator-V1.0-java",
389 "android.hardware.vibrator-V1.1-java",
390 "android.hardware.vibrator-V1.2-java",
Harpreet "Eli" Sanghaa456f082018-12-14 12:06:10 +0900391 "android.hardware.vibrator-V1.3-java",
arangelov1ab61492018-11-22 13:56:50 +0000392 "devicepolicyprotosnano",
Inseob Kim4fe9f0f2019-07-30 18:23:26 +0900393
394 "com.android.sysprop.apex",
Nikita Ioffe779d6be2020-02-06 23:17:17 +0000395 "com.android.sysprop.init",
Inseob Kim4fe9f0f2019-07-30 18:23:26 +0900396 "PlatformProperties",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800397 ],
Jiyong Park20426532019-08-19 15:24:49 +0900398 sdk_version: "core_platform",
399 installable: false,
400}
401
402java_defaults {
403 name: "framework-defaults",
404 defaults: ["framework-aidl-export-defaults"],
405 installable: true,
406
Jiyong Park20426532019-08-19 15:24:49 +0900407 aidl: {
408 generate_get_transaction_name: true,
409 },
410
Jiyong Parkae9972b2019-09-15 20:19:02 +0900411 srcs: ["core/java/**/*.logtags"],
412
Jiyong Park20426532019-08-19 15:24:49 +0900413 exclude_srcs: [
414 // See comment on framework-atb-backward-compatibility module below
Winson5e0a1d52020-01-24 12:00:33 -0800415 "core/java/android/content/pm/AndroidTestBaseUpdater.java",
Jiyong Park20426532019-08-19 15:24:49 +0900416 ],
417
418 sdk_version: "core_platform",
419 libs: [
Artur Satayev6aa25ec2019-12-11 16:33:22 +0000420 "app-compat-annotations",
Jiyong Park20426532019-08-19 15:24:49 +0900421 "ext",
Artur Satayev6aa25ec2019-12-11 16:33:22 +0000422 "unsupportedappusage",
Anton Hanssone996d432020-03-07 11:40:10 +0000423 "framework-updatable-stubs-module_libs_api",
Jiyong Park20426532019-08-19 15:24:49 +0900424 ],
425
426 jarjar_rules: ":framework-jarjar-rules",
427
Tobias Thierer878c77b2019-08-18 15:19:45 +0100428 static_libs: [
429 "framework-internal-utils",
Tobias Thierer878c77b2019-08-18 15:19:45 +0100430 ],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800431
Colin Crosscf3a0b52017-11-16 00:15:28 -0800432 dxflags: [
433 "--core-library",
434 "--multi-dex",
435 ],
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100436
Eugene Susla3b2fe612019-08-06 18:47:14 -0700437 plugins: [
438 "view-inspector-annotation-processor",
439 "staledataclass-annotation-processor",
440 ],
Jiyong Park392729f2020-01-17 16:32:53 +0900441
442 required: [
443 // TODO: remove gps_debug and protolog.conf.json when the build system propagates "required" properly.
444 "gps_debug.conf",
445 "protolog.conf.json.gz",
446 ],
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100447}
448
Colin Crossbc2dc312018-10-26 22:34:06 -0700449filegroup {
Steven Moreland19e8d462019-03-08 10:44:22 -0800450 name: "framework-jarjar-rules",
David Su130441b2019-12-14 21:37:20 -0800451 srcs: ["framework-jarjar-rules.txt"],
Steven Moreland19e8d462019-03-08 10:44:22 -0800452}
453
454filegroup {
Colin Crossbc2dc312018-10-26 22:34:06 -0700455 name: "libincident_aidl",
456 srcs: [
Mike Ma643de922019-12-17 10:56:17 -0800457 "core/java/android/os/IIncidentDumpCallback.aidl",
Colin Crossbc2dc312018-10-26 22:34:06 -0700458 "core/java/android/os/IIncidentManager.aidl",
459 "core/java/android/os/IIncidentReportStatusListener.aidl",
460 ],
Dan Willemsen4a498502019-06-05 15:51:24 -0700461 path: "core/java",
Colin Crossbc2dc312018-10-26 22:34:06 -0700462}
463
464filegroup {
Michael Wrightc390fbe2018-12-12 19:45:09 +0000465 name: "libvibrator_aidl",
466 srcs: [
467 "core/java/android/os/IExternalVibrationController.aidl",
468 "core/java/android/os/IExternalVibratorService.aidl",
469 ],
Dan Willemsen4a498502019-06-05 15:51:24 -0700470 path: "core/java",
Michael Wrightc390fbe2018-12-12 19:45:09 +0000471}
472
Chris Ye48dbcaa2020-02-10 13:29:01 -0800473filegroup {
474 name: "libpowermanager_aidl",
475 srcs: [
476 "core/java/android/os/Temperature.aidl",
477 "core/java/android/os/CoolingDevice.aidl",
478 "core/java/android/os/IThermalEventListener.aidl",
479 "core/java/android/os/IThermalStatusListener.aidl",
480 "core/java/android/os/IThermalService.aidl",
481 ],
482 path: "core/java",
483}
484
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100485java_library {
Makoto Onuki62242c42019-08-05 12:54:20 -0700486 name: "framework-minus-apex",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100487 defaults: ["framework-defaults"],
Jiyong Parkae9972b2019-09-15 20:19:02 +0900488 srcs: [":framework-non-updatable-sources"],
Makoto Onuki62242c42019-08-05 12:54:20 -0700489 installable: true,
Jiyong Park911cd4f2019-10-21 14:35:14 +0900490 javac_shard_size: 150,
atrostaec9bc12019-08-16 18:14:09 +0100491 required: [
492 "framework-platform-compat-config",
493 "libcore-platform-compat-config",
atrost86895aa2019-08-19 16:51:15 +0100494 "services-platform-compat-config",
Ivan Chiang3cb1cbd2020-02-18 10:50:10 +0800495 "documents-ui-compat-config",
atrostaec9bc12019-08-16 18:14:09 +0100496 ],
Tobias Thiererc0c06082019-11-22 16:33:18 +0000497 static_libs: [
Tobias Thierer82968532019-11-29 19:39:45 +0000498 // If MimeMap ever becomes its own APEX, then this dependency would need to be removed
499 // in favor of an API stubs dependency in java_library "framework" below.
Tobias Thiererc0c06082019-11-22 16:33:18 +0000500 "mimemap",
501 ],
Jiyong Park911cd4f2019-10-21 14:35:14 +0900502 // For backwards compatibility.
503 stem: "framework",
Jiyong Park352f9e22019-12-09 14:45:07 +0900504 apex_available: ["//apex_available:platform"],
Jiyong Park212d2e82020-01-03 21:07:38 +0900505 visibility: [
506 "//frameworks/base",
Jiyong Park634819c2020-02-04 21:20:02 +0900507 // TODO(b/147128803) remove the below lines
Jiyong Park212d2e82020-01-03 21:07:38 +0900508 "//frameworks/base/apex/appsearch/framework",
509 "//frameworks/base/apex/blobstore/framework",
510 "//frameworks/base/apex/jobscheduler/framework",
markchien2c153702020-02-06 19:23:26 +0800511 "//frameworks/base/packages/Tethering/tests/unit",
Jiyong Park212d2e82020-01-03 21:07:38 +0900512 ],
Jiyong Park911cd4f2019-10-21 14:35:14 +0900513}
514
515// This "framework" module is NOT installed to the device. It's
516// "framework-minus-apex" that gets installed to the device. Note that
517// the filename is still framework.jar (via the stem property) for
518// compatibility reason. The purpose of this module is to provide
519// framework APIs (both public and private) for bundled apps.
520// "framework-minus-apex" can't be used for the purpose because 1)
521// many apps have already hardcoded the name "framework" and
522// 2) it lacks API symbols from updatable modules - as it's clear from
523// its suffix "-minus-apex".
524java_library {
525 name: "framework",
526 defaults: ["framework-aidl-export-defaults"],
527 installable: false, // this lib is a build-only library
528 static_libs: [
529 "framework-minus-apex",
Anton Hanssone996d432020-03-07 11:40:10 +0000530 // TODO(b/146218515): should be removed
531 "framework-appsearch",
532 // TODO (b/147688669) should be removed
Chen Xu546ce5e2020-01-10 08:38:31 -0800533 "framework-telephony",
Anton Hanssone996d432020-03-07 11:40:10 +0000534 "framework-updatable-stubs-module_libs_api",
Jiyong Park911cd4f2019-10-21 14:35:14 +0900535 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700536 sdk_version: "core_platform",
Jiyong Park352f9e22019-12-09 14:45:07 +0900537 apex_available: ["//apex_available:platform"],
Makoto Onuki62242c42019-08-05 12:54:20 -0700538}
539
540java_library {
Jiyong Parkae9972b2019-09-15 20:19:02 +0900541 name: "framework-all",
542 defaults: ["framework-defaults"],
543 srcs: [":framework-all-sources"],
544 installable: false,
David Su369c9202020-01-09 18:09:56 -0800545 static_libs: [
Santiago Seifert5b86f832020-01-27 19:42:27 +0000546 "exoplayer2-extractor",
David Su369c9202020-01-09 18:09:56 -0800547 "android.hardware.wifi-V1.0-java-constants",
Alexander Dorokhine0e8fa4e2020-01-13 20:22:20 -0800548 ],
549 libs: ["icing-java-proto-lite"],
Jiyong Park352f9e22019-12-09 14:45:07 +0900550 apex_available: ["//apex_available:platform"],
Anton Hanssona1fb6f52020-02-21 11:23:20 +0000551 visibility: [
552 // DO NOT ADD ANY MORE ENTRIES TO THIS LIST
553 "//external/robolectric-shadows:__subpackages__",
Anton Hanssona1fb6f52020-02-21 11:23:20 +0000554 "//frameworks/layoutlib:__subpackages__",
Anton Hanssona1fb6f52020-02-21 11:23:20 +0000555 ],
Jiyong Park97183492019-11-14 03:07:36 +0000556}
557
558java_library {
559 name: "framework-annotation-proc",
Jiyong Park963ee172020-02-01 17:16:58 +0900560 srcs: [
561 ":framework-all-sources",
562 "core/java/**/*.logtags",
563 ],
564 sdk_version: "core_platform",
Artur Satayev6aa25ec2019-12-11 16:33:22 +0000565 libs: [
566 "app-compat-annotations",
Jiyong Park963ee172020-02-01 17:16:58 +0900567 "ext",
568 "icing-java-proto-lite",
Artur Satayev6aa25ec2019-12-11 16:33:22 +0000569 "unsupportedappusage",
570 ],
Jiyong Park963ee172020-02-01 17:16:58 +0900571
Jiyong Park97183492019-11-14 03:07:36 +0000572 installable: false,
atrostb9c34502019-08-05 12:22:18 +0100573 plugins: [
atrostb9c34502019-08-05 12:22:18 +0100574 "compat-changeid-annotation-processor",
575 ],
Santiago Seifert5466a7d2019-11-11 19:27:04 +0000576 static_libs: [
Jiyong Park963ee172020-02-01 17:16:58 +0900577 "framework-internal-utils",
Santiago Seifert5b86f832020-01-27 19:42:27 +0000578 "exoplayer2-extractor",
David Su298cd362020-01-17 19:02:49 +0000579 "android.hardware.wifi-V1.0-java-constants",
Santiago Seifert5466a7d2019-11-11 19:27:04 +0000580 ]
atrostb9c34502019-08-05 12:22:18 +0100581}
582
583platform_compat_config {
584 name: "framework-platform-compat-config",
Jiyong Park97183492019-11-14 03:07:36 +0000585 src: ":framework-annotation-proc",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100586}
587
Paul Duffin521975802019-06-05 10:35:08 +0100588// A library including just UnsupportedAppUsage.java classes.
589//
590// Provided for target so that libraries can use it without depending on
591// the whole of framework or the core platform API.
592//
593// Built for host so that the annotation processor can also use this annotation.
594java_library {
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100595 name: "unsupportedappusage-annotation",
Paul Duffin521975802019-06-05 10:35:08 +0100596 host_supported: true,
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100597 srcs: [
598 "core/java/android/annotation/IntDef.java",
Paul Duffinc1308012019-10-10 16:33:42 +0100599 ],
600 static_libs: [
601 "art.module.api.annotations",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100602 ],
Paul Duffin521975802019-06-05 10:35:08 +0100603
604 sdk_version: "core_current",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800605}
606
Paul Duffinbeee5dc2018-01-23 13:39:00 +0000607// A temporary build target that is conditionally included on the bootclasspath if
Paul Duffina3b69212018-01-25 09:58:32 +0000608// android.test.base library has been removed and which provides support for
609// maintaining backwards compatibility for APKs that target pre-P and depend on
610// android.test.base classes. This is used iff REMOVE_ATB_FROM_BCP=true is
611// specified on the build command line.
612java_library {
613 name: "framework-atb-backward-compatibility",
Paul Duffinfab87542019-02-15 11:39:12 +0000614 installable: true,
atrost1a945502019-11-04 17:03:54 +0000615 libs: ["app-compat-annotations"],
Paul Duffina3b69212018-01-25 09:58:32 +0000616 srcs: [
Winson5e0a1d52020-01-24 12:00:33 -0800617 "core/java/android/content/pm/AndroidTestBaseUpdater.java",
Paul Duffina3b69212018-01-25 09:58:32 +0000618 ],
619}
620
Colin Crosscf3a0b52017-11-16 00:15:28 -0800621genrule {
Muhammad Qureshi04ec2522020-01-27 16:36:45 -0800622 name: "statslog-framework-java-gen",
623 tools: ["stats-log-api-gen"],
624 cmd: "$(location stats-log-api-gen) --java $(out) --module framework" +
625 " --javaPackage com.android.internal.util --javaClass FrameworkStatsLog --worksource",
626 out: ["com/android/internal/util/FrameworkStatsLog.java"],
627}
628
Hyunyoung Songa28623b2020-02-06 22:56:21 -0800629java_library {
630 name: "uieventloggerlib",
631 srcs: [
632 "core/java/com/android/internal/logging/UiEvent.java",
633 "core/java/com/android/internal/logging/UiEventLogger.java",
634 "core/java/com/android/internal/logging/UiEventLoggerImpl.java",
635 "core/java/com/android/internal/logging/InstanceId.java",
636 "core/java/com/android/internal/logging/InstanceIdSequence.java",
637 ":statslog-framework-java-gen",
638 ],
639}
640
Colin Crosscf3a0b52017-11-16 00:15:28 -0800641gensrcs {
642 name: "framework-javastream-protos",
643 depfile: true,
644
645 tools: [
646 "aprotoc",
647 "protoc-gen-javastream",
648 "soong_zip",
649 ],
650
Anton Hanssond82b2f72019-11-18 13:34:56 +0000651 cmd: "mkdir -p $(genDir)/$(in) " +
652 "&& $(location aprotoc) " +
653 " --plugin=$(location protoc-gen-javastream) " +
654 " --dependency_out=$(depfile) " +
655 " --javastream_out=$(genDir)/$(in) " +
656 " -Iexternal/protobuf/src " +
657 " -I . " +
658 " $(in) " +
659 "&& $(location soong_zip) -jar -o $(out) -C $(genDir)/$(in) -D $(genDir)/$(in)",
660
Yi Jin437aa6e2018-01-10 11:34:26 -0800661 srcs: [
Mike Mad2672bd2020-01-15 15:57:20 -0800662 ":ipconnectivity-proto-src",
Yi Jin437aa6e2018-01-10 11:34:26 -0800663 "core/proto/**/*.proto",
664 "libs/incident/**/*.proto",
665 ],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800666 output_extension: "srcjar",
667}
668
Mike Maa47ad722020-01-28 22:04:20 -0800669gensrcs {
670 name: "framework-cppstream-protos",
671 depfile: true,
672
673 tools: [
674 "aprotoc",
675 "protoc-gen-cppstream",
676 ],
677
678 cmd: "mkdir -p $(genDir) " +
679 "&& $(location aprotoc) " +
680 " --plugin=$(location protoc-gen-cppstream) " +
681 " --dependency_out=$(depfile) " +
682 " --cppstream_out=$(genDir) " +
683 " -Iexternal/protobuf/src " +
684 " -I . " +
685 " $(in)",
686
687 srcs: [
688 ":ipconnectivity-proto-src",
689 "core/proto/**/*.proto",
690 "libs/incident/**/*.proto",
691 ],
692
693 output_extension: "proto.h",
694}
695
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900696filegroup {
Chalard Jean95213512019-01-30 21:04:58 +0900697 name: "framework-annotations",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900698 srcs: [
David Su369c9202020-01-09 18:09:56 -0800699 "core/java/android/annotation/CallbackExecutor.java",
David Su511a8142020-01-09 14:02:21 -0800700 "core/java/android/annotation/CheckResult.java",
David Su77517342020-02-18 18:10:07 -0800701 "core/java/android/annotation/CurrentTimeMillisLong.java",
Roshan Piusb6361f92020-02-21 07:37:30 -0800702 "core/java/android/annotation/Hide.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900703 "core/java/android/annotation/IntDef.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900704 "core/java/android/annotation/IntRange.java",
lesld41a2992020-02-20 17:30:58 +0800705 "core/java/android/annotation/LongDef.java",
Jeff Sharkey40182832019-12-18 14:06:48 -0700706 "core/java/android/annotation/NonNull.java",
707 "core/java/android/annotation/Nullable.java",
708 "core/java/android/annotation/RequiresPermission.java",
709 "core/java/android/annotation/SdkConstant.java",
David Su369c9202020-01-09 18:09:56 -0800710 "core/java/android/annotation/StringDef.java",
Anton Hanssondc1e99b2019-12-06 17:07:28 +0000711 "core/java/android/annotation/SystemApi.java",
David Su369c9202020-01-09 18:09:56 -0800712 "core/java/android/annotation/SystemService.java",
Jeff Sharkey40182832019-12-18 14:06:48 -0700713 "core/java/android/annotation/TestApi.java",
Jeff Sharkeyf5eebf92020-03-06 14:41:56 -0700714 "core/java/android/annotation/WorkerThread.java",
Remi NGUYEN VAN231b52b2019-01-29 15:38:52 +0900715 "core/java/com/android/internal/annotations/GuardedBy.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900716 "core/java/com/android/internal/annotations/VisibleForTesting.java",
David Su511a8142020-01-09 14:02:21 -0800717 "core/java/com/android/internal/annotations/Immutable.java",
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100718 ],
Chalard Jean95213512019-01-30 21:04:58 +0900719}
720
Anton Hansson4ec07fa2019-11-08 15:18:04 +0000721java_library {
722 name: "framework-annotations-lib",
723 srcs: [ ":framework-annotations" ],
Anton Hansson791551a2019-12-19 10:17:46 +0000724 sdk_version: "core_current",
Anton Hansson4ec07fa2019-11-08 15:18:04 +0000725}
726
Chalard Jean95213512019-01-30 21:04:58 +0900727filegroup {
evitayane22e47f2019-12-30 16:05:38 -0800728 name: "framework-ike-shared-srcs",
729 visibility: ["//frameworks/opt/net/ike"],
730 srcs: [
evitayanbddbfb02020-01-07 21:21:52 -0800731 "core/java/android/annotation/StringDef.java",
evitayane22e47f2019-12-30 16:05:38 -0800732 "core/java/android/net/annotations/PolicyDirection.java",
evitayan0efc7402019-12-20 17:55:57 -0800733 "core/java/com/android/internal/util/IState.java",
734 "core/java/com/android/internal/util/State.java",
735 "core/java/com/android/internal/util/StateMachine.java",
evitayan996aa2a2019-12-30 11:19:47 -0800736 "telephony/java/android/telephony/Annotation.java",
evitayane22e47f2019-12-30 16:05:38 -0800737 ],
738}
739
740filegroup {
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900741 name: "framework-networkstack-shared-srcs",
742 srcs: [
743 // TODO: remove these annotations as soon as we can use andoid.support.annotations.*
Chalard Jean95213512019-01-30 21:04:58 +0900744 ":framework-annotations",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900745 "core/java/android/net/DhcpResults.java",
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900746 "core/java/android/util/LocalLog.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900747 "core/java/com/android/internal/util/HexDump.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900748 "core/java/com/android/internal/util/IndentingPrintWriter.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900749 "core/java/com/android/internal/util/IState.java",
750 "core/java/com/android/internal/util/MessageUtils.java",
751 "core/java/com/android/internal/util/Preconditions.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900752 "core/java/com/android/internal/util/RingBufferIndices.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900753 "core/java/com/android/internal/util/State.java",
754 "core/java/com/android/internal/util/StateMachine.java",
Chalard Jean6a76b7e2019-04-09 11:16:56 +0900755 "core/java/com/android/internal/util/TrafficStatsConstants.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900756 "core/java/com/android/internal/util/WakeupMessage.java",
johnson.yeh095b7a02019-12-19 20:30:34 +0800757 "core/java/com/android/internal/util/TokenBucket.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900758 "core/java/android/net/shared/*.java",
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100759 ],
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900760}
761
Roshan Piusb6361f92020-02-21 07:37:30 -0800762filegroup {
763 name: "framework-services-net-module-wifi-shared-srcs",
764 srcs: [
765 "core/java/android/net/DhcpResults.java",
766 "core/java/android/net/shared/Inet4AddressUtils.java",
767 "core/java/android/net/shared/InetAddressUtils.java",
768 "core/java/android/net/util/IpUtils.java",
769 "core/java/android/util/LocalLog.java",
770 "core/java/com/android/internal/util/Preconditions.java",
771 ],
772}
773
markchienae8aa642019-12-16 20:15:20 +0800774// keep these files in sync with the package/Tethering/jarjar-rules.txt for the tethering module.
markchiena6ba54d2019-09-03 15:58:06 +0800775filegroup {
776 name: "framework-tethering-shared-srcs",
777 srcs: [
778 "core/java/android/util/LocalLog.java",
markchienae8aa642019-12-16 20:15:20 +0800779 "core/java/com/android/internal/util/IndentingPrintWriter.java",
780 "core/java/com/android/internal/util/IState.java",
781 "core/java/com/android/internal/util/MessageUtils.java",
782 "core/java/com/android/internal/util/Preconditions.java",
783 "core/java/com/android/internal/util/State.java",
784 "core/java/com/android/internal/util/StateMachine.java",
markchien87d3f7d2020-01-08 20:58:23 +0800785 "core/java/com/android/internal/util/TrafficStatsConstants.java",
markchien986750b2019-12-06 15:24:53 +0800786 "core/java/android/net/shared/Inet4AddressUtils.java",
markchienae8aa642019-12-16 20:15:20 +0800787 ],
788}
789
Colin Crossd8e02252017-10-02 17:14:22 -0700790// Build ext.jar
791// ============================================================
792java_library {
793 name: "ext",
Colin Crossa12c0f52018-06-27 11:00:11 -0700794 installable: true,
Paul Duffin8fcace42019-06-12 13:47:18 +0100795 sdk_version: "core_platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700796 static_libs: [
797 "libphonenumber-platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700798 "tagsoup",
Ricky Wai0d1bc332017-10-31 14:31:01 +0000799 "rappor",
Colin Crossd8e02252017-10-02 17:14:22 -0700800 ],
801 dxflags: ["--core-library"],
802}
803
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700804// ==== java proto host library ==============================
805java_library_host {
806 name: "platformprotos",
807 srcs: [
Mike Mad2672bd2020-01-15 15:57:20 -0800808 ":ipconnectivity-proto-src",
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700809 "cmds/am/proto/instrumentation_data.proto",
Howard Ro0546d542018-08-30 16:23:44 -0700810 "cmds/statsd/src/**/*.proto",
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700811 "core/proto/**/*.proto",
812 "libs/incident/proto/**/*.proto",
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700813 ],
814 proto: {
815 include_dirs: ["external/protobuf/src"],
816 type: "full",
817 },
818 errorprone: {
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100819 javacflags: ["-Xep:MissingOverride:OFF"], // b/72714520
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700820 },
821}
822
Colin Cross43214162018-08-20 13:57:24 -0700823// ==== java proto device library (for test only) ==============================
824java_library {
825 name: "platformprotosnano",
826 proto: {
827 type: "nano",
828 output_params: ["store_unknown_fields=true"],
829 include_dirs: ["external/protobuf/src"],
830 },
Joe Onorato99598ee2019-02-11 15:55:13 +0000831 exclude_srcs: [
832 "core/proto/android/privacy.proto",
833 "core/proto/android/section.proto",
834 ],
Anton Hansson791551a2019-12-19 10:17:46 +0000835 sdk_version: "9",
Colin Cross43214162018-08-20 13:57:24 -0700836 srcs: [
Mike Mad2672bd2020-01-15 15:57:20 -0800837 ":ipconnectivity-proto-src",
Colin Cross43214162018-08-20 13:57:24 -0700838 "core/proto/**/*.proto",
839 "libs/incident/proto/android/os/**/*.proto",
840 ],
841}
842
843// ==== java proto device library (for test only) ==============================
844java_library {
845 name: "platformprotoslite",
846 proto: {
847 type: "lite",
848 include_dirs: ["external/protobuf/src"],
849 },
850
851 srcs: [
Mike Mad2672bd2020-01-15 15:57:20 -0800852 ":ipconnectivity-proto-src",
Colin Cross43214162018-08-20 13:57:24 -0700853 "core/proto/**/*.proto",
854 "libs/incident/proto/android/os/**/*.proto",
855 ],
Joe Onorato99598ee2019-02-11 15:55:13 +0000856 exclude_srcs: [
857 "core/proto/android/privacy.proto",
858 "core/proto/android/section.proto",
859 ],
Anton Hansson791551a2019-12-19 10:17:46 +0000860 sdk_version: "core_current",
Colin Cross43214162018-08-20 13:57:24 -0700861 // Protos have lots of MissingOverride and similar.
862 errorprone: {
863 javacflags: ["-XepDisableAllChecks"],
864 },
865}
866
Colin Crossaa0d4352017-05-02 14:14:56 -0700867// ==== c++ proto device library ==============================
Joe Onorato99598ee2019-02-11 15:55:13 +0000868cc_defaults {
869 name: "libplatformprotos-defaults",
870
Colin Crossaa0d4352017-05-02 14:14:56 -0700871 proto: {
872 export_proto_headers: true,
873 include_dirs: ["external/protobuf/src"],
874 },
875
Chih-Hung Hsiehc7edf072017-10-03 09:57:55 -0700876 cflags: [
877 "-Wall",
878 "-Werror",
879 "-Wno-unused-parameter",
880 ],
Joe Onorato62c220b2017-11-18 20:32:56 -0800881
882 srcs: [
Mike Mad2672bd2020-01-15 15:57:20 -0800883 ":ipconnectivity-proto-src",
Joe Onorato62c220b2017-11-18 20:32:56 -0800884 "core/proto/**/*.proto",
Joe Onorato62c220b2017-11-18 20:32:56 -0800885 ],
Joe Onorato99598ee2019-02-11 15:55:13 +0000886}
887
888cc_library {
889 name: "libplatformprotos",
890 defaults: ["libplatformprotos-defaults"],
891 host_supported: true,
Joe Onorato62c220b2017-11-18 20:32:56 -0800892
Colin Crossaa0d4352017-05-02 14:14:56 -0700893 target: {
894 host: {
895 proto: {
896 type: "full",
897 },
898 },
899 android: {
900 proto: {
901 type: "lite",
902 },
Joe Onorato99598ee2019-02-11 15:55:13 +0000903 shared_libs: [
904 "libprotobuf-cpp-lite",
905 ],
Colin Crossaa0d4352017-05-02 14:14:56 -0700906 shared: {
Colin Crossaa0d4352017-05-02 14:14:56 -0700907 enabled: false,
908 },
909 },
910 },
Colin Crossaa0d4352017-05-02 14:14:56 -0700911}
912
Joe Onorato9bd5db72019-04-03 18:19:43 -0700913// This library is meant for vendor code that needs to output protobuf. It links
914// against the static version of libprotobuf-cpp-lite, for which we can not guarantee
915// binary compatibility.
916cc_library {
917 name: "libplatformprotos-static",
918 defaults: ["libplatformprotos-defaults"],
919 host_supported: false,
920
921 // This is okay because this library is only built as a static library. The C++
922 // API is not guaranteed. The proto API is guaranteed to be stable via Metrics Council,
923 // but is not authorized to be used outside of debugging.
924 vendor_available: true,
925
926 target: {
927 android: {
928 proto: {
929 type: "lite",
930 },
931 static_libs: [
932 "libprotobuf-cpp-lite",
933 ],
934 shared: {
935 enabled: false,
936 },
937 },
938 },
939}
940
941
Joe Onorato99598ee2019-02-11 15:55:13 +0000942// This is the full proto version of libplatformprotos. It may only
943// be used by test code that is not shipped on the device.
944cc_library {
945 name: "libplatformprotos-test",
946 defaults: ["libplatformprotos-defaults"],
947 host_supported: false,
948
949 target: {
950 android: {
951 proto: {
952 type: "full",
953 },
954 shared: {
955 enabled: false,
956 },
957 },
958 },
959}
960
Songchun Fan0037c3f2019-10-30 15:20:59 -0700961filegroup {
962 name: "incremental_aidl",
963 srcs: [
Songchun Fan0037c3f2019-10-30 15:20:59 -0700964 "core/java/android/os/incremental/IncrementalFileSystemControlParcel.aidl",
Songchun Fan0037c3f2019-10-30 15:20:59 -0700965 ],
966 path: "core/java",
967}
968
969filegroup {
Songchun Fan6dd47b52019-11-29 15:20:18 -0800970 name: "dataloader_aidl",
Songchun Fan0037c3f2019-10-30 15:20:59 -0700971 srcs: [
Alex Buynytskyyea14d192019-12-13 15:42:18 -0800972 "core/java/android/content/pm/DataLoaderParamsParcel.aidl",
Alex Buynytskyy1ecfcec2019-12-17 12:10:41 -0800973 "core/java/android/content/pm/DataLoaderType.aidl",
Alex Buynytskyyea14d192019-12-13 15:42:18 -0800974 "core/java/android/content/pm/FileSystemControlParcel.aidl",
Songchun Fan6381d612020-02-26 17:59:41 -0800975 "core/java/android/content/pm/IDataLoader.aidl",
976 "core/java/android/content/pm/IDataLoaderManager.aidl",
977 "core/java/android/content/pm/InstallationFileParcel.aidl",
978 "core/java/android/content/pm/InstallationFileLocation.aidl",
Songchun Fan6dd47b52019-11-29 15:20:18 -0800979 "core/java/android/content/pm/IDataLoaderStatusListener.aidl",
Alex Buynytskyyea14d192019-12-13 15:42:18 -0800980 "core/java/android/content/pm/IPackageInstallerSessionFileSystemConnector.aidl",
981 "core/java/android/content/pm/NamedParcelFileDescriptor.aidl",
Alex Buynytskyy5b0c7fa2019-12-17 21:48:16 -0800982 ],
983 path: "core/java",
984}
985
986filegroup {
987 name: "incremental_manager_aidl",
988 srcs: [
Alex Buynytskyy716588d2020-02-04 13:42:59 -0800989 "core/java/android/os/incremental/IIncrementalService.aidl",
Yurii Zubrytskyi4a25dfb2020-01-10 11:53:24 -0800990 "core/java/android/os/incremental/IncrementalNewFileParams.aidl",
Songchun Fan0037c3f2019-10-30 15:20:59 -0700991 ],
992 path: "core/java",
993}
994
995aidl_interface {
996 name: "libincremental_aidl",
997 srcs: [
998 ":incremental_aidl",
Songchun Fan6dd47b52019-11-29 15:20:18 -0800999 ],
Songchun Fan6dd47b52019-11-29 15:20:18 -08001000 backend: {
1001 java: {
1002 sdk_version: "28",
1003 },
1004 cpp: {
1005 enabled: true,
1006 },
1007 ndk: {
1008 enabled: true,
1009 },
1010 },
1011}
1012
1013aidl_interface {
1014 name: "libdataloader_aidl",
1015 srcs: [
1016 ":dataloader_aidl",
Songchun Fan0037c3f2019-10-30 15:20:59 -07001017 ],
Alex Buynytskyy5b0c7fa2019-12-17 21:48:16 -08001018 imports: [
1019 "libincremental_aidl",
1020 ],
Songchun Fan0037c3f2019-10-30 15:20:59 -07001021 backend: {
1022 java: {
1023 sdk_version: "28",
1024 },
1025 cpp: {
1026 enabled: true,
1027 },
1028 ndk: {
Alex Buynytskyy5b0c7fa2019-12-17 21:48:16 -08001029 enabled: false,
1030 },
1031 },
1032}
1033
1034aidl_interface {
1035 name: "libincremental_manager_aidl",
1036 srcs: [
1037 ":incremental_manager_aidl",
1038 ],
1039 imports: [
1040 "libincremental_aidl",
1041 "libdataloader_aidl",
1042 ],
1043 backend: {
1044 java: {
1045 sdk_version: "28",
1046 },
1047 cpp: {
Songchun Fan0037c3f2019-10-30 15:20:59 -07001048 enabled: true,
1049 },
Alex Buynytskyy5b0c7fa2019-12-17 21:48:16 -08001050 ndk: {
1051 enabled: false,
1052 },
Songchun Fan0037c3f2019-10-30 15:20:59 -07001053 },
Songchun Fan0037c3f2019-10-30 15:20:59 -07001054}
Joe Onorato99598ee2019-02-11 15:55:13 +00001055
Colin Crossa2b78a72018-03-29 13:31:04 -07001056// TODO(b/77285514): remove this once the last few hidl interfaces have been
1057// updated to use hwbinder.stubs.
Steven Morelandeddafe92017-10-02 16:58:41 -07001058java_library {
1059 name: "hwbinder",
Paul Duffin8fcace42019-06-12 13:47:18 +01001060 sdk_version: "core_platform",
Steven Morelandeddafe92017-10-02 16:58:41 -07001061
1062 srcs: [
1063 "core/java/android/os/HidlSupport.java",
Steven Morelande8e63aa2018-01-10 15:45:36 -08001064 "core/java/android/annotation/IntDef.java",
Ytai Ben-Tsvi4659e182019-11-06 09:53:34 -08001065 "core/java/android/annotation/IntRange.java",
Steven Morelandeddafe92017-10-02 16:58:41 -07001066 "core/java/android/annotation/NonNull.java",
Steven Moreland0ff061a2019-03-04 17:56:30 -08001067 "core/java/android/annotation/Nullable.java",
Steven Morelande8e63aa2018-01-10 15:45:36 -08001068 "core/java/android/annotation/SystemApi.java",
Steven Morelandcbba4c72019-01-11 10:19:51 -08001069 "core/java/android/annotation/TestApi.java",
Ytai Ben-Tsvi4659e182019-11-06 09:53:34 -08001070 "core/java/android/os/HidlMemory.java",
Steven Morelandeddafe92017-10-02 16:58:41 -07001071 "core/java/android/os/HwBinder.java",
1072 "core/java/android/os/HwBlob.java",
1073 "core/java/android/os/HwParcel.java",
1074 "core/java/android/os/IHwBinder.java",
1075 "core/java/android/os/IHwInterface.java",
1076 "core/java/android/os/DeadObjectException.java",
1077 "core/java/android/os/DeadSystemException.java",
Nirav Atre9850dd92018-07-24 17:03:44 -07001078 "core/java/android/os/NativeHandle.java",
Steven Morelandeddafe92017-10-02 16:58:41 -07001079 "core/java/android/os/RemoteException.java",
1080 "core/java/android/util/AndroidException.java",
1081 ],
Artur Satayevafdb23a2019-12-10 17:47:53 +00001082 libs: [ "unsupportedappusage" ],
Steven Morelandeddafe92017-10-02 16:58:41 -07001083
1084 dxflags: ["--core-library"],
1085 installable: false,
1086}
Nan Zhang2db709d2017-11-08 20:48:46 -08001087
1088python_defaults {
1089 name: "base_default",
1090 version: {
1091 py2: {
Nan Zhang2db709d2017-11-08 20:48:46 -08001092 enabled: false,
1093 embedded_launcher: false,
1094 },
Haibo Huang715857d2020-03-05 11:58:47 -08001095 py3: {
1096 enabled: true,
1097 embedded_launcher: true,
1098 },
Nan Zhang2db709d2017-11-08 20:48:46 -08001099 },
1100}
1101
1102python_binary_host {
1103 name: "fontchain_linter",
1104 defaults: ["base_default"],
1105 main: "tools/fonts/fontchain_linter.py",
1106 srcs: [
1107 "tools/fonts/fontchain_linter.py",
1108 ],
1109 libs: [
1110 "fontTools",
1111 ],
1112}
Nan Zhang172875b2018-02-27 11:24:03 -08001113
Nan Zhangaf251302018-08-30 10:59:51 -07001114filegroup {
Insun Kang06b25ae2018-11-20 10:05:44 +09001115 name: "framework-media-annotation-srcs",
1116 srcs: [
Jeff Sharkey40182832019-12-18 14:06:48 -07001117 ":framework-annotations",
Insun Kang06b25ae2018-11-20 10:05:44 +09001118 "core/java/android/annotation/CallbackExecutor.java",
Insun Kangf86a56c2019-01-22 17:16:07 +09001119 "core/java/android/annotation/CallSuper.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001120 "core/java/android/annotation/DrawableRes.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001121 "core/java/android/annotation/LongDef.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001122 "core/java/android/annotation/StringDef.java",
Jeff Sharkey40182832019-12-18 14:06:48 -07001123 ],
1124}
1125
1126filegroup {
1127 name: "framework-mediaprovider-annotation-sources",
1128 srcs: [
1129 ":framework-annotations",
1130 "core/java/android/annotation/BytesLong.java",
Jeff Sharkey40182832019-12-18 14:06:48 -07001131 "core/java/android/annotation/CurrentTimeSecondsLong.java",
1132 "core/java/android/annotation/DurationMillisLong.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001133 ],
1134}
1135
Andrei Onea7a2985c2019-02-18 15:28:35 +00001136// Creates an index of AIDL methods; used for adding UnsupportedAppUsage
1137// annotations to private apis
1138aidl_mapping {
1139 name: "framework-aidl-mappings",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001140 srcs: [":framework-all-sources"],
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001141 output: "framework-aidl-mappings.txt",
Kyunglyul Hyund51666d2019-04-11 04:08:40 +00001142}
Anna Trostanetski97088e92019-06-26 14:47:58 +01001143
Chen Xu192bf1f2019-09-05 22:07:42 -07001144// Avoid including Parcelable classes as we don't want to have two copies of
Malcolm Chen58b59a52020-01-14 19:25:13 -08001145// Parcelable cross the libraries. This is used by telephony-common (frameworks/opt/telephony)
1146// and TeleService app (packages/services/Telephony).
Chen Xu192bf1f2019-09-05 22:07:42 -07001147filegroup {
Malcolm Chen58b59a52020-01-14 19:25:13 -08001148 name: "framework-telephony-common-shared-srcs",
Chen Xu192bf1f2019-09-05 22:07:42 -07001149 srcs: [
Hall Liuaa4398e2019-12-24 14:13:25 -08001150 "core/java/android/os/BasicShellCommandHandler.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001151 "core/java/android/os/RegistrantList.java",
1152 "core/java/android/os/Registrant.java",
1153 "core/java/android/util/LocalLog.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001154 "core/java/android/util/TimeUtils.java",
1155 "core/java/com/android/internal/os/SomeArgs.java",
Meng Wang9c2a8e02019-12-13 16:45:34 -08001156 "core/java/com/android/internal/util/AsyncChannel.java",
Meng Wang3043dac2020-01-14 14:04:10 -08001157 "core/java/com/android/internal/util/AsyncService.java",
Meng Wang9c2a8e02019-12-13 16:45:34 -08001158 "core/java/com/android/internal/util/BitwiseInputStream.java",
Michelebadc0212019-10-31 11:48:43 -07001159 "core/java/com/android/internal/util/FastXmlSerializer.java",
1160 "core/java/com/android/internal/util/HexDump.java",
Meng Wang64fffb92019-12-02 10:42:20 -08001161 "core/java/com/android/internal/util/IState.java",
Michelebadc0212019-10-31 11:48:43 -07001162 "core/java/com/android/internal/util/IndentingPrintWriter.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001163 "core/java/com/android/internal/util/Preconditions.java",
1164 "core/java/com/android/internal/util/State.java",
1165 "core/java/com/android/internal/util/StateMachine.java",
Michelebadc0212019-10-31 11:48:43 -07001166 "core/java/com/android/internal/util/UserIcons.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001167 ],
1168}
1169
Chen Xu4fea79c2019-10-08 18:39:03 -07001170// Avoid including Parcelable classes as we don't want to have two copies of
Malcolm Chen58b59a52020-01-14 19:25:13 -08001171// Parcelable cross the process. This is used by framework-telephony (frameworks/base/telephony).
1172filegroup {
1173 name: "framework-telephony-shared-srcs",
1174 srcs: [
1175 "core/java/android/util/RecurrenceRule.java",
1176 "core/java/com/android/internal/os/SomeArgs.java",
1177 "core/java/com/android/internal/util/BitwiseInputStream.java",
1178 "core/java/com/android/internal/util/BitwiseOutputStream.java",
1179 "core/java/com/android/internal/util/HexDump.java",
1180 "core/java/com/android/internal/util/IndentingPrintWriter.java",
1181 "core/java/com/android/internal/util/Preconditions.java",
1182 ],
1183}
1184
1185// Avoid including Parcelable classes as we don't want to have two copies of
Chen Xu4fea79c2019-10-08 18:39:03 -07001186// Parcelable cross the process.
1187filegroup {
1188 name: "framework-cellbroadcast-shared-srcs",
1189 srcs: [
Jordan Liu15a72742019-11-20 13:55:18 -08001190 "core/java/android/os/HandlerExecutor.java",
Chen Xu4fea79c2019-10-08 18:39:03 -07001191 "core/java/android/util/LocalLog.java",
Jordan Liu15a72742019-11-20 13:55:18 -08001192 "core/java/com/android/internal/util/IState.java",
1193 "core/java/com/android/internal/util/Preconditions.java",
Chen Xu4fea79c2019-10-08 18:39:03 -07001194 "core/java/com/android/internal/util/State.java",
1195 "core/java/com/android/internal/util/StateMachine.java",
1196 ],
atrostce84de02019-10-08 16:16:47 +01001197}
Roshan Pius09de13e2019-10-16 13:16:04 -07001198
1199filegroup {
Jayachandran Ceeffa012019-10-23 18:06:33 -07001200 name: "framework-ims-common-shared-srcs",
1201 srcs: [
Jayachandran Ceeffa012019-10-23 18:06:33 -07001202 "core/java/android/os/RegistrantList.java",
1203 "core/java/android/os/Registrant.java",
1204 "core/java/com/android/internal/os/SomeArgs.java",
1205 "core/java/com/android/internal/util/Preconditions.java",
1206 ],
1207}
1208
David Su511a8142020-01-09 14:02:21 -08001209// utility classes statically linked into framework-wifi and dynamically linked
1210// into wifi-service
1211java_library {
1212 name: "framework-wifi-util-lib",
1213 sdk_version: "core_current",
1214 srcs: [
1215 "core/java/android/content/pm/BaseParceledListSlice.java",
1216 "core/java/android/content/pm/ParceledListSlice.java",
David Su369c9202020-01-09 18:09:56 -08001217 "core/java/android/net/shared/Inet4AddressUtils.java",
1218 "core/java/android/os/HandlerExecutor.java",
David Su511a8142020-01-09 14:02:21 -08001219 "core/java/com/android/internal/util/AsyncChannel.java",
1220 "core/java/com/android/internal/util/AsyncService.java",
1221 "core/java/com/android/internal/util/Protocol.java",
1222 "core/java/com/android/internal/util/Preconditions.java",
David Su369c9202020-01-09 18:09:56 -08001223 "telephony/java/android/telephony/Annotation.java",
David Su298cd362020-01-17 19:02:49 +00001224 ":net-utils-framework-wifi-common-srcs",
David Su511a8142020-01-09 14:02:21 -08001225 ],
1226 libs: [
1227 "framework-annotations-lib",
1228 "unsupportedappusage",
1229 "android_system_stubs_current",
1230 ],
1231 visibility: ["//frameworks/base/wifi"],
1232}
1233
David Su72f9d632020-02-10 15:58:26 -08001234filegroup {
1235 name: "framework-wifi-util-lib-aidls",
1236 srcs: ["core/java/android/content/pm/ParceledListSlice.aidl"],
1237 path: "core/java",
1238}
1239
David Su511a8142020-01-09 14:02:21 -08001240// utility classes statically linked into wifi-service
Jayachandran Ceeffa012019-10-23 18:06:33 -07001241filegroup {
Roshan Pius62eb61c2019-12-06 13:49:47 -08001242 name: "framework-wifi-service-shared-srcs",
Roshan Pius09de13e2019-10-16 13:16:04 -07001243 srcs: [
Roshan Piusc93cd7a2019-12-09 07:39:41 -08001244 "core/java/android/net/InterfaceConfiguration.java",
Roshan Pius3032c892020-01-08 11:10:15 -08001245 "core/java/android/os/BasicShellCommandHandler.java",
Roshan Pius04769a52019-12-04 13:03:47 -08001246 "core/java/android/util/BackupUtils.java",
Roshan Pius09de13e2019-10-16 13:16:04 -07001247 "core/java/android/util/Rational.java",
Roshan Pius09de13e2019-10-16 13:16:04 -07001248 "core/java/com/android/internal/util/FastXmlSerializer.java",
1249 "core/java/com/android/internal/util/HexDump.java",
1250 "core/java/com/android/internal/util/IState.java",
1251 "core/java/com/android/internal/util/MessageUtils.java",
Roshan Pius09de13e2019-10-16 13:16:04 -07001252 "core/java/com/android/internal/util/State.java",
1253 "core/java/com/android/internal/util/StateMachine.java",
1254 "core/java/com/android/internal/util/WakeupMessage.java",
Roshan Pius09de13e2019-10-16 13:16:04 -07001255 ],
David Su298cd362020-01-17 19:02:49 +00001256 visibility: ["//frameworks/opt/net/wifi/service"],
Roshan Pius09de13e2019-10-16 13:16:04 -07001257}
Jiyong Park0d7e86d2019-12-20 14:35:43 +09001258
1259// TODO(b/145644363): move this to under StubLibraries.bp or ApiDocs.bp
1260metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.xml) " +
1261 "--ignore-classes-on-classpath " +
1262 "--hide-package com.android.server " +
1263 "--error UnhiddenSystemApi " +
1264 "--hide RequiresPermission " +
1265 "--hide CallbackInterface " +
1266 "--hide MissingPermission --hide BroadcastBehavior " +
1267 "--hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol " +
1268 "--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo " +
Aurimas Liutikas1f76a5a2019-11-20 17:51:42 -08001269 "--force-convert-to-warning-nullability-annotations +*:-android.*:+android.icu.*:-dalvik.* " +
1270 "--api-lint-ignore-prefix android.icu. " +
1271 "--api-lint-ignore-prefix java. " +
1272 "--api-lint-ignore-prefix junit. " +
1273 "--api-lint-ignore-prefix org. "
Jiyong Park0d7e86d2019-12-20 14:35:43 +09001274
1275build = [
1276 "StubLibraries.bp",
1277 "ApiDocs.bp",
1278]
Chen Xu546ce5e2020-01-10 08:38:31 -08001279
1280// TODO(b/147699819): move to frameworks/base/telephony/ folder
1281droidstubs {
1282 name: "framework-telephony-stubs-srcs",
1283 srcs: [
1284 ":framework-telephony-sources",
1285 ":framework_native_aidl",
1286 ":framework-javastream-protos",
1287 ],
1288 aidl: {
1289 local_include_dirs: [
1290 "core/java",
1291 "telecomm/java"
1292 ],
1293 },
1294 libs: [
1295 "framework-annotations-lib",
1296 "android.hardware.radio-V1.5-java",
1297 ],
Anton Hanssonbb61f962020-01-17 19:03:34 +00001298 check_api: {
1299 current: {
1300 // TODO(b/147699819): remove telephony prefix when moved
1301 api_file: "telephony/api/system-current.txt",
1302 removed_api_file: "telephony/api/system-removed.txt",
1303 },
1304 },
Chen Xu546ce5e2020-01-10 08:38:31 -08001305 defaults: ["framework-module-stubs-defaults-systemapi"],
1306 filter_packages: ["android.telephony"],
1307 sdk_version: "system_current",
1308}
1309
1310java_library {
1311 name: "framework-telephony-stubs",
1312 srcs: [":framework-telephony-stubs-srcs"],
1313 // TODO(b/147699819): move public aidls to a separate folder and potentially remove
1314 // below aidl exports.
1315 aidl: {
1316 export_include_dirs: ["telephony/java"],
1317 },
David Suc976e862020-01-16 20:50:11 -08001318 sdk_version: "core_current",
1319 libs: ["android_system_stubs_current"],
Chen Xu546ce5e2020-01-10 08:38:31 -08001320}
1321
1322java_library {
1323 name: "framework-telephony",
1324 srcs: [
1325 ":framework-telephony-sources",
Malcolm Chen58b59a52020-01-14 19:25:13 -08001326 ":framework-telephony-shared-srcs",
Chen Xu546ce5e2020-01-10 08:38:31 -08001327 ],
1328 // TODO: change to framework-system-stub to build against system APIs.
1329 libs: [
1330 "framework-minus-apex",
1331 "unsupportedappusage",
1332 ],
1333 static_libs: [
1334 "libphonenumber-platform",
1335 "app-compat-annotations",
1336 ],
1337 sdk_version: "core_platform",
1338 aidl: {
1339 export_include_dirs: ["telephony/java"],
1340 include_dirs: [
1341 "frameworks/native/aidl/binder",
1342 "frameworks/native/aidl/gui",
1343 ]
1344 },
Malcolm Chen58b59a52020-01-14 19:25:13 -08001345 jarjar_rules: ":framework-telephony-jarjar-rules",
Chen Xu546ce5e2020-01-10 08:38:31 -08001346 dxflags: [
1347 "--core-library",
1348 "--multi-dex",
1349 ],
1350 // This is to break the dependency from boot jars.
1351 dex_preopt: {
1352 enabled: false,
1353 },
1354 installable: true,
1355}
1356
1357filegroup {
1358 // TODO (b/147690217): move to frameworks/base/telephony/common.
1359 name: "framework-telephony-annotations",
1360 srcs: ["telephony/java/android/telephony/Annotation.java"],
1361}
1362
1363filegroup {
Malcolm Chen58b59a52020-01-14 19:25:13 -08001364 name: "framework-telephony-jarjar-rules",
Chen Xu546ce5e2020-01-10 08:38:31 -08001365 srcs: ["telephony/framework-telephony-jarjar-rules.txt"],
1366}