blob: 7c347b97d0778f36fde1c4ab0f759cb2eca5f8c4 [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",
75 ":framework-lowpan-sources",
Jiyong Park20426532019-08-19 15:24:49 +090076 ":framework-mca-effect-sources",
77 ":framework-mca-filterfw-sources",
78 ":framework-mca-filterpacks-sources",
Anton Hansson3b6477f2022-01-17 10:17:15 +000079 ":framework-media-non-updatable-sources",
Amit Mahajan6237a6b2019-10-07 17:41:26 -070080 ":framework-mms-sources",
Rajesh Nyamagoud4fe64fb2021-09-14 05:34:11 +000081 ":framework-omapi-sources",
Jiyong Park20426532019-08-19 15:24:49 +090082 ":framework-opengl-sources",
83 ":framework-rs-sources",
84 ":framework-sax-sources",
85 ":framework-telecomm-sources",
Amit Mahajand3551532019-09-23 17:59:57 -070086 ":framework-telephony-common-sources",
Malcolm Chenfbc5c362020-03-16 15:28:35 -070087 ":framework-telephony-sources",
Benedict Wong26497362020-08-10 17:54:33 -070088 ":framework-vcn-util-sources",
David Su130441b2019-12-14 21:37:20 -080089 ":framework-wifi-annotations",
David Su6f646ef2019-12-10 13:33:06 -080090 ":framework-wifi-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +090091 ":PacProcessor-aidl-sources",
92 ":ProxyHandler-aidl-sources",
Aaron Huangc4081b22020-01-13 15:03:35 +080093 ":net-utils-framework-common-srcs",
Jiyong Parkb3609312019-08-16 21:17:14 +090094
atrost87488352019-10-10 19:27:31 +010095 // AIDL from frameworks/base/native/
96 ":platform-compat-native-aidl",
97
Jiyong Park20426532019-08-19 15:24:49 +090098 // AIDL sources from external directories
Yu-Han Yang97f3b91c2022-03-08 14:36:18 -080099 ":android.hardware.gnss-V2-java-source",
Leon Scroggins III73e06892022-01-31 15:47:34 -0500100 ":android.hardware.graphics.common-V3-java-source",
Eran Messeri4be1392292022-02-15 11:12:59 +0000101 ":android.hardware.security.keymint-V2-java-source",
Janis Danisevskis23902672021-03-17 11:02:19 -0700102 ":android.hardware.security.secureclock-V1-java-source",
Hongguang956e6352021-07-20 17:45:28 -0700103 ":android.hardware.tv.tuner-V1-java-source",
Janis Danisevskis23902672021-03-17 11:02:19 -0700104 ":android.security.apc-java-source",
105 ":android.security.authorization-java-source",
Janis Danisevskis191b2062021-06-14 14:33:10 -0700106 ":android.security.legacykeystore-java-source",
Janis Danisevskis23902672021-03-17 11:02:19 -0700107 ":android.security.maintenance-java-source",
Tej Singh932f8702021-06-14 23:40:22 -0700108 ":android.security.metrics-java-source",
Janis Danisevskis23902672021-03-17 11:02:19 -0700109 ":android.system.keystore2-V1-java-source",
David Zeuthen045b6de2019-10-29 15:15:18 -0400110 ":credstore_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900111 ":dumpstate_aidl",
112 ":framework_native_aidl",
113 ":gatekeeper_aidl",
114 ":gsiservice_aidl",
chaviw9d438f92021-05-20 11:18:06 -0500115 ":guiconstants_aidl",
Ryan Mitchellfebbc332021-02-12 09:21:52 -0800116 ":idmap2_aidl",
Ryan Mitchell6a2ca782021-01-19 13:51:15 -0800117 ":idmap2_core_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900118 ":incidentcompanion_aidl",
Bernardo Rufino64bbd4b2020-08-19 14:45:30 +0100119 ":inputconstants_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900120 ":installd_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900121 ":libaudioclient_aidl",
122 ":libbinder_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900123 ":libcamera_client_aidl",
124 ":libcamera_client_framework_aidl",
125 ":libupdate_engine_aidl",
Wenhao Wang256519a2022-01-11 22:29:18 -0800126 ":logd_aidl",
Amy Zhangccdbc4d2020-06-08 21:29:59 -0700127 ":resourcemanager_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900128 ":storaged_aidl",
129 ":vold_aidl",
Kriti Dangaf977732021-02-25 18:07:34 +0100130 ":deviceproductinfoconstants_aidl",
Jiyong Park1cc95662019-08-07 22:45:07 +0900131
Jiyong Park20426532019-08-19 15:24:49 +0900132 // For the generated R.java and Manifest.java
133 ":framework-res{.aapt.srcjar}",
134
135 // etc.
136 ":framework-javastream-protos",
Muhammad Qureshi04ec2522020-01-27 16:36:45 -0800137 ":statslog-framework-java-gen", // FrameworkStatsLog.java
Hayden Gomes24b336f2020-11-05 16:28:21 -0800138 ":audio_policy_configuration_V7_0",
Jiyong Park20426532019-08-19 15:24:49 +0900139 ],
140}
Jiyong Park1cc95662019-08-07 22:45:07 +0900141
Neha Pattan2edfc482022-03-02 17:37:23 +0000142java_library {
Anton Hansson2d6c4272020-08-18 12:52:44 +0100143 name: "framework-all",
144 installable: false,
145 static_libs: [
Anton Hansson23274ee2022-01-28 11:31:50 +0000146 "all-framework-module-impl",
Anton Hansson2d6c4272020-08-18 12:52:44 +0100147 "framework-minus-apex",
Anton Hansson2d6c4272020-08-18 12:52:44 +0100148 ],
149 apex_available: ["//apex_available:platform"],
150 sdk_version: "core_platform",
151 visibility: [
152 // DO NOT ADD ANY MORE ENTRIES TO THIS LIST
153 "//external/robolectric-shadows:__subpackages__",
Rex Hoffman800f9952022-08-25 22:20:38 +0000154 //This will eventually replace the item above, and serves the
155 //same purpose.
156 "//external/robolectric:__subpackages__",
Anton Hansson2d6c4272020-08-18 12:52:44 +0100157 "//frameworks/layoutlib:__subpackages__",
158 ],
Anton Hanssone996d432020-03-07 11:40:10 +0000159}
160
Jiyong Park392729f2020-01-17 16:32:53 +0900161// AIDL files under these paths are mixture of public and private ones.
162// They shouldn't be exported across module boundaries.
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100163java_defaults {
Makoto Onuki62242c42019-08-05 12:54:20 -0700164 name: "framework-aidl-export-defaults",
Makoto Onuki62242c42019-08-05 12:54:20 -0700165 aidl: {
Jiyong Parkb3609312019-08-16 21:17:14 +0900166 export_include_dirs: [
167 "core/java",
168 "drm/java",
169 "graphics/java",
David Zeuthen045b6de2019-10-29 15:15:18 -0400170 "identity/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900171 "keystore/java",
172 "location/java",
173 "lowpan/java",
174 "media/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900175 "media/mca/effect/java",
176 "media/mca/filterfw/java",
177 "media/mca/filterpacks/java",
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700178 "mms/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900179 "opengl/java",
180 "rs/java",
181 "sax/java",
182 "telecomm/java",
Anton Hanssone996d432020-03-07 11:40:10 +0000183
Anton Hanssone996d432020-03-07 11:40:10 +0000184 // TODO(b/147699819): remove this
185 "telephony/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900186 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700187 },
188}
189
Jiyong Park20426532019-08-19 15:24:49 +0900190// Collection of classes that are generated from non-Java files that are not listed in
191// framework_srcs. These have no or very limited dependency to the framework.
192java_library {
193 name: "framework-internal-utils",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800194 static_libs: [
Dario Frenid8bf22e2018-08-31 14:18:04 +0100195 "apex_aidl_interface-java",
Samiul Islame4561272021-08-26 11:41:37 +0100196 "packagemanager_aidl-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800197 "framework-protos",
Peiyong Linb967a4c2020-07-27 22:16:13 -0700198 "updatable-driver-protos",
Kelvin Zhanga48c18e2021-04-12 17:23:51 -0400199 "ota_metadata_proto_java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800200 "android.hidl.base-V1.0-java",
201 "android.hardware.cas-V1.0-java",
Henry Fang43cab922019-12-27 16:50:20 -0800202 "android.hardware.cas-V1.1-java",
203 "android.hardware.cas-V1.2-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800204 "android.hardware.contexthub-V1.0-java",
Anthony Stange521a9052020-02-07 18:45:47 -0500205 "android.hardware.contexthub-V1.1-java",
Arthur Ishiguro8368e942020-10-14 13:39:09 -0700206 "android.hardware.contexthub-V1.2-java",
Arthur Ishiguro7fe2ba52021-08-26 09:30:02 -0700207 "android.hardware.contexthub-V1-java",
Yu-Han Yang9fe06dd2019-11-18 16:23:31 -0800208 "android.hardware.gnss-V1.0-java",
Yu-Han Yangad03c472020-01-14 15:31:01 -0800209 "android.hardware.gnss-V2.1-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800210 "android.hardware.health-V1.0-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800211 "android.hardware.radio-V1.0-java",
212 "android.hardware.radio-V1.1-java",
213 "android.hardware.radio-V1.2-java",
214 "android.hardware.radio-V1.3-java",
215 "android.hardware.radio-V1.4-java",
Sarah Chin21e9c632019-11-05 13:30:10 -0800216 "android.hardware.radio-V1.5-java",
Daniel Bright8b4502e2020-09-02 17:10:54 -0700217 "android.hardware.radio-V1.6-java",
Sarah Chin3101c0b2021-09-29 12:13:27 -0700218 "android.hardware.radio.data-V1-java",
219 "android.hardware.radio.messaging-V1-java",
220 "android.hardware.radio.modem-V1-java",
221 "android.hardware.radio.network-V1-java",
222 "android.hardware.radio.sim-V1-java",
223 "android.hardware.radio.voice-V1-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800224 "android.hardware.thermal-V1.0-java-constants",
Wei Wangfb21bd82019-01-10 14:16:23 -0800225 "android.hardware.thermal-V1.0-java",
Wei Wangbad7c202018-11-01 11:57:39 -0700226 "android.hardware.thermal-V1.1-java",
227 "android.hardware.thermal-V2.0-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800228 "android.hardware.tv.input-V1.0-java-constants",
229 "android.hardware.usb-V1.0-java-constants",
230 "android.hardware.usb-V1.1-java-constants",
Badhri Jagan Sridharane966a382018-12-09 14:49:38 -0800231 "android.hardware.usb-V1.2-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800232 "android.hardware.usb.gadget-V1.0-java",
raychi88254a22020-09-30 19:04:08 +0800233 "android.hardware.usb.gadget-V1.1-java",
234 "android.hardware.usb.gadget-V1.2-java",
Michael Wrightf268bf52018-02-07 23:23:34 +0000235 "android.hardware.vibrator-V1.0-java",
236 "android.hardware.vibrator-V1.1-java",
237 "android.hardware.vibrator-V1.2-java",
Harpreet "Eli" Sanghaa456f082018-12-14 12:06:10 +0900238 "android.hardware.vibrator-V1.3-java",
Lais Andradeb847d632021-02-23 10:35:27 +0000239 "android.hardware.vibrator-V2-java",
Rajesh Nyamagoud4fe64fb2021-09-14 05:34:11 +0000240 "android.se.omapi-V1-java",
Michael Sund5237962020-11-06 03:28:14 +0000241 "android.system.suspend.control.internal-java",
arangelov1ab61492018-11-22 13:56:50 +0000242 "devicepolicyprotosnano",
Inseob Kim4fe9f0f2019-07-30 18:23:26 +0900243
244 "com.android.sysprop.apex",
Nikita Ioffe779d6be2020-02-06 23:17:17 +0000245 "com.android.sysprop.init",
Alexander Mishkovets77f6bc82020-07-14 19:14:10 +0200246 "com.android.sysprop.localization",
Inseob Kim4fe9f0f2019-07-30 18:23:26 +0900247 "PlatformProperties",
Michael Bestas0e797d02023-05-22 17:00:47 +0300248 "SurfaceFlingerProperties",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800249 ],
Jiyong Park20426532019-08-19 15:24:49 +0900250 sdk_version: "core_platform",
251 installable: false,
252}
253
Anton Hansson524bf242021-05-25 12:48:58 +0100254// NOTE: This filegroup is exposed for vendor libraries to depend on and is referenced in
255// documentation. Do not remove without consulting the treble/hidl teams.
Anton Hanssondffc59c2021-05-25 11:43:36 +0000256filegroup {
257 name: "framework-jarjar-rules",
258 srcs: ["framework-jarjar-rules.txt"],
Anton Hansson524bf242021-05-25 12:48:58 +0100259 visibility: ["//visibility:public"],
Anton Hanssondffc59c2021-05-25 11:43:36 +0000260}
261
Ioana Stefan2f5c5452020-10-15 15:00:24 +0200262java_defaults {
263 name: "framework-minus-apex-defaults",
Anton Hansson5954c6d2020-08-19 14:37:54 +0100264 defaults: ["framework-aidl-export-defaults"],
265 srcs: [
266 ":framework-non-updatable-sources",
267 "core/java/**/*.logtags",
Daniel Norman66ebced2021-09-21 13:47:36 -0700268 ":apex-info-list",
Anton Hansson5954c6d2020-08-19 14:37:54 +0100269 ],
Anton Hansson5954c6d2020-08-19 14:37:54 +0100270 aidl: {
271 generate_get_transaction_name: true,
Remi NGUYEN VAN7b6b0062021-03-19 10:15:06 +0000272 local_include_dirs: [
273 "media/aidl",
Remi NGUYEN VAN7b6b0062021-03-19 10:15:06 +0000274 ],
Baligh Uddinf33ffa12021-05-17 04:07:33 +0000275 include_dirs: [
276 "frameworks/av/aidl",
Jeff Sharkey75d4f932021-07-26 15:41:01 -0600277 "frameworks/native/libs/permission/aidl",
William Escandec01e5522022-02-25 12:32:42 +0100278 "packages/modules/Bluetooth/framework/aidl-export",
Baligh Uddinf33ffa12021-05-17 04:07:33 +0000279 "packages/modules/Connectivity/framework/aidl-export",
Baligh Uddinb8b46fd2022-02-11 14:20:10 +0000280 "packages/modules/Media/apex/aidl/stable",
Leon Scroggins III73e06892022-01-31 15:47:34 -0500281 "hardware/interfaces/graphics/common/aidl",
Baligh Uddinf33ffa12021-05-17 04:07:33 +0000282 ],
Anton Hansson5954c6d2020-08-19 14:37:54 +0100283 },
284 dxflags: [
285 "--core-library",
286 "--multi-dex",
287 ],
Anton Hanssondffc59c2021-05-25 11:43:36 +0000288 jarjar_rules: ":framework-jarjar-rules",
Jiyong Park911cd4f2019-10-21 14:35:14 +0900289 javac_shard_size: 150,
Anton Hansson5954c6d2020-08-19 14:37:54 +0100290 plugins: [
291 "view-inspector-annotation-processor",
292 "staledataclass-annotation-processor",
293 "error_prone_android_framework",
294 ],
atrostaec9bc12019-08-16 18:14:09 +0100295 required: [
Marin Shalamanov11047252021-11-22 17:35:30 +0100296 // TODO(b/120066492): remove default_television.xml when the build system
297 // propagates "required" properly.
298 "default_television.xml",
atrostaec9bc12019-08-16 18:14:09 +0100299 "framework-platform-compat-config",
Marin Shalamanov11047252021-11-22 17:35:30 +0100300 // TODO(b/120066492): remove gps_debug and protolog.conf.json when the build
301 // system propagates "required" properly.
Anton Hansson5954c6d2020-08-19 14:37:54 +0100302 "gps_debug.conf",
Victor Changa4fae272020-10-30 12:14:34 +0000303 "icu4j-platform-compat-config",
Anton Hansson5954c6d2020-08-19 14:37:54 +0100304 "protolog.conf.json.gz",
atrost86895aa2019-08-19 16:51:15 +0100305 "services-platform-compat-config",
Rambo Wang05e55c92021-06-25 11:41:43 -0700306 "TeleService-platform-compat-config",
Ivan Chiang3cb1cbd2020-02-18 10:50:10 +0800307 "documents-ui-compat-config",
Varun Shahf952e66c12020-06-25 11:30:13 -0700308 "calendar-provider-compat-config",
Marcus Hagerott6c681052021-11-12 17:48:47 -0800309 "contacts-provider-platform-compat-config",
atrostaec9bc12019-08-16 18:14:09 +0100310 ],
Anton Hansson5954c6d2020-08-19 14:37:54 +0100311 libs: [
312 "app-compat-annotations",
313 "ext",
314 "framework-updatable-stubs-module_libs_api",
315 "unsupportedappusage",
316 ],
317 sdk_version: "core_platform",
Tobias Thiererc0c06082019-11-22 16:33:18 +0000318 static_libs: [
Hongguang956e6352021-07-20 17:45:28 -0700319 "android.hardware.common.fmq-V1-java",
Ytai Ben-Tsvi128df2a2021-03-18 09:43:27 -0700320 // TODO(b/184162091)
321 "android.hardware.soundtrigger3-V1-java",
Daulet Zhanguzin59444d52021-01-25 19:43:53 +0000322 "bouncycastle-repackaged-unbundled",
Anton Hansson5954c6d2020-08-19 14:37:54 +0100323 "framework-internal-utils",
Tobias Thierer82968532019-11-29 19:39:45 +0000324 // If MimeMap ever becomes its own APEX, then this dependency would need to be removed
325 // in favor of an API stubs dependency in java_library "framework" below.
Tobias Thiererc0c06082019-11-22 16:33:18 +0000326 "mimemap",
Ytai Ben-Tsvic3cd3cd2020-10-30 12:34:51 -0700327 "av-types-aidl-java",
Amy Zhang39a3fa42020-12-21 16:56:03 -0800328 "tv_tuner_resource_manager_aidl_interface-java",
Ytai Ben-Tsvida7c21e2020-09-16 13:04:31 -0700329 "soundtrigger_middleware-aidl-java",
Pedro Loureiro5ef7d7b2022-03-17 12:41:31 +0000330 "modules-utils-build",
Alexander Dorokhinec0bf81a2021-05-12 11:34:51 -0700331 "modules-utils-preconditions",
William Escande33a14632021-12-16 16:07:55 +0100332 "modules-utils-synchronous-result-receiver",
Chiachang Wang6a555272020-11-02 16:51:24 +0800333 "modules-utils-os",
Corinacbc4d682022-02-10 18:35:43 +0000334 "modules-utils-uieventlogger-interface",
Svet Ganov4bf102a2021-04-22 20:09:49 +0000335 "framework-permission-aidl-java",
Eric Laurent8500f6c2021-07-24 08:47:17 +0200336 "spatializer-aidl-java",
337 "audiopolicy-types-aidl-java",
Tobias Thiererc0c06082019-11-22 16:33:18 +0000338 ],
Ioana Stefan2f5c5452020-10-15 15:00:24 +0200339}
340
341java_library {
342 name: "framework-minus-apex",
343 defaults: ["framework-minus-apex-defaults"],
344 installable: true,
Jiyong Park911cd4f2019-10-21 14:35:14 +0900345 // For backwards compatibility.
346 stem: "framework",
Jiyong Park352f9e22019-12-09 14:45:07 +0900347 apex_available: ["//apex_available:platform"],
LuK13379d8b2a92022-11-02 12:59:32 +0100348 static_libs: ["org.lineageos.platform.resources"],
Jiyong Park212d2e82020-01-03 21:07:38 +0900349 visibility: [
350 "//frameworks/base",
Jiyong Park634819c2020-02-04 21:20:02 +0900351 // TODO(b/147128803) remove the below lines
Jiyong Park212d2e82020-01-03 21:07:38 +0900352 "//frameworks/base/apex/blobstore/framework",
353 "//frameworks/base/apex/jobscheduler/framework",
markchien2c153702020-02-06 19:23:26 +0800354 "//frameworks/base/packages/Tethering/tests/unit",
Baligh Uddinff8ff122020-10-29 02:11:55 +0000355 "//packages/modules/Connectivity/Tethering/tests/unit",
Jiyong Park212d2e82020-01-03 21:07:38 +0900356 ],
Bernardo Rufino2b7e5912021-11-29 10:22:15 +0000357 lint: {
358 extra_check_modules: ["AndroidFrameworkLintChecker"],
359 },
Jeff Sharkey6c8ffbc2020-10-02 11:52:05 -0600360 errorprone: {
361 javacflags: [
Jeff Sharkey7cdc3bf2020-10-06 14:55:37 -0600362 "-Xep:AndroidFrameworkBinderIdentity:ERROR",
Jeff Sharkey6c8ffbc2020-10-02 11:52:05 -0600363 "-Xep:AndroidFrameworkCompatChange:ERROR",
Jeff Sharkey9af4aea2020-10-02 12:00:59 -0600364 "-Xep:AndroidFrameworkUid:ERROR",
Jeff Sharkey6c8ffbc2020-10-02 11:52:05 -0600365 ],
366 },
Jiyong Park911cd4f2019-10-21 14:35:14 +0900367}
368
Ioana Stefan2f5c5452020-10-15 15:00:24 +0200369java_library {
370 name: "framework-minus-apex-intdefs",
371 defaults: ["framework-minus-apex-defaults"],
372 plugins: ["intdef-annotation-processor"],
373}
374
Jiyong Park911cd4f2019-10-21 14:35:14 +0900375// This "framework" module is NOT installed to the device. It's
376// "framework-minus-apex" that gets installed to the device. Note that
377// the filename is still framework.jar (via the stem property) for
378// compatibility reason. The purpose of this module is to provide
379// framework APIs (both public and private) for bundled apps.
380// "framework-minus-apex" can't be used for the purpose because 1)
381// many apps have already hardcoded the name "framework" and
382// 2) it lacks API symbols from updatable modules - as it's clear from
383// its suffix "-minus-apex".
384java_library {
385 name: "framework",
386 defaults: ["framework-aidl-export-defaults"],
387 installable: false, // this lib is a build-only library
388 static_libs: [
Malcolm Chenfbc5c362020-03-16 15:28:35 -0700389 "app-compat-annotations",
Jiyong Park911cd4f2019-10-21 14:35:14 +0900390 "framework-minus-apex",
Anton Hanssone996d432020-03-07 11:40:10 +0000391 "framework-updatable-stubs-module_libs_api",
Jiyong Park911cd4f2019-10-21 14:35:14 +0900392 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700393 sdk_version: "core_platform",
Jiyong Park352f9e22019-12-09 14:45:07 +0900394 apex_available: ["//apex_available:platform"],
Makoto Onuki62242c42019-08-05 12:54:20 -0700395}
396
atrostb9c34502019-08-05 12:22:18 +0100397platform_compat_config {
Songchun Fand4574b52021-03-02 20:05:57 +0000398 name: "framework-platform-compat-config",
399 src: ":framework-minus-apex",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100400}
401
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900402filegroup {
evitayane22e47f2019-12-30 16:05:38 -0800403 name: "framework-ike-shared-srcs",
Baligh Uddinb7ec5bb2020-05-27 19:22:36 +0000404 visibility: ["//packages/modules/IPsec"],
evitayane22e47f2019-12-30 16:05:38 -0800405 srcs: [
evitayane9cc4942020-03-03 17:14:47 -0800406 "core/java/com/android/internal/util/HexDump.java",
Yan Yane7a360f2021-06-10 18:45:39 -0700407 "core/java/com/android/internal/util/WakeupMessage.java",
Yan Yana3e954f2020-11-09 00:09:39 -0800408 "services/core/java/com/android/server/vcn/util/PersistableBundleUtils.java",
evitayan996aa2a2019-12-30 11:19:47 -0800409 "telephony/java/android/telephony/Annotation.java",
evitayane22e47f2019-12-30 16:05:38 -0800410 ],
411}
412
413filegroup {
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900414 name: "framework-networkstack-shared-srcs",
415 srcs: [
416 // TODO: remove these annotations as soon as we can use andoid.support.annotations.*
Chalard Jean95213512019-01-30 21:04:58 +0900417 ":framework-annotations",
Alexander Dorokhinec0bf81a2021-05-12 11:34:51 -0700418 ":modules-utils-preconditions-srcs",
Dmitri Plotnikovf800b702020-05-15 13:49:20 -0700419 "core/java/android/util/IndentingPrintWriter.java",
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900420 "core/java/android/util/LocalLog.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900421 "core/java/com/android/internal/util/HexDump.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900422 "core/java/com/android/internal/util/IndentingPrintWriter.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900423 "core/java/com/android/internal/util/MessageUtils.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900424 "core/java/com/android/internal/util/RingBufferIndices.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900425 "core/java/com/android/internal/util/WakeupMessage.java",
johnson.yeh095b7a02019-12-19 20:30:34 +0800426 "core/java/com/android/internal/util/TokenBucket.java",
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100427 ],
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900428}
429
Colin Crossd8e02252017-10-02 17:14:22 -0700430// Build ext.jar
431// ============================================================
432java_library {
433 name: "ext",
Colin Crossa12c0f52018-06-27 11:00:11 -0700434 installable: true,
Paul Duffin8fcace42019-06-12 13:47:18 +0100435 sdk_version: "core_platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700436 static_libs: [
437 "libphonenumber-platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700438 "tagsoup",
Ricky Wai0d1bc332017-10-31 14:31:01 +0000439 "rappor",
Colin Crossd8e02252017-10-02 17:14:22 -0700440 ],
441 dxflags: ["--core-library"],
442}
443
David Su511a8142020-01-09 14:02:21 -0800444// utility classes statically linked into framework-wifi and dynamically linked
445// into wifi-service
446java_library {
447 name: "framework-wifi-util-lib",
David Sufd626db2020-11-09 14:31:45 -0800448 sdk_version: "module_current",
449 min_sdk_version: "30",
David Su511a8142020-01-09 14:02:21 -0800450 srcs: [
David Su511a8142020-01-09 14:02:21 -0800451 "core/java/com/android/internal/util/AsyncChannel.java",
452 "core/java/com/android/internal/util/AsyncService.java",
453 "core/java/com/android/internal/util/Protocol.java",
David Su369c9202020-01-09 18:09:56 -0800454 "telephony/java/android/telephony/Annotation.java",
David Su298cd362020-01-17 19:02:49 +0000455 ":net-utils-framework-wifi-common-srcs",
David Su511a8142020-01-09 14:02:21 -0800456 ],
457 libs: [
458 "framework-annotations-lib",
Remi NGUYEN VANf3114972021-03-24 22:59:50 +0900459 "framework-connectivity.stubs.module_lib",
David Su511a8142020-01-09 14:02:21 -0800460 "unsupportedappusage",
David Su511a8142020-01-09 14:02:21 -0800461 ],
David Su57bca312020-04-21 19:49:32 -0700462 visibility: [
463 "//frameworks/base/wifi",
464 "//frameworks/base/services/net",
Baligh Uddin09fdba42020-12-23 22:42:10 +0000465 "//packages/modules/Wifi/framework",
David Su57bca312020-04-21 19:49:32 -0700466 ],
David Su511a8142020-01-09 14:02:21 -0800467}
468
Jiyong Park0d7e86d2019-12-20 14:35:43 +0900469// TODO(b/145644363): move this to under StubLibraries.bp or ApiDocs.bp
Anton Hanssonf67ce742022-02-18 19:26:20 +0000470metalava_framework_docs_args = "" +
Aurimas Liutikas1f76a5a2019-11-20 17:51:42 -0800471 "--api-lint-ignore-prefix android.icu. " +
472 "--api-lint-ignore-prefix java. " +
473 "--api-lint-ignore-prefix junit. " +
Anton Hanssonf67ce742022-02-18 19:26:20 +0000474 "--api-lint-ignore-prefix org. " +
475 "--error NoSettingsProvider " +
476 "--error UnhiddenSystemApi " +
477 "--force-convert-to-warning-nullability-annotations +*:-android.*:+android.icu.*:-dalvik.* " +
478 "--hide BroadcastBehavior " +
479 "--hide CallbackInterface " +
480 "--hide DeprecationMismatch " +
481 "--hide HiddenSuperclass " +
482 "--hide HiddenTypeParameter " +
483 "--hide MissingPermission " +
484 "--hide-package android.audio.policy.configuration.V7_0 " +
485 "--hide-package com.android.server " +
486 "--hide RequiresPermission " +
487 "--hide SdkConstant " +
488 "--hide Todo " +
489 "--hide Typo " +
490 "--hide UnavailableSymbol " +
491 "--manifest $(location core/res/AndroidManifest.xml) "
Jiyong Park0d7e86d2019-12-20 14:35:43 +0900492
Anton Hansson76ac4cc2021-05-05 19:22:52 +0100493packages_to_document = [
494 "android",
495 "dalvik",
496 "java",
497 "javax",
498 "junit",
499 "org.apache.http",
500 "org.json",
501 "org.w3c.dom",
502 "org.xml.sax",
503 "org.xmlpull",
504]
505
Anton Hansson77ff72f2021-03-30 10:11:22 +0100506filegroup {
Anton Hansson867f94c2021-05-05 10:32:31 +0100507 name: "android-non-updatable-stub-sources",
Anton Hansson77ff72f2021-03-30 10:11:22 +0100508 srcs: [
Anton Hanssona08dc692021-03-30 10:31:15 +0100509 ":framework-mime-sources", // mimemap builds separately but has no separate droidstubs.
Anton Hansson77ff72f2021-03-30 10:11:22 +0100510 ":framework-non-updatable-sources",
511 ":opt-telephony-srcs",
512 ":opt-net-voip-srcs",
513 "core/java/**/*.logtags",
514 "**/package.html",
515 ],
516 visibility: ["//visibility:private"],
517}
518
Anton Hansson9dce8322022-01-24 14:14:33 +0000519// Defaults for all stubs that include the non-updatable framework. These defaults do not include
520// module symbols, so will not compile correctly on their own. Users must add module APIs to the
521// classpath (or sources) somehow.
Anton Hansson867f94c2021-05-05 10:32:31 +0100522stubs_defaults {
523 name: "android-non-updatable-stubs-defaults",
524 srcs: [":android-non-updatable-stub-sources"],
525 sdk_version: "none",
526 system_modules: "none",
527 java_version: "1.8",
528 arg_files: ["core/res/AndroidManifest.xml"],
Anton Hansson867f94c2021-05-05 10:32:31 +0100529 aidl: {
530 local_include_dirs: [
Anton Hansson867f94c2021-05-05 10:32:31 +0100531 "media/aidl",
Anton Hansson867f94c2021-05-05 10:32:31 +0100532 "telephony/java",
533 ],
Baligh Uddinf33ffa12021-05-17 04:07:33 +0000534 include_dirs: [
535 "frameworks/av/aidl",
Jeff Sharkey75d4f932021-07-26 15:41:01 -0600536 "frameworks/native/libs/permission/aidl",
William Escandec01e5522022-02-25 12:32:42 +0100537 "packages/modules/Bluetooth/framework/aidl-export",
Junyu Lai5bf27122022-01-12 09:33:53 +0000538 "packages/modules/Connectivity/framework/aidl-export",
Roopa Sattiraju293ed882022-02-03 09:07:17 -0800539 "packages/modules/Media/apex/aidl/stable",
Leon Scroggins III73e06892022-01-31 15:47:34 -0500540 "hardware/interfaces/graphics/common/aidl",
Baligh Uddinf33ffa12021-05-17 04:07:33 +0000541 ],
Anton Hansson867f94c2021-05-05 10:32:31 +0100542 },
543 // These are libs from framework-internal-utils that are required (i.e. being referenced)
544 // from framework-non-updatable-sources. Add more here when there's a need.
545 // DO NOT add the entire framework-internal-utils. It might cause unnecessary circular
546 // dependencies gets bigger.
547 libs: [
548 "android.hardware.cas-V1.2-java",
549 "android.hardware.health-V1.0-java-constants",
550 "android.hardware.radio-V1.5-java",
551 "android.hardware.radio-V1.6-java",
552 "android.hardware.thermal-V1.0-java-constants",
553 "android.hardware.thermal-V2.0-java",
554 "android.hardware.tv.input-V1.0-java-constants",
Anton Hansson867f94c2021-05-05 10:32:31 +0100555 "android.hardware.usb-V1.0-java-constants",
556 "android.hardware.usb-V1.1-java-constants",
557 "android.hardware.usb.gadget-V1.0-java",
558 "android.hardware.vibrator-V1.3-java",
559 "framework-protos",
Anton Hansson9dce8322022-01-24 14:14:33 +0000560 ],
561 filter_packages: packages_to_document,
562 high_mem: true, // Lots of sources => high memory use, see b/170701554
563 installable: false,
564 annotations_enabled: true,
565 previous_api: ":android.api.public.latest",
566 merge_annotations_dirs: ["metalava-manual"],
567 defaults_visibility: ["//visibility:private"],
568 visibility: ["//frameworks/base/api"],
569}
570
571// Defaults with module APIs in the classpath (mostly from prebuilts).
572// Suitable for compiling android-non-updatable.
573stubs_defaults {
574 name: "module-classpath-stubs-defaults",
575 aidl: {
Anton Hansson9dce8322022-01-24 14:14:33 +0000576 include_dirs: [
William Escandec01e5522022-02-25 12:32:42 +0100577 "packages/modules/Bluetooth/framework/aidl-export",
Anton Hansson9dce8322022-01-24 14:14:33 +0000578 "packages/modules/Connectivity/framework/aidl-export",
Baligh Uddinb8b46fd2022-02-11 14:20:10 +0000579 "packages/modules/Media/apex/aidl/stable",
Anton Hansson9dce8322022-01-24 14:14:33 +0000580 ],
581 },
582 libs: [
Anton Hansson4e86dca2021-05-07 16:32:10 +0100583 "art.module.public.api",
markchiencd813a32021-11-11 00:42:55 +0800584 "sdk_module-lib_current_framework-tethering",
paulhue074dd22022-02-08 21:23:06 +0800585 "sdk_module-lib_current_framework-connectivity-t",
Roopa Sattiraju8e305772022-01-20 10:05:19 -0800586 "sdk_public_current_framework-bluetooth",
Anton Hansson867f94c2021-05-05 10:32:31 +0100587 // There are a few classes from modules used by the core that
588 // need to be resolved by metalava. We use a prebuilt stub of the
589 // full sdk to ensure we can resolve them. If a new class gets added,
590 // the prebuilts/sdk/current needs to be updated.
591 "sdk_system_current_android",
592 // NOTE: The below can be removed once the prebuilt stub contains IKE.
593 "sdk_system_current_android.net.ipsec.ike",
594 ],
Anton Hansson867f94c2021-05-05 10:32:31 +0100595 defaults_visibility: ["//visibility:private"],
Anton Hansson867f94c2021-05-05 10:32:31 +0100596}
597
Jiyong Park0d7e86d2019-12-20 14:35:43 +0900598build = [
599 "StubLibraries.bp",
600 "ApiDocs.bp",
Anton Hansson31fb58b2021-04-12 18:03:12 +0100601 "ProtoLibraries.bp",
Harry Zhangd61699e2021-06-01 16:48:25 -0700602 "TestProtoLibraries.bp",
Jiyong Park0d7e86d2019-12-20 14:35:43 +0900603]