blob: bd7bc1866bfac83f7b299096456f6b8ba1fde78b [file] [log] [blame]
// 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.btservices",
],
min_sdk_version: "Tiramisu",
sdk_version: "module_current",
}
java_library {
name: "mmslib",
srcs: [":framework-mms-shared-srcs"],
libs: ["unsupportedappusage"],
apex_available: [
"com.android.btservices",
],
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",
"packages/modules/Bluetooth/system/gd",
],
static_libs: [
"libbluetooth-types",
"libbluetooth",
"libc++fs",
],
sanitize: {
scs: true,
},
apex_available: [
"com.android.btservices",
],
min_sdk_version: "Tiramisu",
}
cc_library {
name: "libbluetooth-core",
defaults: ["fluoride_basic_defaults"],
header_libs: [
"jni_headers",
"libbluetooth_headers",
],
include_dirs: [
"packages/modules/Bluetooth/system/types",
],
whole_static_libs: [
"libbte",
"libbt-bta-core",
"libbt-common",
"libbtdevice",
"libbtif-core",
"libbt-hci",
"libbt-stack-core",
"libbt-utils",
"libbtcore",
"libosi",
"lib-bt-packets",
"lib-bt-packets-base",
"libbluetooth-types",
"libc++fs",
],
cflags: [
/* we export all classes, so change default visibility, instead of having EXPORT_SYMBOL on each class*/
"-fvisibility=default",
"-Wall",
"-Werror",
"-Wextra",
"-Wno-unused-parameter",
],
sanitize: {
scs: true,
},
apex_available: [
"com.android.btservices",
],
host_supported: true,
min_sdk_version: "Tiramisu",
}
// Bluetooth APK
android_app {
name: "Bluetooth",
defaults: ["bluetooth-module-sdk-version-defaults"],
srcs: [
"src/**/*.java",
":statslog-bluetooth-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-configinfrastructure",
"framework-connectivity.stubs.module_lib",
"framework-mediaprovider",
"unsupportedappusage",
"framework-annotations-lib",
"error_prone_annotations",
],
static_libs: [
"android.hardware.radio-V1.0-java",
"android.hardware.radio.sap-V1-java",
"androidx.core_core",
"androidx.legacy_legacy-support-v4",
"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",
"bluetooth-proto-enums-java-gen",
],
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.btservices",
],
errorprone: {
javacflags: [
// "-Xep:AndroidFrameworkRequiresPermission:ERROR",
"-Xep:AlmostJavadoc:ERROR",
],
},
min_sdk_version: "Tiramisu",
sdk_version: "module_current",
}
java_library {
name: "bluetooth-proto-enums-java-gen",
installable: false,
proto: {
type: "stream",
},
srcs: [
":srcs_bluetooth_protos",
],
apex_available: [
"com.android.btservices",
],
min_sdk_version: "Tiramisu",
sdk_version: "module_current",
}
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"
}