blob: ce4bd595d31b9c34a3810604dad114fb9db2fa46 [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",
56}
57
Jiyong Parkb3609312019-08-16 21:17:14 +090058filegroup {
59 name: "framework-drm-sources",
60 srcs: [
61 "drm/java/**/*.java",
62 ],
63 path: "drm/java",
64}
Jiyong Park1cc95662019-08-07 22:45:07 +090065
Jiyong Parkb3609312019-08-16 21:17:14 +090066filegroup {
67 name: "framework-graphics-sources",
68 srcs: [
69 "graphics/java/**/*.java",
70 "graphics/java/**/*.aidl",
71 ],
72 path: "graphics/java",
73}
74
75filegroup {
76 name: "framework-keystore-sources",
77 srcs: [
78 "keystore/java/**/*.java",
79 "keystore/java/**/*.aidl",
80 ],
81 path: "keystore/java",
82}
83
84filegroup {
85 name: "framework-location-sources",
86 srcs: [
87 "location/java/**/*.java",
88 "location/java/**/*.aidl",
89 ],
90 path: "location/java",
91}
92
93filegroup {
94 name: "framework-lowpan-sources",
95 srcs: [
96 "lowpan/java/**/*.java",
97 "lowpan/java/**/*.aidl",
98 ],
99 path: "lowpan/java",
100}
101
102filegroup {
103 name: "framework-media-sources",
104 srcs: [
105 "media/java/**/*.java",
106 "media/java/**/*.aidl",
107 ],
108 path: "media/java",
109}
110
111filegroup {
112 name: "framework-mca-effect-sources",
113 srcs: [
114 "media/mca/effect/java/**/*.java",
115 ],
116 path: "media/mca/effect/java",
117}
118
119filegroup {
120 name: "framework-mca-filterfw-sources",
121 srcs: [
122 "media/mca/filterfw/java/**/*.java",
123 ],
124 path: "media/mca/filterfw/java",
125}
126
127filegroup {
128 name: "framework-mca-filterpacks-sources",
129 srcs: [
130 "media/mca/filterpacks/java/**/*.java",
131 ],
132 path: "media/mca/filterpacks/java",
133}
134
135filegroup {
Tobias Thierer878c77b2019-08-18 15:19:45 +0100136 name: "framework-mime-sources",
137 srcs: [
138 "mime/java/**/*.java",
139 ],
140 path: "mime/java",
141}
142
143filegroup {
Jiyong Parkb3609312019-08-16 21:17:14 +0900144 name: "framework-opengl-sources",
145 srcs: [
146 "opengl/java/**/*.java",
147 ],
148 path: "opengl/java",
149}
150
151filegroup {
152 name: "framework-rs-sources",
153 srcs: [
154 "rs/java/**/*.java",
155 ],
156 path: "rs/java",
157}
158
159filegroup {
160 name: "framework-sax-sources",
161 srcs: [
162 "sax/java/**/*.java",
163 ],
164 path: "sax/java",
165}
166
167filegroup {
168 name: "framework-telecomm-sources",
169 srcs: [
170 "telecomm/java/**/*.java",
171 "telecomm/java/**/*.aidl",
172 ],
173 path: "telecomm/java",
174}
175
176filegroup {
177 name: "framework-telephony-sources",
178 srcs: [
179 "telephony/java/**/*.java",
180 "telephony/java/**/*.aidl",
181 ],
182 path: "telephony/java",
183}
184
185filegroup {
Amit Mahajand3551532019-09-23 17:59:57 -0700186 name: "framework-telephony-common-sources",
187 srcs: [
188 "telephony/common/**/*.java",
189 ],
190 path: "telephony/common",
191}
192
193filegroup {
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700194 name: "framework-mms-sources",
195 srcs: [
196 "mms/java/**/*.java",
197 "mms/java/**/*.aidl",
198 ],
199 path: "mms/java",
200}
201
202filegroup {
Jiyong Parkae9972b2019-09-15 20:19:02 +0900203 name: "framework-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900204 srcs: [
205 // Java/AIDL sources under frameworks/base
Sudheer Shankaf5b36962019-10-04 16:16:13 -0700206 ":framework-blobstore-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900207 ":framework-core-sources",
208 ":framework-drm-sources",
209 ":framework-graphics-sources",
Jiyong Park48cc3722019-10-21 14:01:06 +0900210 ":framework-jobscheduler-sources", // jobscheduler is not a module for R
Jiyong Park20426532019-08-19 15:24:49 +0900211 ":framework-keystore-sources",
212 ":framework-location-sources",
213 ":framework-lowpan-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900214 ":framework-mca-effect-sources",
215 ":framework-mca-filterfw-sources",
216 ":framework-mca-filterpacks-sources",
Jiyong Park48cc3722019-10-21 14:01:06 +0900217 ":framework-media-sources",
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700218 ":framework-mms-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900219 ":framework-opengl-sources",
220 ":framework-rs-sources",
221 ":framework-sax-sources",
222 ":framework-telecomm-sources",
Amit Mahajand3551532019-09-23 17:59:57 -0700223 ":framework-telephony-common-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900224 ":framework-telephony-sources",
David Su130441b2019-12-14 21:37:20 -0800225 ":framework-wifi-annotations",
David Su6f646ef2019-12-10 13:33:06 -0800226 ":framework-wifi-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900227 ":PacProcessor-aidl-sources",
228 ":ProxyHandler-aidl-sources",
Jiyong Parkb3609312019-08-16 21:17:14 +0900229
atrost87488352019-10-10 19:27:31 +0100230 // AIDL from frameworks/base/native/
231 ":platform-compat-native-aidl",
232
Jiyong Park20426532019-08-19 15:24:49 +0900233 // AIDL sources from external directories
234 ":dumpstate_aidl",
235 ":framework_native_aidl",
236 ":gatekeeper_aidl",
237 ":gsiservice_aidl",
238 ":incidentcompanion_aidl",
239 ":installd_aidl",
240 ":keystore_aidl",
241 ":libaudioclient_aidl",
242 ":libbinder_aidl",
243 ":libbluetooth-binder-aidl",
244 ":libcamera_client_aidl",
245 ":libcamera_client_framework_aidl",
246 ":libupdate_engine_aidl",
Ruchir Rastogicd9dd942019-11-27 15:26:03 -0800247 // TODO: this needs to be removed when statsd-framework.jar is separated out
Jeffrey Huang8c1ae5a2019-12-12 10:56:24 -0800248 ":statsd_java_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900249 ":storaged_aidl",
250 ":vold_aidl",
Jiyong Park1cc95662019-08-07 22:45:07 +0900251
Jiyong Park20426532019-08-19 15:24:49 +0900252 // For the generated R.java and Manifest.java
253 ":framework-res{.aapt.srcjar}",
254
255 // etc.
256 ":framework-javastream-protos",
257 ":framework-statslog-gen",
258 ],
259}
Jiyong Park1cc95662019-08-07 22:45:07 +0900260
Jiyong Parkae9972b2019-09-15 20:19:02 +0900261filegroup {
Anton Hanssonb4f35572019-12-02 16:30:22 +0000262 name: "framework-updatable-sources",
263 srcs: [
Alexander Dorokhine04a05a82019-12-17 10:41:21 -0800264 ":framework-appsearch-sources",
Anton Hansson5b972692020-01-08 09:48:18 +0000265 ":framework-sdkextensions-sources",
Muhammad Qureshi237c7742019-12-12 11:03:55 -0800266 ":framework-statsd-sources",
markchienae8aa642019-12-16 20:15:20 +0800267 ":framework-tethering-srcs",
Anton Hanssonb4f35572019-12-02 16:30:22 +0000268 ":updatable-media-srcs",
Jeff Sharkey40182832019-12-18 14:06:48 -0700269 ":framework-mediaprovider-sources",
David Su754fcc22019-09-04 14:31:58 -0700270 ":framework-wifi-updatable-sources",
Anton Hanssonb4f35572019-12-02 16:30:22 +0000271 ]
272}
273
274filegroup {
Jiyong Parkae9972b2019-09-15 20:19:02 +0900275 name: "framework-all-sources",
276 srcs: [
Tobias Thiererc0c06082019-11-22 16:33:18 +0000277 ":framework-mime-sources",
Jiyong Parkae9972b2019-09-15 20:19:02 +0900278 ":framework-non-updatable-sources",
Anton Hanssonb4f35572019-12-02 16:30:22 +0000279 ":framework-updatable-sources",
Jiyong Parkae9972b2019-09-15 20:19:02 +0900280 ],
281}
282
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100283java_defaults {
Makoto Onuki62242c42019-08-05 12:54:20 -0700284 name: "framework-aidl-export-defaults",
Makoto Onuki62242c42019-08-05 12:54:20 -0700285 aidl: {
Jiyong Parkb3609312019-08-16 21:17:14 +0900286 export_include_dirs: [
Dongwon Kangdd652692020-01-03 13:54:21 -0800287 "apex/media/framework/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900288 "core/java",
289 "drm/java",
290 "graphics/java",
291 "keystore/java",
292 "location/java",
293 "lowpan/java",
294 "media/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900295 "media/mca/effect/java",
296 "media/mca/filterfw/java",
297 "media/mca/filterpacks/java",
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700298 "mms/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900299 "opengl/java",
300 "rs/java",
301 "sax/java",
302 "telecomm/java",
303 "telephony/java",
304 "wifi/java",
305 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700306 },
Adam Pardyl50207032019-09-09 14:37:27 +0200307
308 required: [
Adam Pardyl0f1b3d42019-08-19 15:24:11 +0200309 // TODO: remove gps_debug and protolog.conf.json when the build system propagates "required" properly.
Adam Pardyl50207032019-09-09 14:37:27 +0200310 "gps_debug.conf",
Adam Pardyl0f1b3d42019-08-19 15:24:11 +0200311 "protolog.conf.json.gz",
Adam Pardyl50207032019-09-09 14:37:27 +0200312 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700313}
314
Jiyong Park20426532019-08-19 15:24:49 +0900315// Collection of classes that are generated from non-Java files that are not listed in
316// framework_srcs. These have no or very limited dependency to the framework.
317java_library {
318 name: "framework-internal-utils",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800319 static_libs: [
Dario Frenid8bf22e2018-08-31 14:18:04 +0100320 "apex_aidl_interface-java",
Kalesh Singh759af322019-06-19 12:17:43 -0700321 "suspend_control_aidl_interface-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800322 "framework-protos",
Peiyong Lin9ca1dd82019-01-12 17:44:29 -0800323 "game-driver-protos",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800324 "android.hidl.base-V1.0-java",
Henry Fang5215ac92019-02-01 19:24:55 +0000325 "android.hardware.cas-V1.1-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800326 "android.hardware.cas-V1.0-java",
327 "android.hardware.contexthub-V1.0-java",
Yu-Han Yang9fe06dd2019-11-18 16:23:31 -0800328 "android.hardware.gnss-V1.0-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800329 "android.hardware.health-V1.0-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800330 "android.hardware.radio-V1.0-java",
331 "android.hardware.radio-V1.1-java",
332 "android.hardware.radio-V1.2-java",
333 "android.hardware.radio-V1.3-java",
334 "android.hardware.radio-V1.4-java",
Sarah Chin21e9c632019-11-05 13:30:10 -0800335 "android.hardware.radio-V1.5-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800336 "android.hardware.thermal-V1.0-java-constants",
Wei Wangfb21bd82019-01-10 14:16:23 -0800337 "android.hardware.thermal-V1.0-java",
Wei Wangbad7c202018-11-01 11:57:39 -0700338 "android.hardware.thermal-V1.1-java",
339 "android.hardware.thermal-V2.0-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800340 "android.hardware.tv.input-V1.0-java-constants",
shubang7e849b02019-10-18 19:36:25 -0700341 "android.hardware.tv.tuner-V1.0-java-constants",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800342 "android.hardware.usb-V1.0-java-constants",
343 "android.hardware.usb-V1.1-java-constants",
Badhri Jagan Sridharane966a382018-12-09 14:49:38 -0800344 "android.hardware.usb-V1.2-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800345 "android.hardware.usb.gadget-V1.0-java",
Michael Wrightf268bf52018-02-07 23:23:34 +0000346 "android.hardware.vibrator-V1.0-java",
347 "android.hardware.vibrator-V1.1-java",
348 "android.hardware.vibrator-V1.2-java",
Harpreet "Eli" Sanghaa456f082018-12-14 12:06:10 +0900349 "android.hardware.vibrator-V1.3-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800350 "android.hardware.wifi-V1.0-java-constants",
arangelov1ab61492018-11-22 13:56:50 +0000351 "devicepolicyprotosnano",
Inseob Kim4fe9f0f2019-07-30 18:23:26 +0900352
353 "com.android.sysprop.apex",
354 "PlatformProperties",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800355 ],
Jiyong Park20426532019-08-19 15:24:49 +0900356 sdk_version: "core_platform",
357 installable: false,
358}
359
360java_defaults {
361 name: "framework-defaults",
362 defaults: ["framework-aidl-export-defaults"],
363 installable: true,
364
Jiyong Park20426532019-08-19 15:24:49 +0900365 aidl: {
366 generate_get_transaction_name: true,
367 },
368
Jiyong Parkae9972b2019-09-15 20:19:02 +0900369 srcs: ["core/java/**/*.logtags"],
370
Jiyong Park20426532019-08-19 15:24:49 +0900371 exclude_srcs: [
372 // See comment on framework-atb-backward-compatibility module below
Winson14ff7172019-10-23 10:42:27 -0700373 "core/java/android/content/pm/parsing/library/AndroidTestBaseUpdater.java",
Jiyong Park20426532019-08-19 15:24:49 +0900374 ],
375
376 sdk_version: "core_platform",
377 libs: [
Artur Satayev6aa25ec2019-12-11 16:33:22 +0000378 "app-compat-annotations",
Jiyong Park20426532019-08-19 15:24:49 +0900379 "ext",
Artur Satayev6aa25ec2019-12-11 16:33:22 +0000380 "unsupportedappusage",
Jiyong Park20426532019-08-19 15:24:49 +0900381 "updatable_media_stubs",
Jeff Sharkey40182832019-12-18 14:06:48 -0700382 "framework_mediaprovider_stubs",
markchienae8aa642019-12-16 20:15:20 +0800383 "framework-tethering",
Jiyong Park20426532019-08-19 15:24:49 +0900384 ],
385
386 jarjar_rules: ":framework-jarjar-rules",
387
Tobias Thierer878c77b2019-08-18 15:19:45 +0100388 static_libs: [
389 "framework-internal-utils",
Tobias Thierer878c77b2019-08-18 15:19:45 +0100390 ],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800391
Colin Crosscf3a0b52017-11-16 00:15:28 -0800392 dxflags: [
393 "--core-library",
394 "--multi-dex",
395 ],
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100396
Eugene Susla3b2fe612019-08-06 18:47:14 -0700397 plugins: [
398 "view-inspector-annotation-processor",
399 "staledataclass-annotation-processor",
400 ],
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100401}
402
Colin Crossbc2dc312018-10-26 22:34:06 -0700403filegroup {
Steven Moreland19e8d462019-03-08 10:44:22 -0800404 name: "framework-jarjar-rules",
David Su130441b2019-12-14 21:37:20 -0800405 srcs: ["framework-jarjar-rules.txt"],
Steven Moreland19e8d462019-03-08 10:44:22 -0800406}
407
408filegroup {
Colin Crossbc2dc312018-10-26 22:34:06 -0700409 name: "libincident_aidl",
410 srcs: [
411 "core/java/android/os/IIncidentManager.aidl",
412 "core/java/android/os/IIncidentReportStatusListener.aidl",
413 ],
Dan Willemsen4a498502019-06-05 15:51:24 -0700414 path: "core/java",
Colin Crossbc2dc312018-10-26 22:34:06 -0700415}
416
417filegroup {
Michael Wrightc390fbe2018-12-12 19:45:09 +0000418 name: "libvibrator_aidl",
419 srcs: [
420 "core/java/android/os/IExternalVibrationController.aidl",
421 "core/java/android/os/IExternalVibratorService.aidl",
422 ],
Dan Willemsen4a498502019-06-05 15:51:24 -0700423 path: "core/java",
Michael Wrightc390fbe2018-12-12 19:45:09 +0000424}
425
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100426java_library {
Makoto Onuki62242c42019-08-05 12:54:20 -0700427 name: "framework-minus-apex",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100428 defaults: ["framework-defaults"],
Jiyong Parkae9972b2019-09-15 20:19:02 +0900429 srcs: [":framework-non-updatable-sources"],
Muhammad Qureshi237c7742019-12-12 11:03:55 -0800430 libs: [
Alexander Dorokhine04a05a82019-12-17 10:41:21 -0800431 "framework-appsearch-stubs",
Muhammad Qureshi237c7742019-12-12 11:03:55 -0800432 // TODO(b/146167933): Use framework-statsd-stubs
433 "framework-statsd",
David Su754fcc22019-09-04 14:31:58 -0700434 "framework-wifi-stubs",
Muhammad Qureshi237c7742019-12-12 11:03:55 -0800435 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700436 installable: true,
Jiyong Park911cd4f2019-10-21 14:35:14 +0900437 javac_shard_size: 150,
atrostaec9bc12019-08-16 18:14:09 +0100438 required: [
439 "framework-platform-compat-config",
440 "libcore-platform-compat-config",
atrost86895aa2019-08-19 16:51:15 +0100441 "services-platform-compat-config",
atrost8bea6472019-10-10 19:33:22 +0100442 "media-provider-platform-compat-config",
atrostce84de02019-10-08 16:16:47 +0100443 "services-devicepolicy-platform-compat-config",
atrostc3c2e4d2019-11-29 11:27:27 +0000444 "services-core-platform-compat-config",
atrostaec9bc12019-08-16 18:14:09 +0100445 ],
Tobias Thiererc0c06082019-11-22 16:33:18 +0000446 static_libs: [
Tobias Thierer82968532019-11-29 19:39:45 +0000447 // If MimeMap ever becomes its own APEX, then this dependency would need to be removed
448 // in favor of an API stubs dependency in java_library "framework" below.
Tobias Thiererc0c06082019-11-22 16:33:18 +0000449 "mimemap",
450 ],
Jiyong Park911cd4f2019-10-21 14:35:14 +0900451 // For backwards compatibility.
452 stem: "framework",
Jiyong Park352f9e22019-12-09 14:45:07 +0900453 apex_available: ["//apex_available:platform"],
Jiyong Park212d2e82020-01-03 21:07:38 +0900454 visibility: [
455 "//frameworks/base",
456 // TODO(b/144149403) remove the below lines
457 "//frameworks/base/apex/appsearch/framework",
458 "//frameworks/base/apex/blobstore/framework",
459 "//frameworks/base/apex/jobscheduler/framework",
460 "//frameworks/base/apex/statsd/service",
461 "//frameworks/base/wifi",
462 "//frameworks/opt/net/wifi/service",
463 ],
Jiyong Park911cd4f2019-10-21 14:35:14 +0900464}
465
466// This "framework" module is NOT installed to the device. It's
467// "framework-minus-apex" that gets installed to the device. Note that
468// the filename is still framework.jar (via the stem property) for
469// compatibility reason. The purpose of this module is to provide
470// framework APIs (both public and private) for bundled apps.
471// "framework-minus-apex" can't be used for the purpose because 1)
472// many apps have already hardcoded the name "framework" and
473// 2) it lacks API symbols from updatable modules - as it's clear from
474// its suffix "-minus-apex".
475java_library {
476 name: "framework",
477 defaults: ["framework-aidl-export-defaults"],
478 installable: false, // this lib is a build-only library
479 static_libs: [
480 "framework-minus-apex",
Jiyong Park92721342019-12-18 17:26:38 +0900481 "updatable_media_stubs",
Jeff Sharkey40182832019-12-18 14:06:48 -0700482 "framework_mediaprovider_stubs",
Alexander Dorokhine04a05a82019-12-17 10:41:21 -0800483 "framework-appsearch", // TODO(b/146218515): should be framework-appsearch-stubs
Anton Hansson5b972692020-01-08 09:48:18 +0000484 "framework-sdkextensions-stubs-systemapi",
Muhammad Qureshi237c7742019-12-12 11:03:55 -0800485 // TODO(b/146167933): Use framework-statsd-stubs instead.
486 "framework-statsd",
David Su754fcc22019-09-04 14:31:58 -0700487 // TODO(b/140299412): should be framework-wifi-stubs
488 "framework-wifi",
Anton Hansson355000d2019-12-06 17:07:45 +0000489 // TODO(jiyong): add more stubs for APEXes here
Jiyong Park911cd4f2019-10-21 14:35:14 +0900490 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700491 sdk_version: "core_platform",
Jiyong Park352f9e22019-12-09 14:45:07 +0900492 apex_available: ["//apex_available:platform"],
Makoto Onuki62242c42019-08-05 12:54:20 -0700493}
494
495java_library {
Jiyong Parkae9972b2019-09-15 20:19:02 +0900496 name: "framework-all",
497 defaults: ["framework-defaults"],
498 srcs: [":framework-all-sources"],
499 installable: false,
Jiyong Park352f9e22019-12-09 14:45:07 +0900500 static_libs: ["exoplayer2-core"],
501 apex_available: ["//apex_available:platform"],
Jiyong Park97183492019-11-14 03:07:36 +0000502}
503
504java_library {
505 name: "framework-annotation-proc",
506 defaults: ["framework-aidl-export-defaults"],
507 srcs: [":framework-all-sources"],
Artur Satayev6aa25ec2019-12-11 16:33:22 +0000508 libs: [
509 "app-compat-annotations",
510 "unsupportedappusage",
511 ],
Jiyong Park97183492019-11-14 03:07:36 +0000512 installable: false,
atrostb9c34502019-08-05 12:22:18 +0100513 plugins: [
514 "unsupportedappusage-annotation-processor",
515 "compat-changeid-annotation-processor",
516 ],
Santiago Seifert5466a7d2019-11-11 19:27:04 +0000517 static_libs: [
518 "exoplayer2-core"
519 ]
atrostb9c34502019-08-05 12:22:18 +0100520}
521
522platform_compat_config {
523 name: "framework-platform-compat-config",
Jiyong Park97183492019-11-14 03:07:36 +0000524 src: ":framework-annotation-proc",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100525}
526
Paul Duffin521975802019-06-05 10:35:08 +0100527// A library including just UnsupportedAppUsage.java classes.
528//
529// Provided for target so that libraries can use it without depending on
530// the whole of framework or the core platform API.
531//
532// Built for host so that the annotation processor can also use this annotation.
533java_library {
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100534 name: "unsupportedappusage-annotation",
Paul Duffin521975802019-06-05 10:35:08 +0100535 host_supported: true,
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100536 srcs: [
537 "core/java/android/annotation/IntDef.java",
538 "core/java/android/annotation/UnsupportedAppUsage.java",
Paul Duffinc1308012019-10-10 16:33:42 +0100539 ],
540 static_libs: [
541 "art.module.api.annotations",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100542 ],
Paul Duffin521975802019-06-05 10:35:08 +0100543
544 sdk_version: "core_current",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800545}
546
Paul Duffinbeee5dc2018-01-23 13:39:00 +0000547// A temporary build target that is conditionally included on the bootclasspath if
Paul Duffina3b69212018-01-25 09:58:32 +0000548// android.test.base library has been removed and which provides support for
549// maintaining backwards compatibility for APKs that target pre-P and depend on
550// android.test.base classes. This is used iff REMOVE_ATB_FROM_BCP=true is
551// specified on the build command line.
552java_library {
553 name: "framework-atb-backward-compatibility",
Paul Duffinfab87542019-02-15 11:39:12 +0000554 installable: true,
atrost1a945502019-11-04 17:03:54 +0000555 libs: ["app-compat-annotations"],
Paul Duffina3b69212018-01-25 09:58:32 +0000556 srcs: [
Winson14ff7172019-10-23 10:42:27 -0700557 "core/java/android/content/pm/parsing/library/AndroidTestBaseUpdater.java",
Paul Duffina3b69212018-01-25 09:58:32 +0000558 ],
559}
560
Colin Crosscf3a0b52017-11-16 00:15:28 -0800561genrule {
562 name: "framework-statslog-gen",
563 tools: ["stats-log-api-gen"],
564 cmd: "$(location stats-log-api-gen) --java $(out)",
David Chen0a368b22017-12-06 16:28:16 -0800565 out: ["android/util/StatsLogInternal.java"],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800566}
567
568gensrcs {
569 name: "framework-javastream-protos",
570 depfile: true,
571
572 tools: [
573 "aprotoc",
574 "protoc-gen-javastream",
575 "soong_zip",
576 ],
577
Anton Hanssond82b2f72019-11-18 13:34:56 +0000578 cmd: "mkdir -p $(genDir)/$(in) " +
579 "&& $(location aprotoc) " +
580 " --plugin=$(location protoc-gen-javastream) " +
581 " --dependency_out=$(depfile) " +
582 " --javastream_out=$(genDir)/$(in) " +
583 " -Iexternal/protobuf/src " +
584 " -I . " +
585 " $(in) " +
586 "&& $(location soong_zip) -jar -o $(out) -C $(genDir)/$(in) -D $(genDir)/$(in)",
587
Yi Jin437aa6e2018-01-10 11:34:26 -0800588 srcs: [
589 "core/proto/**/*.proto",
590 "libs/incident/**/*.proto",
591 ],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800592 output_extension: "srcjar",
593}
594
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900595filegroup {
Chalard Jean95213512019-01-30 21:04:58 +0900596 name: "framework-annotations",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900597 srcs: [
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900598 "core/java/android/annotation/IntDef.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900599 "core/java/android/annotation/IntRange.java",
Jeff Sharkey40182832019-12-18 14:06:48 -0700600 "core/java/android/annotation/NonNull.java",
601 "core/java/android/annotation/Nullable.java",
602 "core/java/android/annotation/RequiresPermission.java",
603 "core/java/android/annotation/SdkConstant.java",
Anton Hanssondc1e99b2019-12-06 17:07:28 +0000604 "core/java/android/annotation/SystemApi.java",
Jeff Sharkey40182832019-12-18 14:06:48 -0700605 "core/java/android/annotation/TestApi.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900606 "core/java/android/annotation/UnsupportedAppUsage.java",
Remi NGUYEN VAN231b52b2019-01-29 15:38:52 +0900607 "core/java/com/android/internal/annotations/GuardedBy.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900608 "core/java/com/android/internal/annotations/VisibleForTesting.java",
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100609 ],
Chalard Jean95213512019-01-30 21:04:58 +0900610}
611
Anton Hansson4ec07fa2019-11-08 15:18:04 +0000612java_library {
613 name: "framework-annotations-lib",
614 srcs: [ ":framework-annotations" ],
Anton Hansson791551a2019-12-19 10:17:46 +0000615 sdk_version: "core_current",
Anton Hansson4ec07fa2019-11-08 15:18:04 +0000616}
617
Chalard Jean95213512019-01-30 21:04:58 +0900618filegroup {
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900619 name: "framework-networkstack-shared-srcs",
620 srcs: [
621 // TODO: remove these annotations as soon as we can use andoid.support.annotations.*
Chalard Jean95213512019-01-30 21:04:58 +0900622 ":framework-annotations",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900623 "core/java/android/net/DhcpResults.java",
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900624 "core/java/android/util/LocalLog.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900625 "core/java/com/android/internal/util/HexDump.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900626 "core/java/com/android/internal/util/IndentingPrintWriter.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900627 "core/java/com/android/internal/util/IState.java",
628 "core/java/com/android/internal/util/MessageUtils.java",
629 "core/java/com/android/internal/util/Preconditions.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900630 "core/java/com/android/internal/util/RingBufferIndices.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900631 "core/java/com/android/internal/util/State.java",
632 "core/java/com/android/internal/util/StateMachine.java",
Chalard Jean6a76b7e2019-04-09 11:16:56 +0900633 "core/java/com/android/internal/util/TrafficStatsConstants.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900634 "core/java/com/android/internal/util/WakeupMessage.java",
johnson.yeh095b7a02019-12-19 20:30:34 +0800635 "core/java/com/android/internal/util/TokenBucket.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900636 "core/java/android/net/shared/*.java",
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100637 ],
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900638}
639
markchienae8aa642019-12-16 20:15:20 +0800640// keep these files in sync with the package/Tethering/jarjar-rules.txt for the tethering module.
markchiena6ba54d2019-09-03 15:58:06 +0800641filegroup {
642 name: "framework-tethering-shared-srcs",
643 srcs: [
644 "core/java/android/util/LocalLog.java",
markchienae8aa642019-12-16 20:15:20 +0800645 "core/java/com/android/internal/util/IndentingPrintWriter.java",
646 "core/java/com/android/internal/util/IState.java",
647 "core/java/com/android/internal/util/MessageUtils.java",
648 "core/java/com/android/internal/util/Preconditions.java",
649 "core/java/com/android/internal/util/State.java",
650 "core/java/com/android/internal/util/StateMachine.java",
markchien986750b2019-12-06 15:24:53 +0800651 "core/java/android/net/shared/Inet4AddressUtils.java",
markchienae8aa642019-12-16 20:15:20 +0800652 ],
653}
654
655filegroup {
656 name: "framework-tethering-annotations",
657 srcs: [
658 "core/java/android/annotation/NonNull.java",
659 "core/java/android/annotation/SystemApi.java",
markchiena6ba54d2019-09-03 15:58:06 +0800660 ],
661}
Colin Crossd8e02252017-10-02 17:14:22 -0700662// Build ext.jar
663// ============================================================
664java_library {
665 name: "ext",
Colin Crossa12c0f52018-06-27 11:00:11 -0700666 installable: true,
Paul Duffin8fcace42019-06-12 13:47:18 +0100667 sdk_version: "core_platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700668 static_libs: [
669 "libphonenumber-platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700670 "tagsoup",
Ricky Wai0d1bc332017-10-31 14:31:01 +0000671 "rappor",
Tony Mak64c4cb22018-09-25 13:38:28 +0100672 "libtextclassifier-java",
673 ],
674 required: [
675 "libtextclassifier",
Colin Crossd8e02252017-10-02 17:14:22 -0700676 ],
677 dxflags: ["--core-library"],
678}
679
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700680// ==== java proto host library ==============================
681java_library_host {
682 name: "platformprotos",
683 srcs: [
684 "cmds/am/proto/instrumentation_data.proto",
Howard Ro0546d542018-08-30 16:23:44 -0700685 "cmds/statsd/src/**/*.proto",
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700686 "core/proto/**/*.proto",
687 "libs/incident/proto/**/*.proto",
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700688 ],
689 proto: {
690 include_dirs: ["external/protobuf/src"],
691 type: "full",
692 },
693 errorprone: {
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100694 javacflags: ["-Xep:MissingOverride:OFF"], // b/72714520
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700695 },
696}
697
Colin Cross43214162018-08-20 13:57:24 -0700698// ==== java proto device library (for test only) ==============================
699java_library {
700 name: "platformprotosnano",
701 proto: {
702 type: "nano",
703 output_params: ["store_unknown_fields=true"],
704 include_dirs: ["external/protobuf/src"],
705 },
Joe Onorato99598ee2019-02-11 15:55:13 +0000706 exclude_srcs: [
707 "core/proto/android/privacy.proto",
708 "core/proto/android/section.proto",
709 ],
Anton Hansson791551a2019-12-19 10:17:46 +0000710 sdk_version: "9",
Colin Cross43214162018-08-20 13:57:24 -0700711 srcs: [
712 "core/proto/**/*.proto",
713 "libs/incident/proto/android/os/**/*.proto",
714 ],
715}
716
717// ==== java proto device library (for test only) ==============================
718java_library {
719 name: "platformprotoslite",
720 proto: {
721 type: "lite",
722 include_dirs: ["external/protobuf/src"],
723 },
724
725 srcs: [
726 "core/proto/**/*.proto",
727 "libs/incident/proto/android/os/**/*.proto",
728 ],
Joe Onorato99598ee2019-02-11 15:55:13 +0000729 exclude_srcs: [
730 "core/proto/android/privacy.proto",
731 "core/proto/android/section.proto",
732 ],
Anton Hansson791551a2019-12-19 10:17:46 +0000733 sdk_version: "core_current",
Colin Cross43214162018-08-20 13:57:24 -0700734 // Protos have lots of MissingOverride and similar.
735 errorprone: {
736 javacflags: ["-XepDisableAllChecks"],
737 },
738}
739
Colin Crossaa0d4352017-05-02 14:14:56 -0700740// ==== c++ proto device library ==============================
Joe Onorato99598ee2019-02-11 15:55:13 +0000741cc_defaults {
742 name: "libplatformprotos-defaults",
743
Colin Crossaa0d4352017-05-02 14:14:56 -0700744 proto: {
745 export_proto_headers: true,
746 include_dirs: ["external/protobuf/src"],
747 },
748
Chih-Hung Hsiehc7edf072017-10-03 09:57:55 -0700749 cflags: [
750 "-Wall",
751 "-Werror",
752 "-Wno-unused-parameter",
753 ],
Joe Onorato62c220b2017-11-18 20:32:56 -0800754
755 srcs: [
756 "core/proto/**/*.proto",
Joe Onorato62c220b2017-11-18 20:32:56 -0800757 ],
Joe Onorato99598ee2019-02-11 15:55:13 +0000758}
759
760cc_library {
761 name: "libplatformprotos",
762 defaults: ["libplatformprotos-defaults"],
763 host_supported: true,
Joe Onorato62c220b2017-11-18 20:32:56 -0800764
Colin Crossaa0d4352017-05-02 14:14:56 -0700765 target: {
766 host: {
767 proto: {
768 type: "full",
769 },
770 },
771 android: {
772 proto: {
773 type: "lite",
774 },
Joe Onorato99598ee2019-02-11 15:55:13 +0000775 shared_libs: [
776 "libprotobuf-cpp-lite",
777 ],
Colin Crossaa0d4352017-05-02 14:14:56 -0700778 shared: {
Colin Crossaa0d4352017-05-02 14:14:56 -0700779 enabled: false,
780 },
781 },
782 },
Colin Crossaa0d4352017-05-02 14:14:56 -0700783}
784
Joe Onorato9bd5db72019-04-03 18:19:43 -0700785// This library is meant for vendor code that needs to output protobuf. It links
786// against the static version of libprotobuf-cpp-lite, for which we can not guarantee
787// binary compatibility.
788cc_library {
789 name: "libplatformprotos-static",
790 defaults: ["libplatformprotos-defaults"],
791 host_supported: false,
792
793 // This is okay because this library is only built as a static library. The C++
794 // API is not guaranteed. The proto API is guaranteed to be stable via Metrics Council,
795 // but is not authorized to be used outside of debugging.
796 vendor_available: true,
797
798 target: {
799 android: {
800 proto: {
801 type: "lite",
802 },
803 static_libs: [
804 "libprotobuf-cpp-lite",
805 ],
806 shared: {
807 enabled: false,
808 },
809 },
810 },
811}
812
813
Joe Onorato99598ee2019-02-11 15:55:13 +0000814// This is the full proto version of libplatformprotos. It may only
815// be used by test code that is not shipped on the device.
816cc_library {
817 name: "libplatformprotos-test",
818 defaults: ["libplatformprotos-defaults"],
819 host_supported: false,
820
821 target: {
822 android: {
823 proto: {
824 type: "full",
825 },
826 shared: {
827 enabled: false,
828 },
829 },
830 },
831}
832
Songchun Fan0037c3f2019-10-30 15:20:59 -0700833filegroup {
834 name: "incremental_aidl",
835 srcs: [
Songchun Fan0037c3f2019-10-30 15:20:59 -0700836 "core/java/android/os/incremental/IncrementalFileSystemControlParcel.aidl",
Songchun Fan0037c3f2019-10-30 15:20:59 -0700837 ],
838 path: "core/java",
839}
840
841filegroup {
Songchun Fan6dd47b52019-11-29 15:20:18 -0800842 name: "dataloader_aidl",
Songchun Fan0037c3f2019-10-30 15:20:59 -0700843 srcs: [
Alex Buynytskyyea14d192019-12-13 15:42:18 -0800844 "core/java/android/content/pm/DataLoaderParamsParcel.aidl",
Alex Buynytskyy1ecfcec2019-12-17 12:10:41 -0800845 "core/java/android/content/pm/DataLoaderType.aidl",
Alex Buynytskyyea14d192019-12-13 15:42:18 -0800846 "core/java/android/content/pm/FileSystemControlParcel.aidl",
Songchun Fan6dd47b52019-11-29 15:20:18 -0800847 "core/java/android/content/pm/IDataLoaderStatusListener.aidl",
Alex Buynytskyyea14d192019-12-13 15:42:18 -0800848 "core/java/android/content/pm/IPackageInstallerSessionFileSystemConnector.aidl",
849 "core/java/android/content/pm/NamedParcelFileDescriptor.aidl",
Alex Buynytskyy5b0c7fa2019-12-17 21:48:16 -0800850 ],
851 path: "core/java",
852}
853
854filegroup {
855 name: "incremental_manager_aidl",
856 srcs: [
857 "core/java/android/os/incremental/IIncrementalManager.aidl",
858 "core/java/android/os/incremental/IIncrementalManagerNative.aidl",
Songchun Fan0037c3f2019-10-30 15:20:59 -0700859 ],
860 path: "core/java",
861}
862
863aidl_interface {
864 name: "libincremental_aidl",
865 srcs: [
866 ":incremental_aidl",
Songchun Fan6dd47b52019-11-29 15:20:18 -0800867 ],
Songchun Fan6dd47b52019-11-29 15:20:18 -0800868 backend: {
869 java: {
870 sdk_version: "28",
871 },
872 cpp: {
873 enabled: true,
874 },
875 ndk: {
876 enabled: true,
877 },
878 },
879}
880
881aidl_interface {
882 name: "libdataloader_aidl",
883 srcs: [
884 ":dataloader_aidl",
Songchun Fan0037c3f2019-10-30 15:20:59 -0700885 ],
Alex Buynytskyy5b0c7fa2019-12-17 21:48:16 -0800886 imports: [
887 "libincremental_aidl",
888 ],
Songchun Fan0037c3f2019-10-30 15:20:59 -0700889 backend: {
890 java: {
891 sdk_version: "28",
892 },
893 cpp: {
894 enabled: true,
895 },
896 ndk: {
Alex Buynytskyy5b0c7fa2019-12-17 21:48:16 -0800897 enabled: false,
898 },
899 },
900}
901
902aidl_interface {
903 name: "libincremental_manager_aidl",
904 srcs: [
905 ":incremental_manager_aidl",
906 ],
907 imports: [
908 "libincremental_aidl",
909 "libdataloader_aidl",
910 ],
911 backend: {
912 java: {
913 sdk_version: "28",
914 },
915 cpp: {
Songchun Fan0037c3f2019-10-30 15:20:59 -0700916 enabled: true,
917 },
Alex Buynytskyy5b0c7fa2019-12-17 21:48:16 -0800918 ndk: {
919 enabled: false,
920 },
Songchun Fan0037c3f2019-10-30 15:20:59 -0700921 },
Songchun Fan0037c3f2019-10-30 15:20:59 -0700922}
Joe Onorato99598ee2019-02-11 15:55:13 +0000923
Yi Jin04625ad2017-10-17 18:29:33 -0700924gensrcs {
925 name: "gen-platform-proto-constants",
926 depfile: true,
927
928 tools: [
929 "aprotoc",
930 "protoc-gen-cppstream",
931 ],
932
933 srcs: [
Kweku Adamseadd1232018-02-05 16:45:13 -0800934 "core/proto/android/os/backtrace.proto",
Kweku Adams59e6fd72017-12-27 15:48:14 -0800935 "core/proto/android/os/batterytype.proto",
Yi Jin0eb22342017-11-06 17:17:27 -0800936 "core/proto/android/os/cpufreq.proto",
Yi Jine2f7f792017-11-01 17:08:27 -0700937 "core/proto/android/os/cpuinfo.proto",
Colin Crossbc2dc312018-10-26 22:34:06 -0700938 "core/proto/android/os/data.proto",
Yi Jin04625ad2017-10-17 18:29:33 -0700939 "core/proto/android/os/kernelwake.proto",
940 "core/proto/android/os/pagetypeinfo.proto",
941 "core/proto/android/os/procrank.proto",
Kweku Adamsf5cc5752017-12-20 17:59:17 -0800942 "core/proto/android/os/ps.proto",
Yi Jin0dfa7522017-11-06 17:43:47 -0800943 "core/proto/android/os/system_properties.proto",
Yi Jin3c034c92017-12-22 17:36:47 -0800944 "core/proto/android/util/event_log_tags.proto",
Colin Crossbc2dc312018-10-26 22:34:06 -0700945 "core/proto/android/util/log.proto",
Yi Jin04625ad2017-10-17 18:29:33 -0700946 ],
947
948 // Append protoc-gen-cppstream tool's PATH otherwise aprotoc can't find the plugin tool
Yi Jin3c034c92017-12-22 17:36:47 -0800949 cmd: "mkdir -p $(genDir) " +
950 "&& $(location aprotoc) " +
951 " --plugin=$(location protoc-gen-cppstream) " +
952 " --dependency_out=$(depfile) " +
953 " --cppstream_out=$(genDir) " +
954 " -Iexternal/protobuf/src " +
955 " -I . " +
956 " $(in)",
Yi Jin04625ad2017-10-17 18:29:33 -0700957
Logan Chien71ddfea2018-02-27 16:43:50 +0800958 output_extension: "proto.h",
Yi Jin04625ad2017-10-17 18:29:33 -0700959}
960
Joe Onorato99598ee2019-02-11 15:55:13 +0000961
Dan Albert2a8d9c22016-09-23 15:55:49 -0700962subdirs = [
Yi Jin0a3406f2017-06-22 19:23:11 -0700963 "cmds/*",
Jeff Sharkey0c686e72017-10-23 16:04:31 -0600964 "core/*",
Colin Cross4f8d9e62016-12-01 15:55:00 -0800965 "libs/*",
Colin Cross76de4f62017-05-15 18:10:40 -0700966 "media/*",
Colin Cross747e7c12017-10-24 16:21:22 -0700967 "proto",
Fabien Sanglard19160202017-01-12 14:24:31 -0500968 "tools/*",
Dan Albert2a8d9c22016-09-23 15:55:49 -0700969 "native/android",
Dan Albert7ce8df32016-09-23 16:43:49 -0700970 "native/graphics/jni",
Dan Albert2a8d9c22016-09-23 15:55:49 -0700971]
Svetoslav Ganov74c99832016-12-05 20:07:20 -0800972
973optional_subdirs = [
974 "core/tests/utiltests/jni",
975]
Steven Morelandeddafe92017-10-02 16:58:41 -0700976
Colin Crossa2b78a72018-03-29 13:31:04 -0700977// TODO(b/77285514): remove this once the last few hidl interfaces have been
978// updated to use hwbinder.stubs.
Steven Morelandeddafe92017-10-02 16:58:41 -0700979java_library {
980 name: "hwbinder",
Paul Duffin8fcace42019-06-12 13:47:18 +0100981 sdk_version: "core_platform",
Steven Morelandeddafe92017-10-02 16:58:41 -0700982
983 srcs: [
984 "core/java/android/os/HidlSupport.java",
Steven Morelande8e63aa2018-01-10 15:45:36 -0800985 "core/java/android/annotation/IntDef.java",
Ytai Ben-Tsvi4659e182019-11-06 09:53:34 -0800986 "core/java/android/annotation/IntRange.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700987 "core/java/android/annotation/NonNull.java",
Steven Moreland0ff061a2019-03-04 17:56:30 -0800988 "core/java/android/annotation/Nullable.java",
Steven Morelande8e63aa2018-01-10 15:45:36 -0800989 "core/java/android/annotation/SystemApi.java",
Steven Morelandcbba4c72019-01-11 10:19:51 -0800990 "core/java/android/annotation/TestApi.java",
Andrei Onea24ec3212019-03-15 17:35:05 +0000991 "core/java/android/annotation/UnsupportedAppUsage.java",
Ytai Ben-Tsvi4659e182019-11-06 09:53:34 -0800992 "core/java/android/os/HidlMemory.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700993 "core/java/android/os/HwBinder.java",
994 "core/java/android/os/HwBlob.java",
995 "core/java/android/os/HwParcel.java",
996 "core/java/android/os/IHwBinder.java",
997 "core/java/android/os/IHwInterface.java",
998 "core/java/android/os/DeadObjectException.java",
999 "core/java/android/os/DeadSystemException.java",
Nirav Atre9850dd92018-07-24 17:03:44 -07001000 "core/java/android/os/NativeHandle.java",
Steven Morelandeddafe92017-10-02 16:58:41 -07001001 "core/java/android/os/RemoteException.java",
1002 "core/java/android/util/AndroidException.java",
1003 ],
Artur Satayevafdb23a2019-12-10 17:47:53 +00001004 libs: [ "unsupportedappusage" ],
Steven Morelandeddafe92017-10-02 16:58:41 -07001005
1006 dxflags: ["--core-library"],
1007 installable: false,
1008}
Nan Zhang2db709d2017-11-08 20:48:46 -08001009
1010python_defaults {
1011 name: "base_default",
1012 version: {
1013 py2: {
1014 enabled: true,
1015 embedded_launcher: true,
1016 },
1017 py3: {
1018 enabled: false,
1019 embedded_launcher: false,
1020 },
1021 },
1022}
1023
1024python_binary_host {
1025 name: "fontchain_linter",
1026 defaults: ["base_default"],
1027 main: "tools/fonts/fontchain_linter.py",
1028 srcs: [
1029 "tools/fonts/fontchain_linter.py",
1030 ],
1031 libs: [
1032 "fontTools",
1033 ],
1034}
Nan Zhang172875b2018-02-27 11:24:03 -08001035
Nan Zhangaf251302018-08-30 10:59:51 -07001036filegroup {
1037 name: "framework-annotation-nonnull-srcs",
1038 srcs: [
1039 "core/java/android/annotation/NonNull.java",
1040 ],
1041}
Insun Kang06b25ae2018-11-20 10:05:44 +09001042
1043filegroup {
1044 name: "framework-media-annotation-srcs",
1045 srcs: [
Jeff Sharkey40182832019-12-18 14:06:48 -07001046 ":framework-annotations",
Insun Kang06b25ae2018-11-20 10:05:44 +09001047 "core/java/android/annotation/CallbackExecutor.java",
Insun Kangf86a56c2019-01-22 17:16:07 +09001048 "core/java/android/annotation/CallSuper.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001049 "core/java/android/annotation/DrawableRes.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001050 "core/java/android/annotation/LongDef.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001051 "core/java/android/annotation/StringDef.java",
Jeff Sharkey40182832019-12-18 14:06:48 -07001052 ],
1053}
1054
1055filegroup {
1056 name: "framework-mediaprovider-annotation-sources",
1057 srcs: [
1058 ":framework-annotations",
1059 "core/java/android/annotation/BytesLong.java",
1060 "core/java/android/annotation/CurrentTimeMillisLong.java",
1061 "core/java/android/annotation/CurrentTimeSecondsLong.java",
1062 "core/java/android/annotation/DurationMillisLong.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001063 ],
1064}
1065
Andrei Onea7a2985c2019-02-18 15:28:35 +00001066// Creates an index of AIDL methods; used for adding UnsupportedAppUsage
1067// annotations to private apis
1068aidl_mapping {
1069 name: "framework-aidl-mappings",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001070 srcs: [":framework-all-sources"],
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001071 output: "framework-aidl-mappings.txt",
Kyunglyul Hyund51666d2019-04-11 04:08:40 +00001072}
Anna Trostanetski97088e92019-06-26 14:47:58 +01001073
1074genrule {
1075 name: "framework-annotation-proc-index",
Jiyong Park97183492019-11-14 03:07:36 +00001076 srcs: [":framework-annotation-proc"],
Anna Trostanetski97088e92019-06-26 14:47:58 +01001077 cmd: "unzip -qp $(in) unsupportedappusage/unsupportedappusage_index.csv > $(out)",
1078 out: ["unsupportedappusage_index.csv"],
1079 dist: {
1080 targets: ["droidcore"],
1081 },
1082}
Chen Xu192bf1f2019-09-05 22:07:42 -07001083
1084// Avoid including Parcelable classes as we don't want to have two copies of
1085// Parcelable cross the process.
1086filegroup {
1087 name: "framework-telephony-stack-shared-srcs",
1088 srcs: [
Hall Liuaa4398e2019-12-24 14:13:25 -08001089 "core/java/android/os/BasicShellCommandHandler.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001090 "core/java/android/os/RegistrantList.java",
1091 "core/java/android/os/Registrant.java",
1092 "core/java/android/util/LocalLog.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001093 "core/java/android/util/TimeUtils.java",
1094 "core/java/com/android/internal/os/SomeArgs.java",
Meng Wang9c2a8e02019-12-13 16:45:34 -08001095 "core/java/com/android/internal/util/AsyncChannel.java",
1096 "core/java/com/android/internal/util/BitwiseInputStream.java",
Michelebadc0212019-10-31 11:48:43 -07001097 "core/java/com/android/internal/util/FastXmlSerializer.java",
1098 "core/java/com/android/internal/util/HexDump.java",
Meng Wang64fffb92019-12-02 10:42:20 -08001099 "core/java/com/android/internal/util/IState.java",
Michelebadc0212019-10-31 11:48:43 -07001100 "core/java/com/android/internal/util/IndentingPrintWriter.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001101 "core/java/com/android/internal/util/Preconditions.java",
1102 "core/java/com/android/internal/util/State.java",
1103 "core/java/com/android/internal/util/StateMachine.java",
Michelebadc0212019-10-31 11:48:43 -07001104 "core/java/com/android/internal/util/UserIcons.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001105 ],
1106}
1107
Chen Xu4fea79c2019-10-08 18:39:03 -07001108// Avoid including Parcelable classes as we don't want to have two copies of
1109// Parcelable cross the process.
1110filegroup {
1111 name: "framework-cellbroadcast-shared-srcs",
1112 srcs: [
Jordan Liu15a72742019-11-20 13:55:18 -08001113 "core/java/android/os/HandlerExecutor.java",
Chen Xu4fea79c2019-10-08 18:39:03 -07001114 "core/java/android/util/LocalLog.java",
Jordan Liu15a72742019-11-20 13:55:18 -08001115 "core/java/com/android/internal/util/IState.java",
1116 "core/java/com/android/internal/util/Preconditions.java",
Chen Xu4fea79c2019-10-08 18:39:03 -07001117 "core/java/com/android/internal/util/State.java",
1118 "core/java/com/android/internal/util/StateMachine.java",
1119 ],
atrostce84de02019-10-08 16:16:47 +01001120}
Roshan Pius09de13e2019-10-16 13:16:04 -07001121
1122filegroup {
Jayachandran Ceeffa012019-10-23 18:06:33 -07001123 name: "framework-ims-common-shared-srcs",
1124 srcs: [
Jayachandran Ceeffa012019-10-23 18:06:33 -07001125 "core/java/android/os/RegistrantList.java",
1126 "core/java/android/os/Registrant.java",
1127 "core/java/com/android/internal/os/SomeArgs.java",
1128 "core/java/com/android/internal/util/Preconditions.java",
1129 ],
1130}
1131
1132filegroup {
Roshan Pius62eb61c2019-12-06 13:49:47 -08001133 name: "framework-wifi-service-shared-srcs",
Roshan Pius09de13e2019-10-16 13:16:04 -07001134 srcs: [
1135 ":framework-annotations",
Roshan Piusc93cd7a2019-12-09 07:39:41 -08001136 "core/java/android/net/InterfaceConfiguration.java",
Roshan Pius3032c892020-01-08 11:10:15 -08001137 "core/java/android/os/BasicShellCommandHandler.java",
Roshan Piusc93cd7a2019-12-09 07:39:41 -08001138 "core/java/android/os/HandlerExecutor.java",
Roshan Pius04769a52019-12-04 13:03:47 -08001139 "core/java/android/util/BackupUtils.java",
Roshan Pius09de13e2019-10-16 13:16:04 -07001140 "core/java/android/util/LocalLog.java",
1141 "core/java/android/util/Rational.java",
Roshan Pius09de13e2019-10-16 13:16:04 -07001142 "core/java/com/android/internal/util/FastXmlSerializer.java",
1143 "core/java/com/android/internal/util/HexDump.java",
1144 "core/java/com/android/internal/util/IState.java",
1145 "core/java/com/android/internal/util/MessageUtils.java",
1146 "core/java/com/android/internal/util/Preconditions.java",
1147 "core/java/com/android/internal/util/State.java",
1148 "core/java/com/android/internal/util/StateMachine.java",
1149 "core/java/com/android/internal/util/WakeupMessage.java",
1150 "core/java/com/android/internal/util/XmlUtils.java",
1151 ],
1152}
Jiyong Park0d7e86d2019-12-20 14:35:43 +09001153
1154// TODO(b/145644363): move this to under StubLibraries.bp or ApiDocs.bp
1155metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.xml) " +
1156 "--ignore-classes-on-classpath " +
1157 "--hide-package com.android.server " +
1158 "--error UnhiddenSystemApi " +
1159 "--hide RequiresPermission " +
1160 "--hide CallbackInterface " +
1161 "--hide MissingPermission --hide BroadcastBehavior " +
1162 "--hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol " +
1163 "--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo " +
1164 "--force-convert-to-warning-nullability-annotations +*:-android.*:+android.icu.*:-dalvik.*"
1165
1166build = [
1167 "StubLibraries.bp",
1168 "ApiDocs.bp",
1169]