| // Copyright (C) 2016 The Android Open Source Project |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| // Build the master framework library. |
| |
| // READ ME: ######################################################## |
| // |
| // When updating this list of aidl files, consider if that aidl is |
| // part of the SDK API. If it is, also add it to the list in Android.mk |
| // that is preprocessed and distributed with the SDK. This list should |
| // not contain any aidl files for parcelables, but the one below should |
| // if you intend for 3rd parties to be able to send those objects |
| // across process boundaries. |
| // |
| // READ ME: ######################################################## |
| |
| filegroup { |
| name: "framework-core-sources", |
| srcs: [ |
| "core/java/**/*.java", |
| "core/java/**/*.aidl", |
| ], |
| path: "core/java", |
| } |
| |
| // These are subset of framework-core-sources that are needed by the |
| // android.test.mock library. Ideally, the library should use public APIs only, |
| // but unfortunately its API signature has some references to these private APIs. |
| filegroup { |
| name: "framework-core-sources-for-test-mock", |
| srcs: [ |
| "core/java/android/app/IApplicationThread.aidl", |
| "core/java/android/app/IServiceConnection.aidl", |
| "core/java/android/content/IContentProvider.java", |
| "core/java/android/content/pm/IPackageDataObserver.aidl", |
| "core/java/android/content/pm/InstantAppInfo.java", |
| "core/java/android/content/pm/KeySet.java", |
| "core/java/android/content/pm/PackageManager.java", |
| "core/java/android/content/pm/VerifierDeviceIdentity.java", |
| "core/java/android/content/res/Resources.java", |
| "core/java/android/os/storage/VolumeInfo.java", |
| "core/java/android/view/DisplayAdjustments.java", |
| ], |
| path: "core/java", |
| visibility: ["//frameworks/base/test-mock"], |
| } |
| |
| filegroup { |
| name: "framework-drm-sources", |
| srcs: [ |
| "drm/java/**/*.java", |
| ], |
| path: "drm/java", |
| } |
| |
| filegroup { |
| name: "framework-graphics-sources", |
| srcs: [ |
| "graphics/java/**/*.java", |
| "graphics/java/**/*.aidl", |
| ], |
| path: "graphics/java", |
| } |
| |
| filegroup { |
| name: "framework-identity-sources", |
| srcs: [ |
| "identity/java/**/*.java", |
| ], |
| path: "identity/java", |
| } |
| |
| filegroup { |
| name: "framework-keystore-sources", |
| srcs: [ |
| "keystore/java/**/*.java", |
| "keystore/java/**/*.aidl", |
| ], |
| path: "keystore/java", |
| } |
| |
| filegroup { |
| name: "framework-location-sources", |
| srcs: [ |
| "location/java/**/*.java", |
| "location/java/**/*.aidl", |
| ], |
| path: "location/java", |
| } |
| |
| filegroup { |
| name: "framework-lowpan-sources", |
| srcs: [ |
| "lowpan/java/**/*.java", |
| "lowpan/java/**/*.aidl", |
| ], |
| path: "lowpan/java", |
| } |
| |
| filegroup { |
| name: "framework-media-sources", |
| srcs: [ |
| "media/java/**/*.java", |
| "media/java/**/*.aidl", |
| ], |
| path: "media/java", |
| } |
| |
| filegroup { |
| name: "framework-mca-effect-sources", |
| srcs: [ |
| "media/mca/effect/java/**/*.java", |
| ], |
| path: "media/mca/effect/java", |
| } |
| |
| filegroup { |
| name: "framework-mca-filterfw-sources", |
| srcs: [ |
| "media/mca/filterfw/java/**/*.java", |
| ], |
| path: "media/mca/filterfw/java", |
| } |
| |
| filegroup { |
| name: "framework-mca-filterpacks-sources", |
| srcs: [ |
| "media/mca/filterpacks/java/**/*.java", |
| ], |
| path: "media/mca/filterpacks/java", |
| } |
| |
| filegroup { |
| name: "framework-mime-sources", |
| srcs: [ |
| "mime/java/**/*.java", |
| ], |
| path: "mime/java", |
| } |
| |
| filegroup { |
| name: "framework-opengl-sources", |
| srcs: [ |
| "opengl/java/**/*.java", |
| ], |
| path: "opengl/java", |
| } |
| |
| filegroup { |
| name: "framework-rs-sources", |
| srcs: [ |
| "rs/java/**/*.java", |
| ], |
| path: "rs/java", |
| } |
| |
| filegroup { |
| name: "framework-sax-sources", |
| srcs: [ |
| "sax/java/**/*.java", |
| ], |
| path: "sax/java", |
| } |
| |
| filegroup { |
| name: "framework-telecomm-sources", |
| srcs: [ |
| "telecomm/java/**/*.java", |
| "telecomm/java/**/*.aidl", |
| ], |
| path: "telecomm/java", |
| } |
| |
| filegroup { |
| name: "framework-telephony-sources", |
| srcs: [ |
| "telephony/java/**/*.java", |
| "telephony/java/**/*.aidl", |
| ], |
| path: "telephony/java", |
| } |
| |
| filegroup { |
| name: "framework-telephony-common-sources", |
| srcs: [ |
| "telephony/common/**/*.java", |
| ], |
| path: "telephony/common", |
| } |
| |
| filegroup { |
| name: "framework-mms-sources", |
| srcs: [ |
| "mms/java/**/*.java", |
| "mms/java/**/*.aidl", |
| ], |
| path: "mms/java", |
| } |
| |
| filegroup { |
| name: "framework-non-updatable-sources", |
| srcs: [ |
| // Java/AIDL sources under frameworks/base |
| ":framework-blobstore-sources", |
| ":framework-core-sources", |
| ":framework-drm-sources", |
| ":framework-graphics-sources", |
| ":framework-jobscheduler-sources", // jobscheduler is not a module for R |
| ":framework-keystore-sources", |
| ":framework-identity-sources", |
| ":framework-location-sources", |
| ":framework-lowpan-sources", |
| ":framework-mca-effect-sources", |
| ":framework-mca-filterfw-sources", |
| ":framework-mca-filterpacks-sources", |
| ":framework-media-sources", |
| ":framework-mms-sources", |
| ":framework-opengl-sources", |
| ":framework-rs-sources", |
| ":framework-sax-sources", |
| ":framework-telecomm-sources", |
| ":framework-telephony-common-sources", |
| ":framework-wifi-annotations", |
| ":framework-wifi-non-updatable-sources", |
| ":PacProcessor-aidl-sources", |
| ":ProxyHandler-aidl-sources", |
| ":net-utils-framework-common-srcs", |
| |
| // AIDL from frameworks/base/native/ |
| ":platform-compat-native-aidl", |
| |
| // AIDL sources from external directories |
| ":credstore_aidl", |
| ":dumpstate_aidl", |
| ":framework_native_aidl", |
| ":gatekeeper_aidl", |
| ":gsiservice_aidl", |
| ":incidentcompanion_aidl", |
| ":installd_aidl", |
| ":keystore_aidl", |
| ":libaudioclient_aidl", |
| ":libbinder_aidl", |
| ":libbluetooth-binder-aidl", |
| ":libcamera_client_aidl", |
| ":libcamera_client_framework_aidl", |
| ":libupdate_engine_aidl", |
| // TODO: this needs to be removed when statsd-framework.jar is separated out |
| ":statsd_java_aidl", |
| ":storaged_aidl", |
| ":vold_aidl", |
| |
| // For the generated R.java and Manifest.java |
| ":framework-res{.aapt.srcjar}", |
| |
| // etc. |
| ":framework-javastream-protos", |
| ":framework-statslog-gen", |
| |
| // telephony annotations |
| ":framework-telephony-annotations", |
| ], |
| } |
| |
| filegroup { |
| name: "framework-updatable-sources", |
| srcs: [ |
| ":framework-appsearch-sources", |
| ":framework-sdkextensions-sources", |
| ":framework-statsd-sources", |
| ":framework-tethering-srcs", |
| ":updatable-media-srcs", |
| ":framework-mediaprovider-sources", |
| ":framework-permission-sources", |
| ":framework-wifi-updatable-sources", |
| ":framework-telephony-sources", |
| ":ike-srcs", |
| ] |
| } |
| |
| filegroup { |
| name: "framework-all-sources", |
| srcs: [ |
| ":framework-mime-sources", |
| ":framework-non-updatable-sources", |
| ":framework-updatable-sources", |
| ], |
| } |
| |
| java_defaults { |
| name: "framework-aidl-export-defaults", |
| aidl: { |
| export_include_dirs: [ |
| "apex/media/framework/java", |
| "core/java", |
| "drm/java", |
| "graphics/java", |
| "identity/java", |
| "keystore/java", |
| "location/java", |
| "lowpan/java", |
| "media/java", |
| "media/mca/effect/java", |
| "media/mca/filterfw/java", |
| "media/mca/filterpacks/java", |
| "mms/java", |
| "opengl/java", |
| "rs/java", |
| "sax/java", |
| "telecomm/java", |
| "wifi/aidl-export", |
| ], |
| }, |
| |
| required: [ |
| // TODO: remove gps_debug and protolog.conf.json when the build system propagates "required" properly. |
| "gps_debug.conf", |
| "protolog.conf.json.gz", |
| ], |
| } |
| |
| // Collection of classes that are generated from non-Java files that are not listed in |
| // framework_srcs. These have no or very limited dependency to the framework. |
| java_library { |
| name: "framework-internal-utils", |
| static_libs: [ |
| "apex_aidl_interface-java", |
| "suspend_control_aidl_interface-java", |
| "framework-protos", |
| "game-driver-protos", |
| "android.hidl.base-V1.0-java", |
| "android.hardware.cas-V1.0-java", |
| "android.hardware.cas-V1.1-java", |
| "android.hardware.cas-V1.2-java", |
| "android.hardware.contexthub-V1.0-java", |
| "android.hardware.gnss-V1.0-java", |
| "android.hardware.health-V1.0-java-constants", |
| "android.hardware.radio-V1.0-java", |
| "android.hardware.radio-V1.1-java", |
| "android.hardware.radio-V1.2-java", |
| "android.hardware.radio-V1.3-java", |
| "android.hardware.radio-V1.4-java", |
| "android.hardware.radio-V1.5-java", |
| "android.hardware.thermal-V1.0-java-constants", |
| "android.hardware.thermal-V1.0-java", |
| "android.hardware.thermal-V1.1-java", |
| "android.hardware.thermal-V2.0-java", |
| "android.hardware.tv.input-V1.0-java-constants", |
| "android.hardware.tv.tuner-V1.0-java-constants", |
| "android.hardware.usb-V1.0-java-constants", |
| "android.hardware.usb-V1.1-java-constants", |
| "android.hardware.usb-V1.2-java-constants", |
| "android.hardware.usb.gadget-V1.0-java", |
| "android.hardware.vibrator-V1.0-java", |
| "android.hardware.vibrator-V1.1-java", |
| "android.hardware.vibrator-V1.2-java", |
| "android.hardware.vibrator-V1.3-java", |
| "devicepolicyprotosnano", |
| |
| "com.android.sysprop.apex", |
| "PlatformProperties", |
| ], |
| sdk_version: "core_platform", |
| installable: false, |
| } |
| |
| java_defaults { |
| name: "framework-defaults", |
| defaults: ["framework-aidl-export-defaults"], |
| installable: true, |
| |
| aidl: { |
| generate_get_transaction_name: true, |
| }, |
| |
| srcs: ["core/java/**/*.logtags"], |
| |
| exclude_srcs: [ |
| // See comment on framework-atb-backward-compatibility module below |
| "core/java/android/content/pm/parsing/library/AndroidTestBaseUpdater.java", |
| ], |
| |
| sdk_version: "core_platform", |
| libs: [ |
| "app-compat-annotations", |
| "ext", |
| "unsupportedappusage", |
| "updatable_media_stubs", |
| "framework_mediaprovider_stubs", |
| "framework-tethering", |
| "framework-telephony-stubs", |
| ], |
| |
| jarjar_rules: ":framework-jarjar-rules", |
| |
| static_libs: [ |
| "framework-internal-utils", |
| ], |
| |
| dxflags: [ |
| "--core-library", |
| "--multi-dex", |
| ], |
| |
| plugins: [ |
| "view-inspector-annotation-processor", |
| "staledataclass-annotation-processor", |
| ], |
| } |
| |
| filegroup { |
| name: "framework-jarjar-rules", |
| srcs: ["framework-jarjar-rules.txt"], |
| } |
| |
| filegroup { |
| name: "libincident_aidl", |
| srcs: [ |
| "core/java/android/os/IIncidentDumpCallback.aidl", |
| "core/java/android/os/IIncidentManager.aidl", |
| "core/java/android/os/IIncidentReportStatusListener.aidl", |
| ], |
| path: "core/java", |
| } |
| |
| filegroup { |
| name: "graphicsstats_proto", |
| srcs: [ |
| "libs/hwui/protos/graphicsstats.proto", |
| ], |
| } |
| |
| filegroup { |
| name: "libvibrator_aidl", |
| srcs: [ |
| "core/java/android/os/IExternalVibrationController.aidl", |
| "core/java/android/os/IExternalVibratorService.aidl", |
| ], |
| path: "core/java", |
| } |
| |
| java_library { |
| name: "framework-minus-apex", |
| defaults: ["framework-defaults"], |
| srcs: [":framework-non-updatable-sources"], |
| libs: [ |
| "framework-appsearch-stubs", |
| "framework-sdkextensions-stubs-systemapi", |
| "framework-statsd", // TODO(b/146167933): Use framework-statsd-stubs |
| "framework-permission-stubs", |
| "framework-wifi-stubs", |
| "ike-stubs", |
| ], |
| installable: true, |
| javac_shard_size: 150, |
| required: [ |
| "framework-platform-compat-config", |
| "libcore-platform-compat-config", |
| "services-platform-compat-config", |
| "media-provider-platform-compat-config", |
| ], |
| static_libs: [ |
| // If MimeMap ever becomes its own APEX, then this dependency would need to be removed |
| // in favor of an API stubs dependency in java_library "framework" below. |
| "mimemap", |
| ], |
| // For backwards compatibility. |
| stem: "framework", |
| apex_available: ["//apex_available:platform"], |
| visibility: [ |
| "//frameworks/base", |
| // TODO(b/144149403) remove the below lines |
| "//frameworks/base/apex/appsearch/framework", |
| "//frameworks/base/apex/blobstore/framework", |
| "//frameworks/base/apex/jobscheduler/framework", |
| "//frameworks/base/apex/permission/framework", |
| "//frameworks/base/apex/statsd/service", |
| "//frameworks/base/telephony", |
| "//frameworks/opt/net/wifi/service", |
| ], |
| } |
| |
| // This "framework" module is NOT installed to the device. It's |
| // "framework-minus-apex" that gets installed to the device. Note that |
| // the filename is still framework.jar (via the stem property) for |
| // compatibility reason. The purpose of this module is to provide |
| // framework APIs (both public and private) for bundled apps. |
| // "framework-minus-apex" can't be used for the purpose because 1) |
| // many apps have already hardcoded the name "framework" and |
| // 2) it lacks API symbols from updatable modules - as it's clear from |
| // its suffix "-minus-apex". |
| java_library { |
| name: "framework", |
| defaults: ["framework-aidl-export-defaults"], |
| installable: false, // this lib is a build-only library |
| static_libs: [ |
| "framework-minus-apex", |
| "updatable_media_stubs", |
| "framework_mediaprovider_stubs", |
| "framework-appsearch", // TODO(b/146218515): should be framework-appsearch-stubs |
| "framework-permission-stubs", |
| "framework-sdkextensions-stubs-systemapi", |
| // TODO(b/146167933): Use framework-statsd-stubs instead. |
| "framework-statsd", |
| "framework-wifi-stubs", |
| "ike-stubs", |
| // TODO(b/147200698): should be the stub of framework-tethering |
| "framework-tethering", |
| // TODO (b/147688669) should be framework-telephony-stubs |
| "framework-telephony", |
| // TODO(jiyong): add stubs for APEXes here |
| ], |
| sdk_version: "core_platform", |
| apex_available: ["//apex_available:platform"], |
| } |
| |
| java_library { |
| name: "framework-all", |
| defaults: ["framework-defaults"], |
| srcs: [":framework-all-sources"], |
| installable: false, |
| static_libs: [ |
| "exoplayer2-core", |
| "android.hardware.wifi-V1.0-java-constants", |
| ], |
| libs: ["icing-java-proto-lite"], |
| apex_available: ["//apex_available:platform"], |
| } |
| |
| java_library { |
| name: "framework-annotation-proc", |
| defaults: ["framework-aidl-export-defaults"], |
| srcs: [":framework-all-sources"], |
| libs: [ |
| "app-compat-annotations", |
| "unsupportedappusage", |
| ], |
| installable: false, |
| plugins: [ |
| "unsupportedappusage-annotation-processor", |
| "compat-changeid-annotation-processor", |
| ], |
| static_libs: [ |
| "exoplayer2-core", |
| "android.hardware.wifi-V1.0-java-constants", |
| ] |
| } |
| |
| platform_compat_config { |
| name: "framework-platform-compat-config", |
| src: ":framework-annotation-proc", |
| } |
| |
| // A library including just UnsupportedAppUsage.java classes. |
| // |
| // Provided for target so that libraries can use it without depending on |
| // the whole of framework or the core platform API. |
| // |
| // Built for host so that the annotation processor can also use this annotation. |
| java_library { |
| name: "unsupportedappusage-annotation", |
| host_supported: true, |
| srcs: [ |
| "core/java/android/annotation/IntDef.java", |
| "core/java/android/annotation/UnsupportedAppUsage.java", |
| ], |
| static_libs: [ |
| "art.module.api.annotations", |
| ], |
| |
| sdk_version: "core_current", |
| } |
| |
| // A temporary build target that is conditionally included on the bootclasspath if |
| // android.test.base library has been removed and which provides support for |
| // maintaining backwards compatibility for APKs that target pre-P and depend on |
| // android.test.base classes. This is used iff REMOVE_ATB_FROM_BCP=true is |
| // specified on the build command line. |
| java_library { |
| name: "framework-atb-backward-compatibility", |
| installable: true, |
| libs: ["app-compat-annotations"], |
| srcs: [ |
| "core/java/android/content/pm/parsing/library/AndroidTestBaseUpdater.java", |
| ], |
| } |
| |
| genrule { |
| name: "framework-statslog-gen", |
| tools: ["stats-log-api-gen"], |
| cmd: "$(location stats-log-api-gen) --java $(out) --worksource", |
| out: ["android/util/StatsLogInternal.java"], |
| } |
| |
| gensrcs { |
| name: "framework-javastream-protos", |
| depfile: true, |
| |
| tools: [ |
| "aprotoc", |
| "protoc-gen-javastream", |
| "soong_zip", |
| ], |
| |
| cmd: "mkdir -p $(genDir)/$(in) " + |
| "&& $(location aprotoc) " + |
| " --plugin=$(location protoc-gen-javastream) " + |
| " --dependency_out=$(depfile) " + |
| " --javastream_out=$(genDir)/$(in) " + |
| " -Iexternal/protobuf/src " + |
| " -I . " + |
| " $(in) " + |
| "&& $(location soong_zip) -jar -o $(out) -C $(genDir)/$(in) -D $(genDir)/$(in)", |
| |
| srcs: [ |
| "core/proto/**/*.proto", |
| "libs/incident/**/*.proto", |
| ], |
| output_extension: "srcjar", |
| } |
| |
| filegroup { |
| name: "framework-annotations", |
| srcs: [ |
| "core/java/android/annotation/CallbackExecutor.java", |
| "core/java/android/annotation/CheckResult.java", |
| "core/java/android/annotation/IntDef.java", |
| "core/java/android/annotation/IntRange.java", |
| "core/java/android/annotation/NonNull.java", |
| "core/java/android/annotation/Nullable.java", |
| "core/java/android/annotation/RequiresPermission.java", |
| "core/java/android/annotation/SdkConstant.java", |
| "core/java/android/annotation/StringDef.java", |
| "core/java/android/annotation/SystemApi.java", |
| "core/java/android/annotation/SystemService.java", |
| "core/java/android/annotation/TestApi.java", |
| "core/java/android/annotation/UnsupportedAppUsage.java", |
| "core/java/com/android/internal/annotations/GuardedBy.java", |
| "core/java/com/android/internal/annotations/VisibleForTesting.java", |
| "core/java/com/android/internal/annotations/Immutable.java", |
| ], |
| } |
| |
| java_library { |
| name: "framework-annotations-lib", |
| srcs: [ ":framework-annotations" ], |
| sdk_version: "core_current", |
| } |
| |
| filegroup { |
| name: "framework-ike-shared-srcs", |
| visibility: ["//frameworks/opt/net/ike"], |
| srcs: [ |
| "core/java/android/annotation/StringDef.java", |
| "core/java/android/net/annotations/PolicyDirection.java", |
| "core/java/com/android/internal/util/IState.java", |
| "core/java/com/android/internal/util/State.java", |
| "core/java/com/android/internal/util/StateMachine.java", |
| "telephony/java/android/telephony/Annotation.java", |
| ], |
| } |
| |
| filegroup { |
| name: "framework-networkstack-shared-srcs", |
| srcs: [ |
| // TODO: remove these annotations as soon as we can use andoid.support.annotations.* |
| ":framework-annotations", |
| "core/java/android/net/DhcpResults.java", |
| "core/java/android/util/LocalLog.java", |
| "core/java/com/android/internal/util/HexDump.java", |
| "core/java/com/android/internal/util/IndentingPrintWriter.java", |
| "core/java/com/android/internal/util/IState.java", |
| "core/java/com/android/internal/util/MessageUtils.java", |
| "core/java/com/android/internal/util/Preconditions.java", |
| "core/java/com/android/internal/util/RingBufferIndices.java", |
| "core/java/com/android/internal/util/State.java", |
| "core/java/com/android/internal/util/StateMachine.java", |
| "core/java/com/android/internal/util/TrafficStatsConstants.java", |
| "core/java/com/android/internal/util/WakeupMessage.java", |
| "core/java/com/android/internal/util/TokenBucket.java", |
| "core/java/android/net/shared/*.java", |
| ], |
| } |
| |
| // keep these files in sync with the package/Tethering/jarjar-rules.txt for the tethering module. |
| filegroup { |
| name: "framework-tethering-shared-srcs", |
| srcs: [ |
| "core/java/android/util/LocalLog.java", |
| "core/java/com/android/internal/util/IndentingPrintWriter.java", |
| "core/java/com/android/internal/util/IState.java", |
| "core/java/com/android/internal/util/MessageUtils.java", |
| "core/java/com/android/internal/util/Preconditions.java", |
| "core/java/com/android/internal/util/State.java", |
| "core/java/com/android/internal/util/StateMachine.java", |
| "core/java/com/android/internal/util/TrafficStatsConstants.java", |
| "core/java/android/net/shared/Inet4AddressUtils.java", |
| ], |
| } |
| |
| filegroup { |
| name: "framework-tethering-annotations", |
| srcs: [ |
| "core/java/android/annotation/NonNull.java", |
| "core/java/android/annotation/SystemApi.java", |
| ], |
| } |
| // Build ext.jar |
| // ============================================================ |
| java_library { |
| name: "ext", |
| installable: true, |
| sdk_version: "core_platform", |
| static_libs: [ |
| "libphonenumber-platform", |
| "tagsoup", |
| "rappor", |
| "libtextclassifier-java", |
| ], |
| required: [ |
| "libtextclassifier", |
| ], |
| dxflags: ["--core-library"], |
| } |
| |
| // ==== java proto host library ============================== |
| java_library_host { |
| name: "platformprotos", |
| srcs: [ |
| "cmds/am/proto/instrumentation_data.proto", |
| "cmds/statsd/src/**/*.proto", |
| "core/proto/**/*.proto", |
| "libs/incident/proto/**/*.proto", |
| ], |
| proto: { |
| include_dirs: ["external/protobuf/src"], |
| type: "full", |
| }, |
| errorprone: { |
| javacflags: ["-Xep:MissingOverride:OFF"], // b/72714520 |
| }, |
| } |
| |
| // ==== java proto device library (for test only) ============================== |
| java_library { |
| name: "platformprotosnano", |
| proto: { |
| type: "nano", |
| output_params: ["store_unknown_fields=true"], |
| include_dirs: ["external/protobuf/src"], |
| }, |
| exclude_srcs: [ |
| "core/proto/android/privacy.proto", |
| "core/proto/android/section.proto", |
| ], |
| sdk_version: "9", |
| srcs: [ |
| "core/proto/**/*.proto", |
| "libs/incident/proto/android/os/**/*.proto", |
| ], |
| } |
| |
| // ==== java proto device library (for test only) ============================== |
| java_library { |
| name: "platformprotoslite", |
| proto: { |
| type: "lite", |
| include_dirs: ["external/protobuf/src"], |
| }, |
| |
| srcs: [ |
| "core/proto/**/*.proto", |
| "libs/incident/proto/android/os/**/*.proto", |
| ], |
| exclude_srcs: [ |
| "core/proto/android/privacy.proto", |
| "core/proto/android/section.proto", |
| ], |
| sdk_version: "core_current", |
| // Protos have lots of MissingOverride and similar. |
| errorprone: { |
| javacflags: ["-XepDisableAllChecks"], |
| }, |
| } |
| |
| // ==== c++ proto device library ============================== |
| cc_defaults { |
| name: "libplatformprotos-defaults", |
| |
| proto: { |
| export_proto_headers: true, |
| include_dirs: ["external/protobuf/src"], |
| }, |
| |
| cflags: [ |
| "-Wall", |
| "-Werror", |
| "-Wno-unused-parameter", |
| ], |
| |
| srcs: [ |
| "core/proto/**/*.proto", |
| ], |
| } |
| |
| cc_library { |
| name: "libplatformprotos", |
| defaults: ["libplatformprotos-defaults"], |
| host_supported: true, |
| |
| target: { |
| host: { |
| proto: { |
| type: "full", |
| }, |
| }, |
| android: { |
| proto: { |
| type: "lite", |
| }, |
| shared_libs: [ |
| "libprotobuf-cpp-lite", |
| ], |
| shared: { |
| enabled: false, |
| }, |
| }, |
| }, |
| } |
| |
| // This library is meant for vendor code that needs to output protobuf. It links |
| // against the static version of libprotobuf-cpp-lite, for which we can not guarantee |
| // binary compatibility. |
| cc_library { |
| name: "libplatformprotos-static", |
| defaults: ["libplatformprotos-defaults"], |
| host_supported: false, |
| |
| // This is okay because this library is only built as a static library. The C++ |
| // API is not guaranteed. The proto API is guaranteed to be stable via Metrics Council, |
| // but is not authorized to be used outside of debugging. |
| vendor_available: true, |
| |
| target: { |
| android: { |
| proto: { |
| type: "lite", |
| }, |
| static_libs: [ |
| "libprotobuf-cpp-lite", |
| ], |
| shared: { |
| enabled: false, |
| }, |
| }, |
| }, |
| } |
| |
| |
| // This is the full proto version of libplatformprotos. It may only |
| // be used by test code that is not shipped on the device. |
| cc_library { |
| name: "libplatformprotos-test", |
| defaults: ["libplatformprotos-defaults"], |
| host_supported: false, |
| |
| target: { |
| android: { |
| proto: { |
| type: "full", |
| }, |
| shared: { |
| enabled: false, |
| }, |
| }, |
| }, |
| } |
| |
| filegroup { |
| name: "incremental_aidl", |
| srcs: [ |
| "core/java/android/os/incremental/IncrementalFileSystemControlParcel.aidl", |
| ], |
| path: "core/java", |
| } |
| |
| filegroup { |
| name: "dataloader_aidl", |
| srcs: [ |
| "core/java/android/content/pm/DataLoaderParamsParcel.aidl", |
| "core/java/android/content/pm/DataLoaderType.aidl", |
| "core/java/android/content/pm/FileSystemControlParcel.aidl", |
| "core/java/android/content/pm/IDataLoaderStatusListener.aidl", |
| "core/java/android/content/pm/IPackageInstallerSessionFileSystemConnector.aidl", |
| "core/java/android/content/pm/NamedParcelFileDescriptor.aidl", |
| ], |
| path: "core/java", |
| } |
| |
| filegroup { |
| name: "incremental_manager_aidl", |
| srcs: [ |
| "core/java/android/os/incremental/IIncrementalManager.aidl", |
| "core/java/android/os/incremental/IIncrementalManagerNative.aidl", |
| ], |
| path: "core/java", |
| } |
| |
| aidl_interface { |
| name: "libincremental_aidl", |
| srcs: [ |
| ":incremental_aidl", |
| ], |
| backend: { |
| java: { |
| sdk_version: "28", |
| }, |
| cpp: { |
| enabled: true, |
| }, |
| ndk: { |
| enabled: true, |
| }, |
| }, |
| } |
| |
| aidl_interface { |
| name: "libdataloader_aidl", |
| srcs: [ |
| ":dataloader_aidl", |
| ], |
| imports: [ |
| "libincremental_aidl", |
| ], |
| backend: { |
| java: { |
| sdk_version: "28", |
| }, |
| cpp: { |
| enabled: true, |
| }, |
| ndk: { |
| enabled: false, |
| }, |
| }, |
| } |
| |
| aidl_interface { |
| name: "libincremental_manager_aidl", |
| srcs: [ |
| ":incremental_manager_aidl", |
| ], |
| imports: [ |
| "libincremental_aidl", |
| "libdataloader_aidl", |
| ], |
| backend: { |
| java: { |
| sdk_version: "28", |
| }, |
| cpp: { |
| enabled: true, |
| }, |
| ndk: { |
| enabled: false, |
| }, |
| }, |
| } |
| |
| gensrcs { |
| name: "gen-platform-proto-constants", |
| depfile: true, |
| |
| tools: [ |
| "aprotoc", |
| "protoc-gen-cppstream", |
| ], |
| |
| srcs: [ |
| "core/proto/android/os/backtrace.proto", |
| "core/proto/android/os/batterytype.proto", |
| "core/proto/android/os/cpufreq.proto", |
| "core/proto/android/os/cpuinfo.proto", |
| "core/proto/android/os/data.proto", |
| "core/proto/android/os/kernelwake.proto", |
| "core/proto/android/os/pagetypeinfo.proto", |
| "core/proto/android/os/procrank.proto", |
| "core/proto/android/os/ps.proto", |
| "core/proto/android/os/system_properties.proto", |
| "core/proto/android/util/event_log_tags.proto", |
| "core/proto/android/util/log.proto", |
| ], |
| |
| // Append protoc-gen-cppstream tool's PATH otherwise aprotoc can't find the plugin tool |
| cmd: "mkdir -p $(genDir) " + |
| "&& $(location aprotoc) " + |
| " --plugin=$(location protoc-gen-cppstream) " + |
| " --dependency_out=$(depfile) " + |
| " --cppstream_out=$(genDir) " + |
| " -Iexternal/protobuf/src " + |
| " -I . " + |
| " $(in)", |
| |
| output_extension: "proto.h", |
| } |
| |
| |
| subdirs = [ |
| "cmds/*", |
| "core/*", |
| "libs/*", |
| "media/*", |
| "proto", |
| "tools/*", |
| "native/android", |
| "native/graphics/jni", |
| ] |
| |
| optional_subdirs = [ |
| "core/tests/utiltests/jni", |
| ] |
| |
| // TODO(b/77285514): remove this once the last few hidl interfaces have been |
| // updated to use hwbinder.stubs. |
| java_library { |
| name: "hwbinder", |
| sdk_version: "core_platform", |
| |
| srcs: [ |
| "core/java/android/os/HidlSupport.java", |
| "core/java/android/annotation/IntDef.java", |
| "core/java/android/annotation/IntRange.java", |
| "core/java/android/annotation/NonNull.java", |
| "core/java/android/annotation/Nullable.java", |
| "core/java/android/annotation/SystemApi.java", |
| "core/java/android/annotation/TestApi.java", |
| "core/java/android/annotation/UnsupportedAppUsage.java", |
| "core/java/android/os/HidlMemory.java", |
| "core/java/android/os/HwBinder.java", |
| "core/java/android/os/HwBlob.java", |
| "core/java/android/os/HwParcel.java", |
| "core/java/android/os/IHwBinder.java", |
| "core/java/android/os/IHwInterface.java", |
| "core/java/android/os/DeadObjectException.java", |
| "core/java/android/os/DeadSystemException.java", |
| "core/java/android/os/NativeHandle.java", |
| "core/java/android/os/RemoteException.java", |
| "core/java/android/util/AndroidException.java", |
| ], |
| libs: [ "unsupportedappusage" ], |
| |
| dxflags: ["--core-library"], |
| installable: false, |
| } |
| |
| python_defaults { |
| name: "base_default", |
| version: { |
| py2: { |
| enabled: true, |
| embedded_launcher: true, |
| }, |
| py3: { |
| enabled: false, |
| embedded_launcher: false, |
| }, |
| }, |
| } |
| |
| python_binary_host { |
| name: "fontchain_linter", |
| defaults: ["base_default"], |
| main: "tools/fonts/fontchain_linter.py", |
| srcs: [ |
| "tools/fonts/fontchain_linter.py", |
| ], |
| libs: [ |
| "fontTools", |
| ], |
| } |
| |
| filegroup { |
| name: "framework-annotation-nonnull-srcs", |
| srcs: [ |
| "core/java/android/annotation/NonNull.java", |
| ], |
| } |
| |
| filegroup { |
| name: "framework-media-annotation-srcs", |
| srcs: [ |
| ":framework-annotations", |
| "core/java/android/annotation/CallbackExecutor.java", |
| "core/java/android/annotation/CallSuper.java", |
| "core/java/android/annotation/DrawableRes.java", |
| "core/java/android/annotation/LongDef.java", |
| "core/java/android/annotation/StringDef.java", |
| ], |
| } |
| |
| filegroup { |
| name: "framework-mediaprovider-annotation-sources", |
| srcs: [ |
| ":framework-annotations", |
| "core/java/android/annotation/BytesLong.java", |
| "core/java/android/annotation/CurrentTimeMillisLong.java", |
| "core/java/android/annotation/CurrentTimeSecondsLong.java", |
| "core/java/android/annotation/DurationMillisLong.java", |
| ], |
| } |
| |
| // Creates an index of AIDL methods; used for adding UnsupportedAppUsage |
| // annotations to private apis |
| aidl_mapping { |
| name: "framework-aidl-mappings", |
| srcs: [":framework-all-sources"], |
| output: "framework-aidl-mappings.txt", |
| } |
| |
| genrule { |
| name: "framework-annotation-proc-index", |
| srcs: [":framework-annotation-proc"], |
| cmd: "unzip -qp $(in) unsupportedappusage/unsupportedappusage_index.csv > $(out)", |
| out: ["unsupportedappusage_index.csv"], |
| dist: { |
| targets: ["droidcore"], |
| }, |
| } |
| |
| // Avoid including Parcelable classes as we don't want to have two copies of |
| // Parcelable cross the libraries. This is used by telephony-common (frameworks/opt/telephony) |
| // and TeleService app (packages/services/Telephony). |
| filegroup { |
| name: "framework-telephony-common-shared-srcs", |
| srcs: [ |
| "core/java/android/os/BasicShellCommandHandler.java", |
| "core/java/android/os/RegistrantList.java", |
| "core/java/android/os/Registrant.java", |
| "core/java/android/util/LocalLog.java", |
| "core/java/android/util/TimeUtils.java", |
| "core/java/com/android/internal/os/SomeArgs.java", |
| "core/java/com/android/internal/util/AsyncChannel.java", |
| "core/java/com/android/internal/util/AsyncService.java", |
| "core/java/com/android/internal/util/BitwiseInputStream.java", |
| "core/java/com/android/internal/util/FastXmlSerializer.java", |
| "core/java/com/android/internal/util/HexDump.java", |
| "core/java/com/android/internal/util/IState.java", |
| "core/java/com/android/internal/util/IndentingPrintWriter.java", |
| "core/java/com/android/internal/util/Preconditions.java", |
| "core/java/com/android/internal/util/State.java", |
| "core/java/com/android/internal/util/StateMachine.java", |
| "core/java/com/android/internal/util/UserIcons.java", |
| ], |
| } |
| |
| // Avoid including Parcelable classes as we don't want to have two copies of |
| // Parcelable cross the process. This is used by framework-telephony (frameworks/base/telephony). |
| filegroup { |
| name: "framework-telephony-shared-srcs", |
| srcs: [ |
| "core/java/android/util/RecurrenceRule.java", |
| "core/java/com/android/internal/os/SomeArgs.java", |
| "core/java/com/android/internal/util/BitwiseInputStream.java", |
| "core/java/com/android/internal/util/BitwiseOutputStream.java", |
| "core/java/com/android/internal/util/HexDump.java", |
| "core/java/com/android/internal/util/IndentingPrintWriter.java", |
| "core/java/com/android/internal/util/Preconditions.java", |
| ], |
| } |
| |
| // Avoid including Parcelable classes as we don't want to have two copies of |
| // Parcelable cross the process. |
| filegroup { |
| name: "framework-cellbroadcast-shared-srcs", |
| srcs: [ |
| "core/java/android/os/HandlerExecutor.java", |
| "core/java/android/util/LocalLog.java", |
| "core/java/com/android/internal/util/IState.java", |
| "core/java/com/android/internal/util/Preconditions.java", |
| "core/java/com/android/internal/util/State.java", |
| "core/java/com/android/internal/util/StateMachine.java", |
| ], |
| } |
| |
| filegroup { |
| name: "framework-ims-common-shared-srcs", |
| srcs: [ |
| "core/java/android/os/RegistrantList.java", |
| "core/java/android/os/Registrant.java", |
| "core/java/com/android/internal/os/SomeArgs.java", |
| "core/java/com/android/internal/util/Preconditions.java", |
| ], |
| } |
| |
| // utility classes statically linked into framework-wifi and dynamically linked |
| // into wifi-service |
| java_library { |
| name: "framework-wifi-util-lib", |
| sdk_version: "core_current", |
| srcs: [ |
| "core/java/android/content/pm/BaseParceledListSlice.java", |
| "core/java/android/content/pm/ParceledListSlice.java", |
| "core/java/android/net/shared/Inet4AddressUtils.java", |
| "core/java/android/os/HandlerExecutor.java", |
| "core/java/com/android/internal/util/AsyncChannel.java", |
| "core/java/com/android/internal/util/AsyncService.java", |
| "core/java/com/android/internal/util/Protocol.java", |
| "core/java/com/android/internal/util/Preconditions.java", |
| "telephony/java/android/telephony/Annotation.java", |
| ":net-utils-framework-wifi-common-srcs", |
| ], |
| libs: [ |
| "framework-annotations-lib", |
| "unsupportedappusage", |
| "android_system_stubs_current", |
| ], |
| visibility: ["//frameworks/base/wifi"], |
| } |
| |
| // utility classes statically linked into wifi-service |
| filegroup { |
| name: "framework-wifi-service-shared-srcs", |
| srcs: [ |
| "core/java/android/net/InterfaceConfiguration.java", |
| "core/java/android/os/BasicShellCommandHandler.java", |
| "core/java/android/util/BackupUtils.java", |
| "core/java/android/util/LocalLog.java", |
| "core/java/android/util/Rational.java", |
| "core/java/com/android/internal/util/FastXmlSerializer.java", |
| "core/java/com/android/internal/util/HexDump.java", |
| "core/java/com/android/internal/util/IState.java", |
| "core/java/com/android/internal/util/MessageUtils.java", |
| "core/java/com/android/internal/util/State.java", |
| "core/java/com/android/internal/util/StateMachine.java", |
| "core/java/com/android/internal/util/WakeupMessage.java", |
| ], |
| visibility: ["//frameworks/opt/net/wifi/service"], |
| } |
| |
| // TODO(b/145644363): move this to under StubLibraries.bp or ApiDocs.bp |
| metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.xml) " + |
| "--ignore-classes-on-classpath " + |
| "--hide-package com.android.server " + |
| "--error UnhiddenSystemApi " + |
| "--hide RequiresPermission " + |
| "--hide CallbackInterface " + |
| "--hide MissingPermission --hide BroadcastBehavior " + |
| "--hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol " + |
| "--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo " + |
| "--force-convert-to-warning-nullability-annotations +*:-android.*:+android.icu.*:-dalvik.*" |
| |
| build = [ |
| "StubLibraries.bp", |
| "ApiDocs.bp", |
| ] |
| |
| // TODO(b/147699819): move to frameworks/base/telephony/ folder |
| droidstubs { |
| name: "framework-telephony-stubs-srcs", |
| srcs: [ |
| ":framework-telephony-sources", |
| ":framework_native_aidl", |
| ":framework-javastream-protos", |
| ], |
| aidl: { |
| local_include_dirs: [ |
| "core/java", |
| "telecomm/java" |
| ], |
| }, |
| libs: [ |
| "framework-annotations-lib", |
| "android.hardware.radio-V1.5-java", |
| ], |
| defaults: ["framework-module-stubs-defaults-systemapi"], |
| filter_packages: ["android.telephony"], |
| sdk_version: "system_current", |
| } |
| |
| java_library { |
| name: "framework-telephony-stubs", |
| srcs: [":framework-telephony-stubs-srcs"], |
| // TODO(b/147699819): move public aidls to a separate folder and potentially remove |
| // below aidl exports. |
| aidl: { |
| export_include_dirs: ["telephony/java"], |
| }, |
| sdk_version: "core_current", |
| libs: ["android_system_stubs_current"], |
| } |
| |
| java_library { |
| name: "framework-telephony", |
| srcs: [ |
| ":framework-telephony-sources", |
| ":framework-telephony-shared-srcs", |
| ], |
| // TODO: change to framework-system-stub to build against system APIs. |
| libs: [ |
| "framework-minus-apex", |
| "unsupportedappusage", |
| "ike-stubs", |
| ], |
| static_libs: [ |
| "libphonenumber-platform", |
| "app-compat-annotations", |
| ], |
| sdk_version: "core_platform", |
| aidl: { |
| export_include_dirs: ["telephony/java"], |
| include_dirs: [ |
| "frameworks/native/aidl/binder", |
| "frameworks/native/aidl/gui", |
| ] |
| }, |
| jarjar_rules: ":framework-telephony-jarjar-rules", |
| dxflags: [ |
| "--core-library", |
| "--multi-dex", |
| ], |
| // This is to break the dependency from boot jars. |
| dex_preopt: { |
| enabled: false, |
| }, |
| installable: true, |
| } |
| |
| filegroup { |
| // TODO (b/147690217): move to frameworks/base/telephony/common. |
| name: "framework-telephony-annotations", |
| srcs: ["telephony/java/android/telephony/Annotation.java"], |
| } |
| |
| filegroup { |
| name: "framework-telephony-jarjar-rules", |
| srcs: ["telephony/framework-telephony-jarjar-rules.txt"], |
| } |