203 lines
5.6 KiB
Plaintext
203 lines
5.6 KiB
Plaintext
// MAP API module
|
|
|
|
package {
|
|
default_applicable_licenses: ["packages_apps_Bluetooth_license"],
|
|
}
|
|
|
|
// Added automatically by a large-scale-change that took the approach of
|
|
// 'apply every license found to every target'. While this makes sure we respect
|
|
// every license restriction, it may not be entirely correct.
|
|
//
|
|
// e.g. GPL in an MIT project might only apply to the contrib/ directory.
|
|
//
|
|
// Please consider splitting the single license below into multiple licenses,
|
|
// taking care not to lose any license_kind information, and overriding the
|
|
// default license using the 'licenses: [...]' property on targets as needed.
|
|
//
|
|
// For unused files, consider creating a 'fileGroup' with "//visibility:private"
|
|
// to attach the license to, and including a comment whether the files may be
|
|
// used in the current project.
|
|
// See: http://go/android-license-faq
|
|
license {
|
|
name: "packages_apps_Bluetooth_license",
|
|
visibility: [":__subpackages__"],
|
|
license_kinds: [
|
|
"SPDX-license-identifier-Apache-2.0",
|
|
"SPDX-license-identifier-BSD",
|
|
],
|
|
// large-scale-change unable to identify any license_text files
|
|
}
|
|
|
|
java_library {
|
|
name: "bluetooth.mapsapi",
|
|
|
|
srcs: ["lib/mapapi/**/*.java"],
|
|
apex_available: [
|
|
"com.android.bluetooth",
|
|
],
|
|
min_sdk_version: "Tiramisu",
|
|
sdk_version: "module_current",
|
|
}
|
|
|
|
java_library {
|
|
name: "mmslib",
|
|
|
|
srcs: [":framework-mms-shared-srcs"],
|
|
libs: ["unsupportedappusage"],
|
|
apex_available: [
|
|
"com.android.bluetooth",
|
|
],
|
|
min_sdk_version: "Tiramisu",
|
|
sdk_version: "module_current",
|
|
}
|
|
|
|
// Bluetooth JNI
|
|
|
|
cc_library_shared {
|
|
name: "libbluetooth_jni",
|
|
defaults: ["fluoride_full_defaults"],
|
|
srcs: ["jni/**/*.cpp"],
|
|
header_libs: [
|
|
"jni_headers",
|
|
"libbluetooth_headers",
|
|
],
|
|
include_dirs: [
|
|
"packages/modules/Bluetooth/system/types",
|
|
],
|
|
static_libs: [
|
|
"libbluetooth-types",
|
|
"libbluetooth",
|
|
"libc++fs",
|
|
],
|
|
sanitize: {
|
|
scs: true,
|
|
},
|
|
apex_available: [
|
|
"com.android.bluetooth",
|
|
],
|
|
min_sdk_version: "Tiramisu",
|
|
}
|
|
|
|
// Bluetooth APK
|
|
|
|
android_app {
|
|
name: "Bluetooth",
|
|
defaults: ["bluetooth-module-sdk-version-defaults"],
|
|
|
|
srcs: [
|
|
"src/**/*.java",
|
|
":statslog-bluetooth-java-gen",
|
|
":bluetooth-proto-enums-java-gen",
|
|
],
|
|
aaptflags: [ "--custom-package", "com.android.bluetooth" ],
|
|
certificate: ":com.android.bluetooth.certificate",
|
|
|
|
jarjar_rules: ":bluetooth-jarjar-rules",
|
|
|
|
jni_uses_platform_apis: true,
|
|
libs: [
|
|
"framework-bluetooth-pre-jarjar",
|
|
"framework-statsd.stubs.module_lib",
|
|
"framework-tethering.stubs.module_lib",
|
|
"framework-connectivity.stubs.module_lib",
|
|
"framework-mediaprovider",
|
|
"unsupportedappusage",
|
|
"framework-annotations-lib",
|
|
"error_prone_annotations",
|
|
],
|
|
static_libs: [
|
|
"android.hardware.radio-V1.0-java",
|
|
"androidx.core_core",
|
|
"androidx.media_media",
|
|
"androidx.lifecycle_lifecycle-livedata",
|
|
"androidx.room_room-runtime",
|
|
"androidx.annotation_annotation",
|
|
"bluetooth.mapsapi",
|
|
"bluetooth-protos-lite",
|
|
"com.android.vcard",
|
|
"com.android.obex",
|
|
"guava",
|
|
"libprotobuf-java-lite",
|
|
"mmslib",
|
|
"modules-utils-backgroundthread",
|
|
"modules-utils-bytesmatcher",
|
|
"modules-utils-synchronous-result-receiver",
|
|
"modules-utils-statemachine",
|
|
"sap-api-java-static",
|
|
"net-utils-services-common",
|
|
"networkstack-client",
|
|
"PlatformProperties",
|
|
],
|
|
|
|
plugins: [
|
|
"androidx.room_room-compiler-plugin",
|
|
],
|
|
|
|
// Add in path to Bluetooth directory because local path does not exist
|
|
javacflags: ["-Aroom.schemaLocation=packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/btservice/storage/schemas"],
|
|
|
|
optimize: {
|
|
enabled: true,
|
|
shrink: true,
|
|
optimize: false,
|
|
proguard_flags_files: ["proguard.flags"],
|
|
},
|
|
required: [
|
|
"android.hardware.bluetooth@1.0",
|
|
"android.hardware.bluetooth@1.1",
|
|
"android.hardware.bluetooth.audio@2.0",
|
|
"android.hardware.bluetooth.audio@2.1",
|
|
"android.hardware.bluetooth.audio-V2-ndk",
|
|
],
|
|
apex_available: [
|
|
"com.android.bluetooth",
|
|
],
|
|
errorprone: {
|
|
javacflags: [
|
|
// "-Xep:AndroidFrameworkRequiresPermission:ERROR",
|
|
],
|
|
},
|
|
min_sdk_version: "Tiramisu",
|
|
sdk_version: "module_current",
|
|
}
|
|
|
|
gensrcs {
|
|
name: "bluetooth-proto-enums-java-gen",
|
|
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: [
|
|
":srcs_bluetooth_protos",
|
|
],
|
|
output_extension: "srcjar",
|
|
}
|
|
|
|
genrule {
|
|
name: "statslog-bluetooth-java-gen",
|
|
tools: ["stats-log-api-gen"],
|
|
cmd: "$(location stats-log-api-gen) --java $(out) --module bluetooth" +
|
|
" --javaPackage com.android.bluetooth --javaClass BluetoothStatsLog" +
|
|
" --minApiLevel 33",
|
|
out: ["com/android/bluetooth/BluetoothStatsLog.java"],
|
|
}
|
|
|
|
android_app_certificate {
|
|
name: "com.android.bluetooth.certificate",
|
|
certificate: "certs/com.android.bluetooth"
|
|
}
|