blob: 3d0188a3918d0cc4b506db93817a674738afe200 [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
Bob Badour8a6a2bc2021-02-12 17:07:05 -080028package {
29 default_applicable_licenses: ["frameworks_base_license"],
30}
31
32// Added automatically by a large-scale-change that took the approach of
33// 'apply every license found to every target'. While this makes sure we respect
34// every license restriction, it may not be entirely correct.
35//
36// e.g. GPL in an MIT project might only apply to the contrib/ directory.
37//
38// Please consider splitting the single license below into multiple licenses,
39// taking care not to lose any license_kind information, and overriding the
40// default license using the 'licenses: [...]' property on targets as needed.
41//
42// For unused files, consider creating a 'fileGroup' with "//visibility:private"
43// to attach the license to, and including a comment whether the files may be
44// used in the current project.
45// See: http://go/android-license-faq
46license {
47 name: "frameworks_base_license",
48 visibility: [":__subpackages__"],
49 license_kinds: [
50 "SPDX-license-identifier-Apache-2.0",
51 "SPDX-license-identifier-BSD",
52 "SPDX-license-identifier-CC-BY",
Bob Badour8a6a2bc2021-02-12 17:07:05 -080053 "SPDX-license-identifier-MIT",
54 "SPDX-license-identifier-Unicode-DFS",
Bob Badour8a6a2bc2021-02-12 17:07:05 -080055 "legacy_unencumbered",
56 ],
57 license_text: [
58 "NOTICE",
59 ],
60}
61
Artur Satayev3cc3fa42019-08-02 16:42:07 +010062filegroup {
Jiyong Parkae9972b2019-09-15 20:19:02 +090063 name: "framework-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +090064 srcs: [
65 // Java/AIDL sources under frameworks/base
Chris Wailes68f38b22021-03-31 16:10:29 -070066 ":framework-annotations",
Sudheer Shankaf5b36962019-10-04 16:16:13 -070067 ":framework-blobstore-sources",
Jiyong Park20426532019-08-19 15:24:49 +090068 ":framework-core-sources",
69 ":framework-drm-sources",
Alec Mourief37c242020-03-02 21:38:09 +000070 ":framework-graphics-nonupdatable-sources",
Jiyong Park48cc3722019-10-21 14:01:06 +090071 ":framework-jobscheduler-sources", // jobscheduler is not a module for R
Jiyong Park20426532019-08-19 15:24:49 +090072 ":framework-keystore-sources",
David Zeuthen045b6de2019-10-29 15:15:18 -040073 ":framework-identity-sources",
Jiyong Park20426532019-08-19 15:24:49 +090074 ":framework-location-sources",
Jiyong Park20426532019-08-19 15:24:49 +090075 ":framework-mca-effect-sources",
76 ":framework-mca-filterfw-sources",
77 ":framework-mca-filterpacks-sources",
Anton Hansson3b6477f2022-01-17 10:17:15 +000078 ":framework-media-non-updatable-sources",
Amit Mahajan6237a6b2019-10-07 17:41:26 -070079 ":framework-mms-sources",
Rajesh Nyamagoud4fe64fb2021-09-14 05:34:11 +000080 ":framework-omapi-sources",
Jiyong Park20426532019-08-19 15:24:49 +090081 ":framework-opengl-sources",
82 ":framework-rs-sources",
83 ":framework-sax-sources",
84 ":framework-telecomm-sources",
Amit Mahajand3551532019-09-23 17:59:57 -070085 ":framework-telephony-common-sources",
Malcolm Chenfbc5c362020-03-16 15:28:35 -070086 ":framework-telephony-sources",
Benedict Wong26497362020-08-10 17:54:33 -070087 ":framework-vcn-util-sources",
David Su130441b2019-12-14 21:37:20 -080088 ":framework-wifi-annotations",
David Su6f646ef2019-12-10 13:33:06 -080089 ":framework-wifi-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +090090 ":PacProcessor-aidl-sources",
91 ":ProxyHandler-aidl-sources",
Aaron Huangc4081b22020-01-13 15:03:35 +080092 ":net-utils-framework-common-srcs",
Jiyong Parkb3609312019-08-16 21:17:14 +090093
atrost87488352019-10-10 19:27:31 +010094 // AIDL from frameworks/base/native/
95 ":platform-compat-native-aidl",
96
Jiyong Park20426532019-08-19 15:24:49 +090097 // AIDL sources from external directories
Ilya Matyukhin10ae7f22022-10-31 02:06:53 +000098 ":android.hardware.biometrics.common-V3-java-source",
99 ":android.hardware.biometrics.fingerprint-V3-java-source",
Yu-Han Yang97f3b91c2022-03-08 14:36:18 -0800100 ":android.hardware.gnss-V2-java-source",
Leon Scroggins III73e06892022-01-31 15:47:34 -0500101 ":android.hardware.graphics.common-V3-java-source",
Ilya Matyukhin10ae7f22022-10-31 02:06:53 +0000102 ":android.hardware.keymaster-V4-java-source",
Eran Messeria8807302022-11-29 14:49:39 +0000103 ":android.hardware.security.keymint-V3-java-source",
Janis Danisevskis23902672021-03-17 11:02:19 -0700104 ":android.hardware.security.secureclock-V1-java-source",
Ray Chin868ef622022-10-26 11:33:38 +0800105 ":android.hardware.tv.tuner-V2-java-source",
Janis Danisevskis23902672021-03-17 11:02:19 -0700106 ":android.security.apc-java-source",
107 ":android.security.authorization-java-source",
Janis Danisevskis191b2062021-06-14 14:33:10 -0700108 ":android.security.legacykeystore-java-source",
Janis Danisevskis23902672021-03-17 11:02:19 -0700109 ":android.security.maintenance-java-source",
Tej Singh932f8702021-06-14 23:40:22 -0700110 ":android.security.metrics-java-source",
Shaquille Johnson3144d8c12022-11-08 12:24:52 +0000111 ":android.system.keystore2-V3-java-source",
David Zeuthen045b6de2019-10-29 15:15:18 -0400112 ":credstore_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900113 ":dumpstate_aidl",
114 ":framework_native_aidl",
115 ":gatekeeper_aidl",
116 ":gsiservice_aidl",
chaviw9d438f92021-05-20 11:18:06 -0500117 ":guiconstants_aidl",
Ryan Mitchellfebbc332021-02-12 09:21:52 -0800118 ":idmap2_aidl",
Ryan Mitchell6a2ca782021-01-19 13:51:15 -0800119 ":idmap2_core_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900120 ":incidentcompanion_aidl",
Bernardo Rufino64bbd4b2020-08-19 14:45:30 +0100121 ":inputconstants_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900122 ":installd_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900123 ":libaudioclient_aidl",
124 ":libbinder_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900125 ":libcamera_client_aidl",
126 ":libcamera_client_framework_aidl",
127 ":libupdate_engine_aidl",
Wenhao Wang256519a2022-01-11 22:29:18 -0800128 ":logd_aidl",
Amy Zhangccdbc4d2020-06-08 21:29:59 -0700129 ":resourcemanager_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900130 ":storaged_aidl",
131 ":vold_aidl",
Kriti Dangaf977732021-02-25 18:07:34 +0100132 ":deviceproductinfoconstants_aidl",
Jiyong Park1cc95662019-08-07 22:45:07 +0900133
Jiyong Park20426532019-08-19 15:24:49 +0900134 // For the generated R.java and Manifest.java
135 ":framework-res{.aapt.srcjar}",
136
137 // etc.
138 ":framework-javastream-protos",
Muhammad Qureshi04ec2522020-01-27 16:36:45 -0800139 ":statslog-framework-java-gen", // FrameworkStatsLog.java
Hayden Gomes24b336f2020-11-05 16:28:21 -0800140 ":audio_policy_configuration_V7_0",
Jiyong Park20426532019-08-19 15:24:49 +0900141 ],
142}
Jiyong Park1cc95662019-08-07 22:45:07 +0900143
Neha Pattan2edfc482022-03-02 17:37:23 +0000144java_library {
Anton Hansson2d6c4272020-08-18 12:52:44 +0100145 name: "framework-all",
146 installable: false,
147 static_libs: [
Anton Hansson23274ee2022-01-28 11:31:50 +0000148 "all-framework-module-impl",
Anton Hansson2d6c4272020-08-18 12:52:44 +0100149 "framework-minus-apex",
Anton Hansson2d6c4272020-08-18 12:52:44 +0100150 ],
151 apex_available: ["//apex_available:platform"],
152 sdk_version: "core_platform",
153 visibility: [
154 // DO NOT ADD ANY MORE ENTRIES TO THIS LIST
155 "//external/robolectric-shadows:__subpackages__",
Rex Hoffman3561be72022-08-25 22:20:38 +0000156 //This will eventually replace the item above, and serves the
157 //same purpose.
158 "//external/robolectric:__subpackages__",
Anton Hansson2d6c4272020-08-18 12:52:44 +0100159 "//frameworks/layoutlib:__subpackages__",
160 ],
Anton Hanssone996d432020-03-07 11:40:10 +0000161}
162
Jiyong Park392729f2020-01-17 16:32:53 +0900163// AIDL files under these paths are mixture of public and private ones.
164// They shouldn't be exported across module boundaries.
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100165java_defaults {
Makoto Onuki62242c42019-08-05 12:54:20 -0700166 name: "framework-aidl-export-defaults",
Makoto Onuki62242c42019-08-05 12:54:20 -0700167 aidl: {
Jiyong Parkb3609312019-08-16 21:17:14 +0900168 export_include_dirs: [
169 "core/java",
170 "drm/java",
171 "graphics/java",
David Zeuthen045b6de2019-10-29 15:15:18 -0400172 "identity/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900173 "keystore/java",
174 "location/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900175 "media/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900176 "media/mca/effect/java",
177 "media/mca/filterfw/java",
178 "media/mca/filterpacks/java",
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700179 "mms/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900180 "opengl/java",
181 "rs/java",
182 "sax/java",
183 "telecomm/java",
Anton Hanssone996d432020-03-07 11:40:10 +0000184
Anton Hanssone996d432020-03-07 11:40:10 +0000185 // TODO(b/147699819): remove this
186 "telephony/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900187 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700188 },
189}
190
Jiyong Park20426532019-08-19 15:24:49 +0900191// Collection of classes that are generated from non-Java files that are not listed in
192// framework_srcs. These have no or very limited dependency to the framework.
193java_library {
194 name: "framework-internal-utils",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800195 static_libs: [
Dario Frenid8bf22e2018-08-31 14:18:04 +0100196 "apex_aidl_interface-java",
Samiul Islame4561272021-08-26 11:41:37 +0100197 "packagemanager_aidl-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800198 "framework-protos",
Peiyong Linb967a4c2020-07-27 22:16:13 -0700199 "updatable-driver-protos",
Kelvin Zhanga48c18e2021-04-12 17:23:51 -0400200 "ota_metadata_proto_java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800201 "android.hidl.base-V1.0-java",
202 "android.hardware.cas-V1.0-java",
Henry Fang43cab922019-12-27 16:50:20 -0800203 "android.hardware.cas-V1.1-java",
204 "android.hardware.cas-V1.2-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800205 "android.hardware.contexthub-V1.0-java",
Anthony Stange521a9052020-02-07 18:45:47 -0500206 "android.hardware.contexthub-V1.1-java",
Arthur Ishiguro8368e942020-10-14 13:39:09 -0700207 "android.hardware.contexthub-V1.2-java",
Matthew Sedamc92cb1e2022-11-14 18:13:43 +0000208 "android.hardware.contexthub-V2-java",
Yu-Han Yang9fe06dd2019-11-18 16:23:31 -0800209 "android.hardware.gnss-V1.0-java",
Yu-Han Yangad03c472020-01-14 15:31:01 -0800210 "android.hardware.gnss-V2.1-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800211 "android.hardware.health-V1.0-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800212 "android.hardware.radio-V1.0-java",
213 "android.hardware.radio-V1.1-java",
214 "android.hardware.radio-V1.2-java",
215 "android.hardware.radio-V1.3-java",
216 "android.hardware.radio-V1.4-java",
Sarah Chin21e9c632019-11-05 13:30:10 -0800217 "android.hardware.radio-V1.5-java",
Daniel Bright8b4502e2020-09-02 17:10:54 -0700218 "android.hardware.radio-V1.6-java",
Sarah Chin1841de32022-11-17 13:55:55 -0800219 "android.hardware.radio.data-V2-java",
Hunsuk Choib2c8f012022-10-15 08:43:49 +0000220 "android.hardware.radio.ims-V1-java",
Sarah Chin1841de32022-11-17 13:55:55 -0800221 "android.hardware.radio.messaging-V2-java",
222 "android.hardware.radio.modem-V2-java",
Hunsuk Choib7657962022-09-29 10:50:34 +0000223 "android.hardware.radio.network-V2-java",
Sarah Chin1841de32022-11-17 13:55:55 -0800224 "android.hardware.radio.sim-V2-java",
225 "android.hardware.radio.voice-V2-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800226 "android.hardware.thermal-V1.0-java-constants",
Wei Wangfb21bd82019-01-10 14:16:23 -0800227 "android.hardware.thermal-V1.0-java",
Wei Wangbad7c202018-11-01 11:57:39 -0700228 "android.hardware.thermal-V1.1-java",
229 "android.hardware.thermal-V2.0-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800230 "android.hardware.tv.input-V1.0-java-constants",
231 "android.hardware.usb-V1.0-java-constants",
232 "android.hardware.usb-V1.1-java-constants",
Badhri Jagan Sridharane966a382018-12-09 14:49:38 -0800233 "android.hardware.usb-V1.2-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800234 "android.hardware.usb.gadget-V1.0-java",
raychi88254a22020-09-30 19:04:08 +0800235 "android.hardware.usb.gadget-V1.1-java",
236 "android.hardware.usb.gadget-V1.2-java",
Michael Wrightf268bf52018-02-07 23:23:34 +0000237 "android.hardware.vibrator-V1.0-java",
238 "android.hardware.vibrator-V1.1-java",
239 "android.hardware.vibrator-V1.2-java",
Harpreet "Eli" Sanghaa456f082018-12-14 12:06:10 +0900240 "android.hardware.vibrator-V1.3-java",
Lais Andradeb847d632021-02-23 10:35:27 +0000241 "android.hardware.vibrator-V2-java",
Rajesh Nyamagoud4fe64fb2021-09-14 05:34:11 +0000242 "android.se.omapi-V1-java",
Michael Sund5237962020-11-06 03:28:14 +0000243 "android.system.suspend.control.internal-java",
arangelov1ab61492018-11-22 13:56:50 +0000244 "devicepolicyprotosnano",
Inseob Kim4fe9f0f2019-07-30 18:23:26 +0900245
246 "com.android.sysprop.apex",
Nikita Ioffe779d6be2020-02-06 23:17:17 +0000247 "com.android.sysprop.init",
Alexander Mishkovets77f6bc82020-07-14 19:14:10 +0200248 "com.android.sysprop.localization",
Inseob Kim4fe9f0f2019-07-30 18:23:26 +0900249 "PlatformProperties",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800250 ],
Jiyong Park20426532019-08-19 15:24:49 +0900251 sdk_version: "core_platform",
252 installable: false,
253}
254
Anton Hansson524bf242021-05-25 12:48:58 +0100255// NOTE: This filegroup is exposed for vendor libraries to depend on and is referenced in
256// documentation. Do not remove without consulting the treble/hidl teams.
Anton Hanssondffc59c2021-05-25 11:43:36 +0000257filegroup {
258 name: "framework-jarjar-rules",
259 srcs: ["framework-jarjar-rules.txt"],
Anton Hansson524bf242021-05-25 12:48:58 +0100260 visibility: ["//visibility:public"],
Anton Hanssondffc59c2021-05-25 11:43:36 +0000261}
262
Ioana Stefan2f5c5452020-10-15 15:00:24 +0200263java_defaults {
264 name: "framework-minus-apex-defaults",
Lorena Torres-Huerta6088f4b2022-08-12 23:08:13 +0000265 defaults: [
266 "framework-aidl-export-defaults",
267 "latest_android_hardware_soundtrigger3_java_static",
268 ],
Anton Hansson5954c6d2020-08-19 14:37:54 +0100269 srcs: [
270 ":framework-non-updatable-sources",
271 "core/java/**/*.logtags",
Daniel Norman66ebced2021-09-21 13:47:36 -0700272 ":apex-info-list",
Anton Hansson5954c6d2020-08-19 14:37:54 +0100273 ],
Anton Hansson5954c6d2020-08-19 14:37:54 +0100274 aidl: {
275 generate_get_transaction_name: true,
Thiébaud Weksteen7e1864a2022-02-28 15:26:27 +1100276 enforce_permissions: true,
277 enforce_permissions_exceptions: [
278 // Do not add entries to this list.
279 ":framework-annotations",
280 ":framework-blobstore-sources",
Thiébaud Weksteen7e1864a2022-02-28 15:26:27 +1100281 ":framework-core-sources",
282 ":framework-drm-sources",
283 ":framework-graphics-nonupdatable-sources",
284 ":framework-jobscheduler-sources",
285 ":framework-keystore-sources",
286 ":framework-identity-sources",
287 ":framework-location-sources",
Thiébaud Weksteen7e1864a2022-02-28 15:26:27 +1100288 ":framework-mca-effect-sources",
289 ":framework-mca-filterfw-sources",
290 ":framework-mca-filterpacks-sources",
291 ":framework-media-non-updatable-sources",
292 ":framework-mms-sources",
293 ":framework-omapi-sources",
294 ":framework-opengl-sources",
295 ":framework-rs-sources",
296 ":framework-sax-sources",
297 ":framework-telecomm-sources",
298 ":framework-telephony-common-sources",
299 ":framework-telephony-sources",
300 ":framework-vcn-util-sources",
301 ":framework-wifi-annotations",
302 ":framework-wifi-non-updatable-sources",
303 ":PacProcessor-aidl-sources",
304 ":ProxyHandler-aidl-sources",
305 ":net-utils-framework-common-srcs",
306 ":platform-compat-native-aidl",
307 ":credstore_aidl",
308 ":dumpstate_aidl",
309 ":framework_native_aidl",
310 ":gatekeeper_aidl",
311 ":gsiservice_aidl",
312 ":idmap2_aidl",
313 ":idmap2_core_aidl",
314 ":incidentcompanion_aidl",
315 ":inputconstants_aidl",
316 ":installd_aidl",
317 ":libaudioclient_aidl",
318 ":libbinder_aidl",
319 ":libbluetooth-binder-aidl",
320 ":libcamera_client_aidl",
321 ":libcamera_client_framework_aidl",
322 ":libupdate_engine_aidl",
323 ":logd_aidl",
324 ":resourcemanager_aidl",
325 ":storaged_aidl",
326 ":vold_aidl",
327 ":deviceproductinfoconstants_aidl",
328 ],
Remi NGUYEN VAN7b6b0062021-03-19 10:15:06 +0000329 local_include_dirs: [
330 "media/aidl",
Remi NGUYEN VAN7b6b0062021-03-19 10:15:06 +0000331 ],
Baligh Uddinf33ffa12021-05-17 04:07:33 +0000332 include_dirs: [
333 "frameworks/av/aidl",
Jeff Sharkey75d4f932021-07-26 15:41:01 -0600334 "frameworks/native/libs/permission/aidl",
William Escandec01e5522022-02-25 12:32:42 +0100335 "packages/modules/Bluetooth/framework/aidl-export",
Baligh Uddinf33ffa12021-05-17 04:07:33 +0000336 "packages/modules/Connectivity/framework/aidl-export",
Baligh Uddinb8b46fd2022-02-11 14:20:10 +0000337 "packages/modules/Media/apex/aidl/stable",
Ilya Matyukhin10ae7f22022-10-31 02:06:53 +0000338 "hardware/interfaces/biometrics/common/aidl",
339 "hardware/interfaces/biometrics/fingerprint/aidl",
Leon Scroggins III73e06892022-01-31 15:47:34 -0500340 "hardware/interfaces/graphics/common/aidl",
Ilya Matyukhin10ae7f22022-10-31 02:06:53 +0000341 "hardware/interfaces/keymaster/aidl",
Baligh Uddinf33ffa12021-05-17 04:07:33 +0000342 ],
Anton Hansson5954c6d2020-08-19 14:37:54 +0100343 },
344 dxflags: [
345 "--core-library",
346 "--multi-dex",
347 ],
Anton Hanssondffc59c2021-05-25 11:43:36 +0000348 jarjar_rules: ":framework-jarjar-rules",
Jiyong Park911cd4f2019-10-21 14:35:14 +0900349 javac_shard_size: 150,
Anton Hansson5954c6d2020-08-19 14:37:54 +0100350 plugins: [
351 "view-inspector-annotation-processor",
352 "staledataclass-annotation-processor",
353 "error_prone_android_framework",
354 ],
Sorin Basca73cb9bd2022-09-27 18:02:06 +0100355 // Exports needed for staledataclass-annotation-processor, see b/139342589.
356 javacflags: [
357 "-J--add-modules=jdk.compiler",
358 "-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
359 "-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED",
360 "-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
361 "-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
362 ],
atrostaec9bc12019-08-16 18:14:09 +0100363 required: [
Marin Shalamanov11047252021-11-22 17:35:30 +0100364 // TODO(b/120066492): remove default_television.xml when the build system
365 // propagates "required" properly.
366 "default_television.xml",
atrostaec9bc12019-08-16 18:14:09 +0100367 "framework-platform-compat-config",
Marin Shalamanov11047252021-11-22 17:35:30 +0100368 // TODO(b/120066492): remove gps_debug and protolog.conf.json when the build
369 // system propagates "required" properly.
Anton Hansson5954c6d2020-08-19 14:37:54 +0100370 "gps_debug.conf",
Victor Changa4fae272020-10-30 12:14:34 +0000371 "icu4j-platform-compat-config",
Anton Hansson5954c6d2020-08-19 14:37:54 +0100372 "protolog.conf.json.gz",
atrost86895aa2019-08-19 16:51:15 +0100373 "services-platform-compat-config",
Rambo Wang05e55c92021-06-25 11:41:43 -0700374 "TeleService-platform-compat-config",
Ivan Chiang3cb1cbd2020-02-18 10:50:10 +0800375 "documents-ui-compat-config",
Varun Shahf952e66c12020-06-25 11:30:13 -0700376 "calendar-provider-compat-config",
Marcus Hagerott6c681052021-11-12 17:48:47 -0800377 "contacts-provider-platform-compat-config",
atrostaec9bc12019-08-16 18:14:09 +0100378 ],
Anton Hansson5954c6d2020-08-19 14:37:54 +0100379 libs: [
Jooyung Han41528cd2022-06-24 14:56:23 +0900380 "androidx.annotation_annotation",
Anton Hansson5954c6d2020-08-19 14:37:54 +0100381 "app-compat-annotations",
382 "ext",
383 "framework-updatable-stubs-module_libs_api",
384 "unsupportedappusage",
385 ],
386 sdk_version: "core_platform",
Tobias Thiererc0c06082019-11-22 16:33:18 +0000387 static_libs: [
Hongguang956e6352021-07-20 17:45:28 -0700388 "android.hardware.common.fmq-V1-java",
Daulet Zhanguzin59444d52021-01-25 19:43:53 +0000389 "bouncycastle-repackaged-unbundled",
Anton Hansson5954c6d2020-08-19 14:37:54 +0100390 "framework-internal-utils",
Tobias Thierer82968532019-11-29 19:39:45 +0000391 // If MimeMap ever becomes its own APEX, then this dependency would need to be removed
392 // in favor of an API stubs dependency in java_library "framework" below.
Tobias Thiererc0c06082019-11-22 16:33:18 +0000393 "mimemap",
Ytai Ben-Tsvic3cd3cd2020-10-30 12:34:51 -0700394 "av-types-aidl-java",
Amy Zhang39a3fa42020-12-21 16:56:03 -0800395 "tv_tuner_resource_manager_aidl_interface-java",
Ytai Ben-Tsvida7c21e2020-09-16 13:04:31 -0700396 "soundtrigger_middleware-aidl-java",
Hai Zhangf0960b32022-10-21 03:10:19 -0700397 "modules-utils-binary-xml",
Pedro Loureiro99d045222022-03-17 12:41:31 +0000398 "modules-utils-build",
Alexander Dorokhinec0bf81a2021-05-12 11:34:51 -0700399 "modules-utils-preconditions",
William Escandeee59c1e2021-11-16 16:01:35 +0100400 "modules-utils-statemachine",
William Escande33a14632021-12-16 16:07:55 +0100401 "modules-utils-synchronous-result-receiver",
Chiachang Wang6a555272020-11-02 16:51:24 +0800402 "modules-utils-os",
Corina61165032022-02-10 18:35:43 +0000403 "modules-utils-uieventlogger-interface",
Svet Ganov4bf102a2021-04-22 20:09:49 +0000404 "framework-permission-aidl-java",
Eric Laurent8500f6c2021-07-24 08:47:17 +0200405 "spatializer-aidl-java",
406 "audiopolicy-types-aidl-java",
Tobias Thiererc0c06082019-11-22 16:33:18 +0000407 ],
Ioana Stefan2f5c5452020-10-15 15:00:24 +0200408}
409
410java_library {
411 name: "framework-minus-apex",
412 defaults: ["framework-minus-apex-defaults"],
413 installable: true,
Jiyong Park911cd4f2019-10-21 14:35:14 +0900414 // For backwards compatibility.
415 stem: "framework",
Jiyong Park352f9e22019-12-09 14:45:07 +0900416 apex_available: ["//apex_available:platform"],
Jiyong Park212d2e82020-01-03 21:07:38 +0900417 visibility: [
418 "//frameworks/base",
Jiyong Park634819c2020-02-04 21:20:02 +0900419 // TODO(b/147128803) remove the below lines
Jiyong Park212d2e82020-01-03 21:07:38 +0900420 "//frameworks/base/apex/blobstore/framework",
421 "//frameworks/base/apex/jobscheduler/framework",
markchien2c153702020-02-06 19:23:26 +0800422 "//frameworks/base/packages/Tethering/tests/unit",
Baligh Uddinff8ff122020-10-29 02:11:55 +0000423 "//packages/modules/Connectivity/Tethering/tests/unit",
Jiyong Park212d2e82020-01-03 21:07:38 +0900424 ],
Bernardo Rufino2b7e5912021-11-29 10:22:15 +0000425 lint: {
426 extra_check_modules: ["AndroidFrameworkLintChecker"],
Rhed Jao25a44805e2022-03-25 10:55:00 +0800427 disabled_checks: ["ApiMightLeakAppVisibility"],
Azhara Assanova020ccc42021-07-01 17:00:06 +0000428 error_checks: [
429 "ClearIdentityCallNotFollowedByTryFinally",
430 "NestedClearCallingIdentityCalls",
431 "NonFinalTokenOfOriginalCallingIdentity",
432 "RestoreIdentityCallNotInFinallyBlock",
433 "ResultOfClearIdentityCallNotStoredInVariable",
434 "UnusedTokenOfOriginalCallingIdentity",
435 "UseOfCallerAwareMethodsWithClearedIdentity",
436 ],
Bernardo Rufino2b7e5912021-11-29 10:22:15 +0000437 },
Jeff Sharkey6c8ffbc2020-10-02 11:52:05 -0600438 errorprone: {
439 javacflags: [
440 "-Xep:AndroidFrameworkCompatChange:ERROR",
Jeff Sharkey9af4aea2020-10-02 12:00:59 -0600441 "-Xep:AndroidFrameworkUid:ERROR",
Jeff Sharkey6c8ffbc2020-10-02 11:52:05 -0600442 ],
443 },
Jiyong Park911cd4f2019-10-21 14:35:14 +0900444}
445
Ioana Stefan2f5c5452020-10-15 15:00:24 +0200446java_library {
447 name: "framework-minus-apex-intdefs",
448 defaults: ["framework-minus-apex-defaults"],
449 plugins: ["intdef-annotation-processor"],
Cole Faust584140c2022-08-15 15:03:05 -0700450
451 // Errorprone and android lint will already run on framework-minus-apex, don't rerun them on
452 // the intdefs version in order to speed up the build.
453 errorprone: {
454 enabled: false,
455 },
456 lint: {
457 enabled: false,
458 },
Ioana Stefan2f5c5452020-10-15 15:00:24 +0200459}
460
Jiyong Park911cd4f2019-10-21 14:35:14 +0900461// This "framework" module is NOT installed to the device. It's
462// "framework-minus-apex" that gets installed to the device. Note that
463// the filename is still framework.jar (via the stem property) for
464// compatibility reason. The purpose of this module is to provide
465// framework APIs (both public and private) for bundled apps.
466// "framework-minus-apex" can't be used for the purpose because 1)
467// many apps have already hardcoded the name "framework" and
468// 2) it lacks API symbols from updatable modules - as it's clear from
469// its suffix "-minus-apex".
470java_library {
471 name: "framework",
472 defaults: ["framework-aidl-export-defaults"],
473 installable: false, // this lib is a build-only library
474 static_libs: [
Malcolm Chenfbc5c362020-03-16 15:28:35 -0700475 "app-compat-annotations",
Jiyong Park911cd4f2019-10-21 14:35:14 +0900476 "framework-minus-apex",
Anton Hanssone996d432020-03-07 11:40:10 +0000477 "framework-updatable-stubs-module_libs_api",
Jiyong Park911cd4f2019-10-21 14:35:14 +0900478 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700479 sdk_version: "core_platform",
Jiyong Park352f9e22019-12-09 14:45:07 +0900480 apex_available: ["//apex_available:platform"],
Makoto Onuki62242c42019-08-05 12:54:20 -0700481}
482
atrostb9c34502019-08-05 12:22:18 +0100483platform_compat_config {
Songchun Fand4574b52021-03-02 20:05:57 +0000484 name: "framework-platform-compat-config",
485 src: ":framework-minus-apex",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100486}
487
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900488filegroup {
evitayane22e47f2019-12-30 16:05:38 -0800489 name: "framework-ike-shared-srcs",
Baligh Uddinb7ec5bb2020-05-27 19:22:36 +0000490 visibility: ["//packages/modules/IPsec"],
evitayane22e47f2019-12-30 16:05:38 -0800491 srcs: [
evitayane9cc4942020-03-03 17:14:47 -0800492 "core/java/com/android/internal/util/HexDump.java",
Yan Yane7a360f2021-06-10 18:45:39 -0700493 "core/java/com/android/internal/util/WakeupMessage.java",
Yan Yana3e954f2020-11-09 00:09:39 -0800494 "services/core/java/com/android/server/vcn/util/PersistableBundleUtils.java",
evitayan996aa2a2019-12-30 11:19:47 -0800495 "telephony/java/android/telephony/Annotation.java",
evitayane22e47f2019-12-30 16:05:38 -0800496 ],
497}
498
499filegroup {
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900500 name: "framework-networkstack-shared-srcs",
501 srcs: [
502 // TODO: remove these annotations as soon as we can use andoid.support.annotations.*
Chalard Jean95213512019-01-30 21:04:58 +0900503 ":framework-annotations",
Alexander Dorokhinec0bf81a2021-05-12 11:34:51 -0700504 ":modules-utils-preconditions-srcs",
Dmitri Plotnikovf800b702020-05-15 13:49:20 -0700505 "core/java/android/util/IndentingPrintWriter.java",
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900506 "core/java/android/util/LocalLog.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900507 "core/java/com/android/internal/util/HexDump.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900508 "core/java/com/android/internal/util/IndentingPrintWriter.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900509 "core/java/com/android/internal/util/MessageUtils.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900510 "core/java/com/android/internal/util/RingBufferIndices.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900511 "core/java/com/android/internal/util/WakeupMessage.java",
johnson.yeh095b7a02019-12-19 20:30:34 +0800512 "core/java/com/android/internal/util/TokenBucket.java",
Tobias Thiererbc050342019-05-23 16:20:12 +0100513 ],
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900514}
515
Colin Crossd8e02252017-10-02 17:14:22 -0700516// Build ext.jar
517// ============================================================
518java_library {
519 name: "ext",
Colin Crossa12c0f52018-06-27 11:00:11 -0700520 installable: true,
Paul Duffin8fcace42019-06-12 13:47:18 +0100521 sdk_version: "core_platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700522 static_libs: [
523 "libphonenumber-platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700524 "tagsoup",
Ricky Wai0d1bc332017-10-31 14:31:01 +0000525 "rappor",
Colin Crossd8e02252017-10-02 17:14:22 -0700526 ],
527 dxflags: ["--core-library"],
528}
529
David Su511a8142020-01-09 14:02:21 -0800530// utility classes statically linked into framework-wifi and dynamically linked
531// into wifi-service
532java_library {
533 name: "framework-wifi-util-lib",
David Sufd626db2020-11-09 14:31:45 -0800534 sdk_version: "module_current",
535 min_sdk_version: "30",
David Su511a8142020-01-09 14:02:21 -0800536 srcs: [
David Su511a8142020-01-09 14:02:21 -0800537 "core/java/com/android/internal/util/AsyncChannel.java",
538 "core/java/com/android/internal/util/AsyncService.java",
539 "core/java/com/android/internal/util/Protocol.java",
David Su369c9202020-01-09 18:09:56 -0800540 "telephony/java/android/telephony/Annotation.java",
David Su298cd362020-01-17 19:02:49 +0000541 ":net-utils-framework-wifi-common-srcs",
David Su511a8142020-01-09 14:02:21 -0800542 ],
543 libs: [
544 "framework-annotations-lib",
Remi NGUYEN VANf3114972021-03-24 22:59:50 +0900545 "framework-connectivity.stubs.module_lib",
David Su511a8142020-01-09 14:02:21 -0800546 "unsupportedappusage",
David Su511a8142020-01-09 14:02:21 -0800547 ],
David Su57bca312020-04-21 19:49:32 -0700548 visibility: [
549 "//frameworks/base/wifi",
550 "//frameworks/base/services/net",
Baligh Uddin09fdba42020-12-23 22:42:10 +0000551 "//packages/modules/Wifi/framework",
David Su57bca312020-04-21 19:49:32 -0700552 ],
David Su511a8142020-01-09 14:02:21 -0800553}
554
Jiyong Park0d7e86d2019-12-20 14:35:43 +0900555// TODO(b/145644363): move this to under StubLibraries.bp or ApiDocs.bp
Anton Hanssonf67ce742022-02-18 19:26:20 +0000556metalava_framework_docs_args = "" +
Aurimas Liutikas1f76a5a2019-11-20 17:51:42 -0800557 "--api-lint-ignore-prefix android.icu. " +
558 "--api-lint-ignore-prefix java. " +
559 "--api-lint-ignore-prefix junit. " +
Anton Hanssonf67ce742022-02-18 19:26:20 +0000560 "--api-lint-ignore-prefix org. " +
561 "--error NoSettingsProvider " +
562 "--error UnhiddenSystemApi " +
563 "--force-convert-to-warning-nullability-annotations +*:-android.*:+android.icu.*:-dalvik.* " +
564 "--hide BroadcastBehavior " +
565 "--hide CallbackInterface " +
566 "--hide DeprecationMismatch " +
567 "--hide HiddenSuperclass " +
568 "--hide HiddenTypeParameter " +
569 "--hide MissingPermission " +
570 "--hide-package android.audio.policy.configuration.V7_0 " +
571 "--hide-package com.android.server " +
572 "--hide RequiresPermission " +
573 "--hide SdkConstant " +
574 "--hide Todo " +
575 "--hide Typo " +
576 "--hide UnavailableSymbol " +
577 "--manifest $(location core/res/AndroidManifest.xml) "
Jiyong Park0d7e86d2019-12-20 14:35:43 +0900578
Anton Hansson76ac4cc2021-05-05 19:22:52 +0100579packages_to_document = [
580 "android",
581 "dalvik",
582 "java",
583 "javax",
584 "junit",
585 "org.apache.http",
586 "org.json",
587 "org.w3c.dom",
588 "org.xml.sax",
589 "org.xmlpull",
590]
591
Anton Hansson77ff72f2021-03-30 10:11:22 +0100592filegroup {
Anton Hansson867f94c2021-05-05 10:32:31 +0100593 name: "android-non-updatable-stub-sources",
Anton Hansson77ff72f2021-03-30 10:11:22 +0100594 srcs: [
Anton Hanssona08dc692021-03-30 10:31:15 +0100595 ":framework-mime-sources", // mimemap builds separately but has no separate droidstubs.
Anton Hansson77ff72f2021-03-30 10:11:22 +0100596 ":framework-non-updatable-sources",
597 ":opt-telephony-srcs",
598 ":opt-net-voip-srcs",
599 "core/java/**/*.logtags",
600 "**/package.html",
601 ],
602 visibility: ["//visibility:private"],
603}
604
Anton Hansson9dce8322022-01-24 14:14:33 +0000605// Defaults for all stubs that include the non-updatable framework. These defaults do not include
606// module symbols, so will not compile correctly on their own. Users must add module APIs to the
607// classpath (or sources) somehow.
Anton Hansson867f94c2021-05-05 10:32:31 +0100608stubs_defaults {
609 name: "android-non-updatable-stubs-defaults",
610 srcs: [":android-non-updatable-stub-sources"],
611 sdk_version: "none",
612 system_modules: "none",
613 java_version: "1.8",
614 arg_files: ["core/res/AndroidManifest.xml"],
Anton Hansson867f94c2021-05-05 10:32:31 +0100615 aidl: {
616 local_include_dirs: [
Anton Hansson867f94c2021-05-05 10:32:31 +0100617 "media/aidl",
Anton Hansson867f94c2021-05-05 10:32:31 +0100618 "telephony/java",
619 ],
Baligh Uddinf33ffa12021-05-17 04:07:33 +0000620 include_dirs: [
621 "frameworks/av/aidl",
Jeff Sharkey75d4f932021-07-26 15:41:01 -0600622 "frameworks/native/libs/permission/aidl",
William Escandec01e5522022-02-25 12:32:42 +0100623 "packages/modules/Bluetooth/framework/aidl-export",
Junyu Lai5bf27122022-01-12 09:33:53 +0000624 "packages/modules/Connectivity/framework/aidl-export",
Roopa Sattiraju293ed882022-02-03 09:07:17 -0800625 "packages/modules/Media/apex/aidl/stable",
Ilya Matyukhin10ae7f22022-10-31 02:06:53 +0000626 "hardware/interfaces/biometrics/common/aidl",
627 "hardware/interfaces/biometrics/fingerprint/aidl",
Leon Scroggins III73e06892022-01-31 15:47:34 -0500628 "hardware/interfaces/graphics/common/aidl",
Ilya Matyukhin10ae7f22022-10-31 02:06:53 +0000629 "hardware/interfaces/keymaster/aidl",
Baligh Uddinf33ffa12021-05-17 04:07:33 +0000630 ],
Anton Hansson867f94c2021-05-05 10:32:31 +0100631 },
632 // These are libs from framework-internal-utils that are required (i.e. being referenced)
633 // from framework-non-updatable-sources. Add more here when there's a need.
634 // DO NOT add the entire framework-internal-utils. It might cause unnecessary circular
635 // dependencies gets bigger.
636 libs: [
637 "android.hardware.cas-V1.2-java",
638 "android.hardware.health-V1.0-java-constants",
639 "android.hardware.radio-V1.5-java",
640 "android.hardware.radio-V1.6-java",
641 "android.hardware.thermal-V1.0-java-constants",
642 "android.hardware.thermal-V2.0-java",
643 "android.hardware.tv.input-V1.0-java-constants",
Anton Hansson867f94c2021-05-05 10:32:31 +0100644 "android.hardware.usb-V1.0-java-constants",
645 "android.hardware.usb-V1.1-java-constants",
646 "android.hardware.usb.gadget-V1.0-java",
647 "android.hardware.vibrator-V1.3-java",
648 "framework-protos",
Anton Hansson9dce8322022-01-24 14:14:33 +0000649 ],
650 filter_packages: packages_to_document,
651 high_mem: true, // Lots of sources => high memory use, see b/170701554
652 installable: false,
653 annotations_enabled: true,
654 previous_api: ":android.api.public.latest",
655 merge_annotations_dirs: ["metalava-manual"],
656 defaults_visibility: ["//visibility:private"],
657 visibility: ["//frameworks/base/api"],
658}
659
660// Defaults with module APIs in the classpath (mostly from prebuilts).
661// Suitable for compiling android-non-updatable.
662stubs_defaults {
663 name: "module-classpath-stubs-defaults",
664 aidl: {
Anton Hansson9dce8322022-01-24 14:14:33 +0000665 include_dirs: [
William Escandec01e5522022-02-25 12:32:42 +0100666 "packages/modules/Bluetooth/framework/aidl-export",
Anton Hansson9dce8322022-01-24 14:14:33 +0000667 "packages/modules/Connectivity/framework/aidl-export",
Baligh Uddinb8b46fd2022-02-11 14:20:10 +0000668 "packages/modules/Media/apex/aidl/stable",
Anton Hansson9dce8322022-01-24 14:14:33 +0000669 ],
670 },
671 libs: [
Anton Hansson4e86dca2021-05-07 16:32:10 +0100672 "art.module.public.api",
markchiencd813a32021-11-11 00:42:55 +0800673 "sdk_module-lib_current_framework-tethering",
paulhue074dd2e2022-02-08 21:23:06 +0800674 "sdk_module-lib_current_framework-connectivity-t",
Roopa Sattiraju8e305772022-01-20 10:05:19 -0800675 "sdk_public_current_framework-bluetooth",
Anton Hansson867f94c2021-05-05 10:32:31 +0100676 // There are a few classes from modules used by the core that
677 // need to be resolved by metalava. We use a prebuilt stub of the
678 // full sdk to ensure we can resolve them. If a new class gets added,
679 // the prebuilts/sdk/current needs to be updated.
680 "sdk_system_current_android",
681 // NOTE: The below can be removed once the prebuilt stub contains IKE.
682 "sdk_system_current_android.net.ipsec.ike",
683 ],
Anton Hansson867f94c2021-05-05 10:32:31 +0100684 defaults_visibility: ["//visibility:private"],
Anton Hansson867f94c2021-05-05 10:32:31 +0100685}
686
Jiyong Park0d7e86d2019-12-20 14:35:43 +0900687build = [
688 "StubLibraries.bp",
689 "ApiDocs.bp",
Anton Hansson31fb58b2021-04-12 18:03:12 +0100690 "ProtoLibraries.bp",
Harry Zhangd61699e2021-06-01 16:48:25 -0700691 "TestProtoLibraries.bp",
Jiyong Park0d7e86d2019-12-20 14:35:43 +0900692]