1// MAP API module 2 3package { 4 default_applicable_licenses: ["packages_apps_Bluetooth_license"], 5} 6 7// Added automatically by a large-scale-change that took the approach of 8// 'apply every license found to every target'. While this makes sure we respect 9// every license restriction, it may not be entirely correct. 10// 11// e.g. GPL in an MIT project might only apply to the contrib/ directory. 12// 13// Please consider splitting the single license below into multiple licenses, 14// taking care not to lose any license_kind information, and overriding the 15// default license using the 'licenses: [...]' property on targets as needed. 16// 17// For unused files, consider creating a 'fileGroup' with "//visibility:private" 18// to attach the license to, and including a comment whether the files may be 19// used in the current project. 20// See: http://go/android-license-faq 21license { 22 name: "packages_apps_Bluetooth_license", 23 visibility: [":__subpackages__"], 24 license_kinds: [ 25 "SPDX-license-identifier-Apache-2.0", 26 "SPDX-license-identifier-BSD", 27 ], 28 // large-scale-change unable to identify any license_text files 29} 30 31java_library { 32 name: "bluetooth.mapsapi", 33 34 srcs: ["lib/mapapi/**/*.java"], 35 apex_available: [ 36 "com.android.bluetooth", 37 ], 38 min_sdk_version: "Tiramisu", 39 sdk_version: "module_current", 40} 41 42java_library { 43 name: "mmslib", 44 45 srcs: [":framework-mms-shared-srcs"], 46 libs: ["unsupportedappusage"], 47 apex_available: [ 48 "com.android.bluetooth", 49 ], 50 min_sdk_version: "Tiramisu", 51 sdk_version: "module_current", 52} 53 54// Bluetooth JNI 55 56cc_library_shared { 57 name: "libbluetooth_jni", 58 defaults: ["fluoride_full_defaults"], 59 srcs: ["jni/**/*.cpp"], 60 header_libs: [ 61 "jni_headers", 62 "libbluetooth_headers", 63 ], 64 include_dirs: [ 65 "packages/modules/Bluetooth/system/types", 66 ], 67 static_libs: [ 68 "libbluetooth-types", 69 "libbluetooth", 70 "libc++fs", 71 ], 72 sanitize: { 73 scs: true, 74 }, 75 apex_available: [ 76 "com.android.bluetooth", 77 ], 78 min_sdk_version: "Tiramisu", 79} 80 81// Bluetooth APK 82 83android_app { 84 name: "Bluetooth", 85 defaults: ["bluetooth-module-sdk-version-defaults"], 86 87 srcs: [ 88 "src/**/*.java", 89 ":statslog-bluetooth-java-gen", 90 ":bluetooth-proto-enums-java-gen", 91 ], 92 aaptflags: [ "--custom-package", "com.android.bluetooth" ], 93 certificate: ":com.android.bluetooth.certificate", 94 95 jarjar_rules: ":bluetooth-jarjar-rules", 96 97 jni_uses_platform_apis: true, 98 libs: [ 99 "framework-bluetooth-pre-jarjar", 100 "framework-statsd.stubs.module_lib", 101 "framework-tethering.stubs.module_lib", 102 "framework-connectivity.stubs.module_lib", 103 "framework-mediaprovider", 104 "unsupportedappusage", 105 "framework-annotations-lib", 106 "error_prone_annotations", 107 ], 108 static_libs: [ 109 "android.hardware.radio-V1.0-java", 110 "androidx.core_core", 111 "androidx.media_media", 112 "androidx.lifecycle_lifecycle-livedata", 113 "androidx.room_room-runtime", 114 "androidx.annotation_annotation", 115 "bluetooth.mapsapi", 116 "bluetooth-protos-lite", 117 "com.android.vcard", 118 "com.android.obex", 119 "guava", 120 "libprotobuf-java-lite", 121 "mmslib", 122 "modules-utils-backgroundthread", 123 "modules-utils-bytesmatcher", 124 "modules-utils-synchronous-result-receiver", 125 "modules-utils-statemachine", 126 "sap-api-java-static", 127 "net-utils-services-common", 128 "networkstack-client", 129 "PlatformProperties", 130 ], 131 132 plugins: [ 133 "androidx.room_room-compiler-plugin", 134 ], 135 136 // Add in path to Bluetooth directory because local path does not exist 137 javacflags: ["-Aroom.schemaLocation=packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/btservice/storage/schemas"], 138 139 optimize: { 140 enabled: true, 141 shrink: true, 142 optimize: false, 143 proguard_flags_files: ["proguard.flags"], 144 }, 145 required: [ 146 "android.hardware.bluetooth@1.0", 147 "android.hardware.bluetooth@1.1", 148 "android.hardware.bluetooth.audio@2.0", 149 "android.hardware.bluetooth.audio@2.1", 150 "android.hardware.bluetooth.audio-V2-ndk", 151 ], 152 apex_available: [ 153 "com.android.bluetooth", 154 ], 155 errorprone: { 156 javacflags: [ 157 // "-Xep:AndroidFrameworkRequiresPermission:ERROR", 158 ], 159 }, 160 min_sdk_version: "Tiramisu", 161 sdk_version: "module_current", 162} 163 164gensrcs { 165 name: "bluetooth-proto-enums-java-gen", 166 depfile: true, 167 168 tools: [ 169 "aprotoc", 170 "protoc-gen-javastream", 171 "soong_zip", 172 ], 173 174 cmd: "mkdir -p $(genDir)/$(in) " + 175 "&& $(location aprotoc) " + 176 " --plugin=$(location protoc-gen-javastream) " + 177 " --dependency_out=$(depfile) " + 178 " --javastream_out=$(genDir)/$(in) " + 179 " -Iexternal/protobuf/src " + 180 " -I . " + 181 " $(in) " + 182 "&& $(location soong_zip) -jar -o $(out) -C $(genDir)/$(in) -D $(genDir)/$(in)", 183 184 srcs: [ 185 ":srcs_bluetooth_protos", 186 ], 187 output_extension: "srcjar", 188} 189 190genrule { 191 name: "statslog-bluetooth-java-gen", 192 tools: ["stats-log-api-gen"], 193 cmd: "$(location stats-log-api-gen) --java $(out) --module bluetooth" + 194 " --javaPackage com.android.bluetooth --javaClass BluetoothStatsLog" + 195 " --minApiLevel 33", 196 out: ["com/android/bluetooth/BluetoothStatsLog.java"], 197} 198 199android_app_certificate { 200 name: "com.android.bluetooth.certificate", 201 certificate: "certs/com.android.bluetooth" 202} 203