1// 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
15// 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
28package {
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",
53        "SPDX-license-identifier-MIT",
54        "SPDX-license-identifier-Unicode-DFS",
55        "legacy_unencumbered",
56    ],
57    license_text: [
58        "NOTICE",
59    ],
60}
61
62filegroup {
63    name: "framework-non-updatable-sources",
64    srcs: [
65        // Java/AIDL sources under frameworks/base
66        ":framework-annotations",
67        ":framework-blobstore-sources",
68        ":framework-core-sources",
69        ":framework-drm-sources",
70        ":framework-graphics-nonupdatable-sources",
71        ":framework-jobscheduler-sources", // jobscheduler is not a module for R
72        ":framework-keystore-sources",
73        ":framework-identity-sources",
74        ":framework-location-sources",
75        ":framework-mca-effect-sources",
76        ":framework-mca-filterfw-sources",
77        ":framework-mca-filterpacks-sources",
78        ":framework-media-non-updatable-sources",
79        ":framework-mms-sources",
80        ":framework-omapi-sources",
81        ":framework-opengl-sources",
82        ":framework-rs-sources",
83        ":framework-sax-sources",
84        ":framework-telecomm-sources",
85        ":framework-telephony-common-sources",
86        ":framework-telephony-sources",
87        ":framework-vcn-util-sources",
88        ":framework-wifi-annotations",
89        ":framework-wifi-non-updatable-sources",
90        ":PacProcessor-aidl-sources",
91        ":ProxyHandler-aidl-sources",
92        ":net-utils-framework-common-srcs",
93
94        // AIDL from frameworks/base/native/
95        ":platform-compat-native-aidl",
96
97        // AIDL sources from external directories
98        ":android.hardware.biometrics.common-V3-java-source",
99        ":android.hardware.biometrics.fingerprint-V3-java-source",
100        ":android.hardware.gnss-V2-java-source",
101        ":android.hardware.graphics.common-V3-java-source",
102        ":android.hardware.keymaster-V4-java-source",
103        ":android.hardware.security.keymint-V3-java-source",
104        ":android.hardware.security.secureclock-V1-java-source",
105        ":android.hardware.thermal-V1-java-source",
106        ":android.hardware.tv.tuner-V2-java-source",
107        ":android.security.apc-java-source",
108        ":android.security.authorization-java-source",
109        ":android.security.legacykeystore-java-source",
110        ":android.security.maintenance-java-source",
111        ":android.security.metrics-java-source",
112        ":android.system.keystore2-V3-java-source",
113        ":android.hardware.cas-V1-java-source",
114        ":credstore_aidl",
115        ":dumpstate_aidl",
116        ":framework_native_aidl",
117        ":gatekeeper_aidl",
118        ":gsiservice_aidl",
119        ":guiconstants_aidl",
120        ":idmap2_aidl",
121        ":idmap2_core_aidl",
122        ":incidentcompanion_aidl",
123        ":inputconstants_aidl",
124        ":installd_aidl",
125        ":libaudioclient_aidl",
126        ":libbinder_aidl",
127        ":libcamera_client_aidl",
128        ":libcamera_client_framework_aidl",
129        ":libupdate_engine_aidl",
130        ":logd_aidl",
131        ":resourcemanager_aidl",
132        ":storaged_aidl",
133        ":vold_aidl",
134        ":deviceproductinfoconstants_aidl",
135
136        // For the generated R.java and Manifest.java
137        ":framework-res{.aapt.srcjar}",
138
139        // etc.
140        ":framework-javastream-protos",
141        ":statslog-framework-java-gen", // FrameworkStatsLog.java
142        ":audio_policy_configuration_V7_0",
143    ],
144}
145
146java_library {
147    name: "framework-all",
148    installable: false,
149    static_libs: [
150        "all-framework-module-impl",
151        "framework-minus-apex",
152    ],
153    apex_available: ["//apex_available:platform"],
154    sdk_version: "core_platform",
155    visibility: [
156        // DO NOT ADD ANY MORE ENTRIES TO THIS LIST
157        "//external/robolectric-shadows:__subpackages__",
158        //This will eventually replace the item above, and serves the
159        //same purpose.
160        "//external/robolectric:__subpackages__",
161        "//frameworks/layoutlib:__subpackages__",
162    ],
163}
164
165// AIDL files under these paths are mixture of public and private ones.
166// They shouldn't be exported across module boundaries.
167java_defaults {
168    name: "framework-aidl-export-defaults",
169    aidl: {
170        export_include_dirs: [
171            "core/java",
172            "drm/java",
173            "graphics/java",
174            "identity/java",
175            "keystore/java",
176            "location/java",
177            "media/java",
178            "media/mca/effect/java",
179            "media/mca/filterfw/java",
180            "media/mca/filterpacks/java",
181            "mms/java",
182            "opengl/java",
183            "rs/java",
184            "sax/java",
185            "telecomm/java",
186
187            // TODO(b/147699819): remove this
188            "telephony/java",
189        ],
190    },
191}
192
193// Collection of classes that are generated from non-Java files that are not listed in
194// framework_srcs. These have no or very limited dependency to the framework.
195java_library {
196    name: "framework-internal-utils",
197    static_libs: [
198        "apex_aidl_interface-java",
199        "packagemanager_aidl-java",
200        "framework-protos",
201        "updatable-driver-protos",
202        "ota_metadata_proto_java",
203        "android.hidl.base-V1.0-java",
204        "android.hardware.cas-V1-java", // AIDL
205        "android.hardware.cas-V1.0-java",
206        "android.hardware.cas-V1.1-java",
207        "android.hardware.cas-V1.2-java",
208        "android.hardware.contexthub-V1.0-java",
209        "android.hardware.contexthub-V1.1-java",
210        "android.hardware.contexthub-V1.2-java",
211        "android.hardware.contexthub-V2-java",
212        "android.hardware.gnss-V1.0-java",
213        "android.hardware.gnss-V2.1-java",
214        "android.hardware.health-V1.0-java-constants",
215        "android.hardware.radio-V1.0-java",
216        "android.hardware.radio-V1.1-java",
217        "android.hardware.radio-V1.2-java",
218        "android.hardware.radio-V1.3-java",
219        "android.hardware.radio-V1.4-java",
220        "android.hardware.radio-V1.5-java",
221        "android.hardware.radio-V1.6-java",
222        "android.hardware.radio.data-V2-java",
223        "android.hardware.radio.ims-V1-java",
224        "android.hardware.radio.messaging-V2-java",
225        "android.hardware.radio.modem-V2-java",
226        "android.hardware.radio.network-V2-java",
227        "android.hardware.radio.sim-V2-java",
228        "android.hardware.radio.voice-V2-java",
229        "android.hardware.thermal-V1.0-java-constants",
230        "android.hardware.thermal-V1.0-java",
231        "android.hardware.thermal-V1.1-java",
232        "android.hardware.thermal-V2.0-java",
233        "android.hardware.tv.input-V1.0-java-constants",
234        "android.hardware.usb-V1.0-java-constants",
235        "android.hardware.usb-V1.1-java-constants",
236        "android.hardware.usb-V1.2-java-constants",
237        "android.hardware.usb.gadget-V1-java",
238        "android.hardware.usb.gadget-V1.0-java",
239        "android.hardware.usb.gadget-V1.1-java",
240        "android.hardware.usb.gadget-V1.2-java",
241        "android.hardware.vibrator-V1.0-java",
242        "android.hardware.vibrator-V1.1-java",
243        "android.hardware.vibrator-V1.2-java",
244        "android.hardware.vibrator-V1.3-java",
245        "android.hardware.vibrator-V2-java",
246        "android.se.omapi-V1-java",
247        "android.system.suspend.control.internal-java",
248        "devicepolicyprotosnano",
249
250        "com.android.sysprop.apex",
251        "com.android.sysprop.init",
252        "com.android.sysprop.localization",
253        "PlatformProperties",
254    ],
255    sdk_version: "core_platform",
256    installable: false,
257}
258
259// NOTE: This filegroup is exposed for vendor libraries to depend on and is referenced in
260// documentation. Do not remove without consulting the treble/hidl teams.
261filegroup {
262    name: "framework-jarjar-rules",
263    srcs: ["framework-jarjar-rules.txt"],
264    visibility: ["//visibility:public"],
265}
266
267java_defaults {
268    name: "framework-minus-apex-defaults",
269    defaults: [
270        "framework-aidl-export-defaults",
271        "latest_android_hardware_soundtrigger3_java_static",
272    ],
273    srcs: [
274        ":framework-non-updatable-sources",
275        "core/java/**/*.logtags",
276        ":apex-info-list",
277    ],
278    aidl: {
279        generate_get_transaction_name: true,
280        enforce_permissions: true,
281        enforce_permissions_exceptions: [
282            // Do not add entries to this list.
283            ":framework-annotations",
284            ":framework-blobstore-sources",
285            ":framework-core-sources",
286            ":framework-drm-sources",
287            ":framework-graphics-nonupdatable-sources",
288            ":framework-jobscheduler-sources",
289            ":framework-keystore-sources",
290            ":framework-identity-sources",
291            ":framework-location-sources",
292            ":framework-mca-effect-sources",
293            ":framework-mca-filterfw-sources",
294            ":framework-mca-filterpacks-sources",
295            ":framework-media-non-updatable-sources",
296            ":framework-mms-sources",
297            ":framework-omapi-sources",
298            ":framework-opengl-sources",
299            ":framework-rs-sources",
300            ":framework-sax-sources",
301            ":framework-telecomm-sources",
302            ":framework-telephony-common-sources",
303            ":framework-telephony-sources",
304            ":framework-vcn-util-sources",
305            ":framework-wifi-annotations",
306            ":framework-wifi-non-updatable-sources",
307            ":PacProcessor-aidl-sources",
308            ":ProxyHandler-aidl-sources",
309            ":net-utils-framework-common-srcs",
310            ":platform-compat-native-aidl",
311            ":credstore_aidl",
312            ":dumpstate_aidl",
313            ":framework_native_aidl",
314            ":gatekeeper_aidl",
315            ":gsiservice_aidl",
316            ":idmap2_aidl",
317            ":idmap2_core_aidl",
318            ":incidentcompanion_aidl",
319            ":inputconstants_aidl",
320            ":installd_aidl",
321            ":libaudioclient_aidl",
322            ":libbinder_aidl",
323            ":libbluetooth-binder-aidl",
324            ":libcamera_client_aidl",
325            ":libcamera_client_framework_aidl",
326            ":libupdate_engine_aidl",
327            ":logd_aidl",
328            ":resourcemanager_aidl",
329            ":storaged_aidl",
330            ":vold_aidl",
331            ":deviceproductinfoconstants_aidl",
332        ],
333        local_include_dirs: [
334            "media/aidl",
335        ],
336        include_dirs: [
337            "frameworks/av/aidl",
338            "frameworks/native/libs/permission/aidl",
339            "packages/modules/Bluetooth/framework/aidl-export",
340            "packages/modules/Connectivity/framework/aidl-export",
341            "packages/modules/Media/apex/aidl/stable",
342            "hardware/interfaces/biometrics/common/aidl",
343            "hardware/interfaces/biometrics/fingerprint/aidl",
344            "hardware/interfaces/graphics/common/aidl",
345            "hardware/interfaces/keymaster/aidl",
346            "system/hardware/interfaces/media/aidl",
347        ],
348    },
349    dxflags: [
350        "--core-library",
351        "--multi-dex",
352    ],
353    jarjar_rules: ":framework-jarjar-rules",
354    javac_shard_size: 150,
355    plugins: [
356        "view-inspector-annotation-processor",
357        "staledataclass-annotation-processor",
358        "error_prone_android_framework",
359    ],
360    // Exports needed for staledataclass-annotation-processor, see b/139342589.
361    javacflags: [
362        "-J--add-modules=jdk.compiler",
363        "-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
364        "-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED",
365        "-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
366        "-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
367    ],
368    required: [
369        // TODO(b/120066492): remove default_television.xml when the build system
370        // propagates "required" properly.
371        "default_television.xml",
372        "framework-platform-compat-config",
373        // TODO(b/120066492): remove gps_debug and protolog.conf.json when the build
374        // system propagates "required" properly.
375        "gps_debug.conf",
376        "icu4j-platform-compat-config",
377        "protolog.conf.json.gz",
378        "services-platform-compat-config",
379        "TeleService-platform-compat-config",
380        "documents-ui-compat-config",
381        "calendar-provider-compat-config",
382        "contacts-provider-platform-compat-config",
383    ],
384    libs: [
385        "androidx.annotation_annotation",
386        "app-compat-annotations",
387        "ext",
388        "framework-updatable-stubs-module_libs_api",
389        "unsupportedappusage",
390    ],
391    sdk_version: "core_platform",
392    static_libs: [
393        "android.hardware.common.fmq-V1-java",
394        "bouncycastle-repackaged-unbundled",
395        "framework-internal-utils",
396        // If MimeMap ever becomes its own APEX, then this dependency would need to be removed
397        // in favor of an API stubs dependency in java_library "framework" below.
398        "mimemap",
399        "av-types-aidl-java",
400        "tv_tuner_resource_manager_aidl_interface-java",
401        "soundtrigger_middleware-aidl-java",
402        "modules-utils-binary-xml",
403        "modules-utils-build",
404        "modules-utils-preconditions",
405        "modules-utils-statemachine",
406        "modules-utils-synchronous-result-receiver",
407        "modules-utils-os",
408        "modules-utils-uieventlogger-interface",
409        "framework-permission-aidl-java",
410        "spatializer-aidl-java",
411        "audiopolicy-aidl-java",
412        "sounddose-aidl-java",
413        "modules-utils-expresslog",
414    ],
415}
416
417java_library {
418    name: "framework-minus-apex",
419    defaults: ["framework-minus-apex-defaults"],
420    installable: true,
421    // For backwards compatibility.
422    stem: "framework",
423    apex_available: ["//apex_available:platform"],
424    visibility: [
425        "//frameworks/base",
426        // TODO(b/147128803) remove the below lines
427        "//frameworks/base/apex/blobstore/framework",
428        "//frameworks/base/apex/jobscheduler/framework",
429        "//frameworks/base/packages/Tethering/tests/unit",
430        "//packages/modules/Connectivity/Tethering/tests/unit",
431    ],
432    lint: {
433        extra_check_modules: ["AndroidFrameworkLintChecker"],
434        disabled_checks: ["ApiMightLeakAppVisibility"],
435        error_checks: [
436            "ClearIdentityCallNotFollowedByTryFinally",
437            "NestedClearCallingIdentityCalls",
438            "NonFinalTokenOfOriginalCallingIdentity",
439            "RestoreIdentityCallNotInFinallyBlock",
440            "ResultOfClearIdentityCallNotStoredInVariable",
441            "UnusedTokenOfOriginalCallingIdentity",
442            "UseOfCallerAwareMethodsWithClearedIdentity",
443        ],
444    },
445    errorprone: {
446        javacflags: [
447            "-Xep:AndroidFrameworkCompatChange:ERROR",
448            "-Xep:AndroidFrameworkUid:ERROR",
449        ],
450    },
451}
452
453java_library {
454    name: "framework-minus-apex-intdefs",
455    defaults: ["framework-minus-apex-defaults"],
456    plugins: ["intdef-annotation-processor"],
457
458    // Errorprone and android lint will already run on framework-minus-apex, don't rerun them on
459    // the intdefs version in order to speed up the build.
460    errorprone: {
461        enabled: false,
462    },
463    lint: {
464        enabled: false,
465    },
466}
467
468// This "framework" module is NOT installed to the device. It's
469// "framework-minus-apex" that gets installed to the device. Note that
470// the filename is still framework.jar (via the stem property) for
471// compatibility reason. The purpose of this module is to provide
472// framework APIs (both public and private) for bundled apps.
473// "framework-minus-apex" can't be used for the purpose because 1)
474// many apps have already hardcoded the name "framework" and
475// 2) it lacks API symbols from updatable modules - as it's clear from
476// its suffix "-minus-apex".
477java_library {
478    name: "framework",
479    defaults: ["framework-aidl-export-defaults"],
480    installable: false, // this lib is a build-only library
481    static_libs: [
482        "app-compat-annotations",
483        "framework-minus-apex",
484        "framework-updatable-stubs-module_libs_api",
485    ],
486    sdk_version: "core_platform",
487    apex_available: ["//apex_available:platform"],
488}
489
490platform_compat_config {
491    name: "framework-platform-compat-config",
492    src: ":framework-minus-apex",
493}
494
495filegroup {
496    name: "framework-ike-shared-srcs",
497    visibility: ["//packages/modules/IPsec"],
498    srcs: [
499        "core/java/com/android/internal/util/HexDump.java",
500        "core/java/com/android/internal/util/WakeupMessage.java",
501        "services/core/java/com/android/server/vcn/util/PersistableBundleUtils.java",
502        "telephony/java/android/telephony/Annotation.java",
503    ],
504}
505
506filegroup {
507    name: "framework-networkstack-shared-srcs",
508    srcs: [
509        // TODO: remove these annotations as soon as we can use andoid.support.annotations.*
510        ":framework-annotations",
511        ":modules-utils-preconditions-srcs",
512        "core/java/android/util/IndentingPrintWriter.java",
513        "core/java/android/util/LocalLog.java",
514        "core/java/com/android/internal/util/HexDump.java",
515        "core/java/com/android/internal/util/IndentingPrintWriter.java",
516        "core/java/com/android/internal/util/MessageUtils.java",
517        "core/java/com/android/internal/util/RingBufferIndices.java",
518        "core/java/com/android/internal/util/WakeupMessage.java",
519        "core/java/com/android/internal/util/TokenBucket.java",
520    ],
521}
522
523// Build ext.jar
524// ============================================================
525java_library {
526    name: "ext",
527    installable: true,
528    sdk_version: "core_platform",
529    static_libs: [
530        "libphonenumber-platform",
531        "tagsoup",
532        "rappor",
533    ],
534    dxflags: ["--core-library"],
535}
536
537// utility classes statically linked into framework-wifi and dynamically linked
538// into wifi-service
539java_library {
540    name: "framework-wifi-util-lib",
541    sdk_version: "module_current",
542    min_sdk_version: "30",
543    srcs: [
544        "core/java/com/android/internal/util/AsyncChannel.java",
545        "core/java/com/android/internal/util/AsyncService.java",
546        "core/java/com/android/internal/util/Protocol.java",
547        "telephony/java/android/telephony/Annotation.java",
548        ":net-utils-framework-wifi-common-srcs",
549    ],
550    libs: [
551        "framework-annotations-lib",
552        "framework-connectivity.stubs.module_lib",
553        "unsupportedappusage",
554    ],
555    visibility: [
556        "//frameworks/base/wifi",
557        "//frameworks/base/services/net",
558        "//packages/modules/Wifi/framework",
559    ],
560}
561
562// TODO(b/145644363): move this to under StubLibraries.bp or ApiDocs.bp
563metalava_framework_docs_args = "" +
564    "--api-lint-ignore-prefix android.icu. " +
565    "--api-lint-ignore-prefix java. " +
566    "--api-lint-ignore-prefix junit. " +
567    "--api-lint-ignore-prefix org. " +
568    "--error NoSettingsProvider " +
569    "--error UnhiddenSystemApi " +
570    "--force-convert-to-warning-nullability-annotations +*:-android.*:+android.icu.*:-dalvik.* " +
571    "--hide BroadcastBehavior " +
572    "--hide CallbackInterface " +
573    "--hide DeprecationMismatch " +
574    "--hide HiddenSuperclass " +
575    "--hide HiddenTypeParameter " +
576    "--hide MissingPermission " +
577    "--hide-package android.audio.policy.configuration.V7_0 " +
578    "--hide-package com.android.server " +
579    "--hide RequiresPermission " +
580    "--hide SdkConstant " +
581    "--hide Todo " +
582    "--hide Typo " +
583    "--hide UnavailableSymbol " +
584    "--manifest $(location :frameworks-base-core-AndroidManifest.xml) "
585
586packages_to_document = [
587    "android",
588    "dalvik",
589    "java",
590    "javax",
591    "junit",
592    "org.apache.http",
593    "org.json",
594    "org.w3c.dom",
595    "org.xml.sax",
596    "org.xmlpull",
597]
598
599filegroup {
600    name: "android-non-updatable-stub-sources",
601    srcs: [
602        ":framework-mime-sources", // mimemap builds separately but has no separate droidstubs.
603        ":framework-non-updatable-sources",
604        ":opt-telephony-srcs",
605        ":opt-net-voip-srcs",
606        "core/java/**/*.logtags",
607        "**/package.html",
608    ],
609    visibility: ["//frameworks/base/api"],
610}
611
612// Defaults for all stubs that include the non-updatable framework. These defaults do not include
613// module symbols, so will not compile correctly on their own. Users must add module APIs to the
614// classpath (or sources) somehow.
615stubs_defaults {
616    name: "android-non-updatable-stubs-defaults",
617    srcs: [":android-non-updatable-stub-sources"],
618    sdk_version: "none",
619    system_modules: "none",
620    java_version: "1.8",
621    arg_files: [":frameworks-base-core-AndroidManifest.xml"],
622    aidl: {
623        include_dirs: [
624            "frameworks/av/aidl",
625            "frameworks/base/media/aidl",
626            "frameworks/base/telephony/java",
627            "frameworks/native/libs/permission/aidl",
628            "packages/modules/Bluetooth/framework/aidl-export",
629            "packages/modules/Connectivity/framework/aidl-export",
630            "packages/modules/Media/apex/aidl/stable",
631            "hardware/interfaces/biometrics/common/aidl",
632            "hardware/interfaces/biometrics/fingerprint/aidl",
633            "hardware/interfaces/graphics/common/aidl",
634            "hardware/interfaces/keymaster/aidl",
635            "system/hardware/interfaces/media/aidl",
636        ],
637    },
638    // These are libs from framework-internal-utils that are required (i.e. being referenced)
639    // from framework-non-updatable-sources. Add more here when there's a need.
640    // DO NOT add the entire framework-internal-utils. It might cause unnecessary circular
641    // dependencies gets bigger.
642    libs: [
643        "android.hardware.cas-V1.2-java",
644        "android.hardware.health-V1.0-java-constants",
645        "android.hardware.radio-V1.5-java",
646        "android.hardware.radio-V1.6-java",
647        "android.hardware.thermal-V1.0-java-constants",
648        "android.hardware.thermal-V2.0-java",
649        "android.hardware.tv.input-V1.0-java-constants",
650        "android.hardware.usb-V1.0-java-constants",
651        "android.hardware.usb-V1.1-java-constants",
652        "android.hardware.usb.gadget-V1.0-java",
653        "android.hardware.vibrator-V1.3-java",
654        "framework-protos",
655    ],
656    filter_packages: packages_to_document,
657    high_mem: true, // Lots of sources => high memory use, see b/170701554
658    installable: false,
659    annotations_enabled: true,
660    previous_api: ":android.api.public.latest",
661    merge_annotations_dirs: ["metalava-manual"],
662    defaults_visibility: ["//frameworks/base/api"],
663    visibility: ["//frameworks/base/api"],
664}
665
666// Defaults with module APIs in the classpath (mostly from prebuilts).
667// Suitable for compiling android-non-updatable.
668stubs_defaults {
669    name: "module-classpath-stubs-defaults",
670    aidl: {
671        include_dirs: [
672            "packages/modules/Bluetooth/framework/aidl-export",
673            "packages/modules/Connectivity/framework/aidl-export",
674            "packages/modules/Media/apex/aidl/stable",
675        ],
676    },
677    libs: [
678        "art.module.public.api",
679        "sdk_module-lib_current_framework-tethering",
680        "sdk_module-lib_current_framework-connectivity-t",
681        "sdk_public_current_framework-bluetooth",
682        // There are a few classes from modules used by the core that
683        // need to be resolved by metalava. We use a prebuilt stub of the
684        // full sdk to ensure we can resolve them. If a new class gets added,
685        // the prebuilts/sdk/current needs to be updated.
686        "sdk_system_current_android",
687        // NOTE: The below can be removed once the prebuilt stub contains IKE.
688        "sdk_system_current_android.net.ipsec.ike",
689    ],
690}
691
692build = [
693    "ProtoLibraries.bp",
694    "TestProtoLibraries.bp",
695]
696