Loading android/app/Android.bp +32 −10 Original line number Original line Diff line number Diff line Loading @@ -32,6 +32,8 @@ java_library { name: "bluetooth.mapsapi", name: "bluetooth.mapsapi", srcs: ["lib/mapapi/**/*.java"], srcs: ["lib/mapapi/**/*.java"], min_sdk_version: "current", sdk_version: "module_current", } } java_library { java_library { Loading @@ -39,6 +41,11 @@ java_library { srcs: [":framework-mms-shared-srcs"], srcs: [":framework-mms-shared-srcs"], libs: ["unsupportedappusage"], libs: ["unsupportedappusage"], apex_available: [ "com.android.bluetooth", ], min_sdk_version: "current", sdk_version: "module_current", } } // Bluetooth JNI // Bluetooth JNI Loading Loading @@ -71,6 +78,10 @@ cc_library_shared { sanitize: { sanitize: { scs: true, scs: true, }, }, apex_available: [ "com.android.bluetooth", ], min_sdk_version: "current", } } // Bluetooth APK // Bluetooth APK Loading @@ -84,12 +95,21 @@ android_app { ":statslog-bluetooth-java-gen", ":statslog-bluetooth-java-gen", ":bluetooth-proto-enums-java-gen", ":bluetooth-proto-enums-java-gen", ], ], platform_apis: true, platform_apis: false, certificate: "platform", certificate: "platform", jni_libs: ["libbluetooth_jni"], jarjar_rules: ":bluetooth-jarjar-rules", jni_uses_platform_apis: true, libs: [ libs: [ "services.net", "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: [ static_libs: [ "android.hardware.radio-V1.0-java", "android.hardware.radio-V1.0-java", Loading @@ -97,6 +117,7 @@ android_app { "androidx.legacy_legacy-support-v4", "androidx.legacy_legacy-support-v4", "androidx.lifecycle_lifecycle-livedata", "androidx.lifecycle_lifecycle-livedata", "androidx.room_room-runtime", "androidx.room_room-runtime", "androidx.annotation_annotation", "bluetooth.mapsapi", "bluetooth.mapsapi", "bluetooth.obex", "bluetooth.obex", "bluetooth-protos-lite", "bluetooth-protos-lite", Loading @@ -109,8 +130,9 @@ android_app { "modules-utils-synchronous-result-receiver", "modules-utils-synchronous-result-receiver", "modules-utils-statemachine", "modules-utils-statemachine", "sap-api-java-static", "sap-api-java-static", "services.net", "net-utils-services-common", "PlatformProperties" "networkstack-client", "PlatformProperties", ], ], plugins: [ plugins: [ Loading @@ -123,9 +145,7 @@ android_app { optimize: { optimize: { enabled: false, enabled: false, }, }, required: ["libbluetooth"], apex_available: [ apex_available: [ "//apex_available:platform", "com.android.bluetooth", "com.android.bluetooth", ], ], errorprone: { errorprone: { Loading @@ -133,6 +153,8 @@ android_app { // "-Xep:AndroidFrameworkRequiresPermission:ERROR", // "-Xep:AndroidFrameworkRequiresPermission:ERROR", ], ], }, }, min_sdk_version: "current", sdk_version: "module_current", } } gensrcs { gensrcs { Loading Loading @@ -164,8 +186,8 @@ gensrcs { genrule { genrule { name: "statslog-bluetooth-java-gen", name: "statslog-bluetooth-java-gen", tools: ["stats-log-api-gen"], tools: ["stats-log-api-gen"], cmd: "$(location stats-log-api-gen) --java $(out) --module bluetooth" cmd: "$(location stats-log-api-gen) --java $(out) --module bluetooth" + + " --javaPackage com.android.bluetooth --javaClass BluetoothStatsLog" " --javaPackage com.android.bluetooth --javaClass BluetoothStatsLog" + + " --minApiLevel 32", " --minApiLevel 32", out: ["com/android/bluetooth/BluetoothStatsLog.java"], out: ["com/android/bluetooth/BluetoothStatsLog.java"], } } android/app/lib/obex/Android.bp +6 −1 Original line number Original line Diff line number Diff line Loading @@ -33,4 +33,9 @@ java_library { name: "bluetooth.obex", name: "bluetooth.obex", srcs: ["**/*.java"], srcs: ["**/*.java"], apex_available: [ "com.android.bluetooth", ], min_sdk_version: "current", sdk_version: "module_current", } } android/app/tests/robotests/Android.mk +2 −2 Original line number Original line Diff line number Diff line Loading @@ -26,7 +26,7 @@ LOCAL_INSTRUMENTATION_FOR := Bluetooth LOCAL_MODULE_TAGS := optional LOCAL_MODULE_TAGS := optional include $(BUILD_STATIC_JAVA_LIBRARY) #include $(BUILD_STATIC_JAVA_LIBRARY) ############################################################# ############################################################# # Bluetooth runner target to run the previous target. # # Bluetooth runner target to run the previous target. # Loading @@ -48,4 +48,4 @@ LOCAL_TEST_PACKAGE := Bluetooth LOCAL_INSTRUMENT_SOURCE_DIRS := $(dir $(LOCAL_PATH))../src LOCAL_INSTRUMENT_SOURCE_DIRS := $(dir $(LOCAL_PATH))../src include external/robolectric-shadows/run_robotests.mk #include external/robolectric-shadows/run_robotests.mk android/app/tests/unit/Android.bp +9 −3 Original line number Original line Diff line number Diff line Loading @@ -7,7 +7,10 @@ android_test { // We only want this apk build for tests. // We only want this apk build for tests. certificate: "platform", certificate: "platform", defaults: ["framework-bluetooth-tests-defaults"], min_sdk_version: "current", target_sdk_version: "current", libs: [ libs: [ "javax.obex", "javax.obex", "android.test.runner", "android.test.runner", Loading @@ -27,18 +30,21 @@ android_test { "androidx.room_room-runtime", "androidx.room_room-runtime", "androidx.room_room-testing", "androidx.room_room-testing", "truth-prebuilt", "truth-prebuilt", "PlatformProperties" "PlatformProperties", "framework-bluetooth-pre-jarjar", ], ], asset_dirs: ["src/com/android/bluetooth/btservice/storage/schemas"], asset_dirs: ["src/com/android/bluetooth/btservice/storage/schemas"], // Include all test java files. // Include all test java files. srcs: ["src/**/*.java"], srcs: ["src/**/*.java"], jacoco: { include_filter: ["android.bluetooth.*"], exclude_filter: [], }, platform_apis: true, platform_apis: true, test_suites: ["device-tests"], test_suites: ["device-tests"], instrumentation_for: "Bluetooth", instrumentation_for: "Bluetooth", } } apex/Android.bp +71 −11 Original line number Original line Diff line number Diff line Loading @@ -7,22 +7,40 @@ package { default_applicable_licenses: ["system_bt_license"], default_applicable_licenses: ["system_bt_license"], } } apex { apex_defaults { name: "com.android.bluetooth", name: "com.android.bluetooth-defaults", enabled: false, bootclasspath_fragments: ["com.android.bluetooth-bootclasspath-fragment"], systemserverclasspath_fragments: ["com.android.bluetooth-systemserverclasspath-fragment"], manifest: "apex_manifest.json", apps: ["Bluetooth"], multilib: { first: { // Extractor process runs only with the primary ABI. native_shared_libs: [ native_shared_libs: [ "libbluetooth", ], jni_libs: [ "libbluetooth_jni", "libbluetooth_jni", "libbluetooth" ], ], apps: ["Bluetooth"], }, }, compile_multilib: "both", key: "com.android.bluetooth.key", key: "com.android.bluetooth.key", certificate: ":com.android.bluetooth.certificate", certificate: ":com.android.bluetooth.certificate", min_sdk_version: "current", updatable: false, future_updatable: true, // Indicates that pre-installed version of this apex can be compressed. // Whether it actually will be compressed is controlled on per-device basis. compressible: true, } //Mainline bluetooth apex module. apex { name: "com.android.bluetooth", defaults: ["com.android.bluetooth-defaults"], manifest: "apex_manifest.json", } } apex_key { apex_key { Loading @@ -35,3 +53,45 @@ android_app_certificate { name: "com.android.bluetooth.certificate", name: "com.android.bluetooth.certificate", certificate: "com.android.bluetooth", certificate: "com.android.bluetooth", } } sdk { name: "bluetooth-module-sdk", bootclasspath_fragments: ["com.android.bluetooth-bootclasspath-fragment"], systemserverclasspath_fragments: ["com.android.bluetooth-systemserverclasspath-fragment"], } // Encapsulate the contributions made by the com.android.bluetooth to the bootclasspath. bootclasspath_fragment { name: "com.android.bluetooth-bootclasspath-fragment", contents: ["framework-bluetooth"], apex_available: ["com.android.bluetooth"], // The bootclasspath_fragments that provide APIs on which this depends. fragments: [ { apex: "com.android.art", module: "art-bootclasspath-fragment", }, ], // Additional stubs libraries that this fragment's contents use which are // not provided by another bootclasspath_fragment. additional_stubs: [ "android-non-updatable", ], // Additional hidden API flag files to override the defaults. This must only be // modified by the Soong or platform compat team. hidden_api: { max_target_o_low_priority: ["hiddenapi/hiddenapi-max-target-o-low-priority.txt"], max_target_r_low_priority: ["hiddenapi/hiddenapi-max-target-r-low-priority.txt"], unsupported: ["hiddenapi/hiddenapi-unsupported.txt"], }, } systemserverclasspath_fragment { name: "com.android.bluetooth-systemserverclasspath-fragment", standalone_contents: ["service-bluetooth"], apex_available: ["com.android.bluetooth"], } Loading
android/app/Android.bp +32 −10 Original line number Original line Diff line number Diff line Loading @@ -32,6 +32,8 @@ java_library { name: "bluetooth.mapsapi", name: "bluetooth.mapsapi", srcs: ["lib/mapapi/**/*.java"], srcs: ["lib/mapapi/**/*.java"], min_sdk_version: "current", sdk_version: "module_current", } } java_library { java_library { Loading @@ -39,6 +41,11 @@ java_library { srcs: [":framework-mms-shared-srcs"], srcs: [":framework-mms-shared-srcs"], libs: ["unsupportedappusage"], libs: ["unsupportedappusage"], apex_available: [ "com.android.bluetooth", ], min_sdk_version: "current", sdk_version: "module_current", } } // Bluetooth JNI // Bluetooth JNI Loading Loading @@ -71,6 +78,10 @@ cc_library_shared { sanitize: { sanitize: { scs: true, scs: true, }, }, apex_available: [ "com.android.bluetooth", ], min_sdk_version: "current", } } // Bluetooth APK // Bluetooth APK Loading @@ -84,12 +95,21 @@ android_app { ":statslog-bluetooth-java-gen", ":statslog-bluetooth-java-gen", ":bluetooth-proto-enums-java-gen", ":bluetooth-proto-enums-java-gen", ], ], platform_apis: true, platform_apis: false, certificate: "platform", certificate: "platform", jni_libs: ["libbluetooth_jni"], jarjar_rules: ":bluetooth-jarjar-rules", jni_uses_platform_apis: true, libs: [ libs: [ "services.net", "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: [ static_libs: [ "android.hardware.radio-V1.0-java", "android.hardware.radio-V1.0-java", Loading @@ -97,6 +117,7 @@ android_app { "androidx.legacy_legacy-support-v4", "androidx.legacy_legacy-support-v4", "androidx.lifecycle_lifecycle-livedata", "androidx.lifecycle_lifecycle-livedata", "androidx.room_room-runtime", "androidx.room_room-runtime", "androidx.annotation_annotation", "bluetooth.mapsapi", "bluetooth.mapsapi", "bluetooth.obex", "bluetooth.obex", "bluetooth-protos-lite", "bluetooth-protos-lite", Loading @@ -109,8 +130,9 @@ android_app { "modules-utils-synchronous-result-receiver", "modules-utils-synchronous-result-receiver", "modules-utils-statemachine", "modules-utils-statemachine", "sap-api-java-static", "sap-api-java-static", "services.net", "net-utils-services-common", "PlatformProperties" "networkstack-client", "PlatformProperties", ], ], plugins: [ plugins: [ Loading @@ -123,9 +145,7 @@ android_app { optimize: { optimize: { enabled: false, enabled: false, }, }, required: ["libbluetooth"], apex_available: [ apex_available: [ "//apex_available:platform", "com.android.bluetooth", "com.android.bluetooth", ], ], errorprone: { errorprone: { Loading @@ -133,6 +153,8 @@ android_app { // "-Xep:AndroidFrameworkRequiresPermission:ERROR", // "-Xep:AndroidFrameworkRequiresPermission:ERROR", ], ], }, }, min_sdk_version: "current", sdk_version: "module_current", } } gensrcs { gensrcs { Loading Loading @@ -164,8 +186,8 @@ gensrcs { genrule { genrule { name: "statslog-bluetooth-java-gen", name: "statslog-bluetooth-java-gen", tools: ["stats-log-api-gen"], tools: ["stats-log-api-gen"], cmd: "$(location stats-log-api-gen) --java $(out) --module bluetooth" cmd: "$(location stats-log-api-gen) --java $(out) --module bluetooth" + + " --javaPackage com.android.bluetooth --javaClass BluetoothStatsLog" " --javaPackage com.android.bluetooth --javaClass BluetoothStatsLog" + + " --minApiLevel 32", " --minApiLevel 32", out: ["com/android/bluetooth/BluetoothStatsLog.java"], out: ["com/android/bluetooth/BluetoothStatsLog.java"], } }
android/app/lib/obex/Android.bp +6 −1 Original line number Original line Diff line number Diff line Loading @@ -33,4 +33,9 @@ java_library { name: "bluetooth.obex", name: "bluetooth.obex", srcs: ["**/*.java"], srcs: ["**/*.java"], apex_available: [ "com.android.bluetooth", ], min_sdk_version: "current", sdk_version: "module_current", } }
android/app/tests/robotests/Android.mk +2 −2 Original line number Original line Diff line number Diff line Loading @@ -26,7 +26,7 @@ LOCAL_INSTRUMENTATION_FOR := Bluetooth LOCAL_MODULE_TAGS := optional LOCAL_MODULE_TAGS := optional include $(BUILD_STATIC_JAVA_LIBRARY) #include $(BUILD_STATIC_JAVA_LIBRARY) ############################################################# ############################################################# # Bluetooth runner target to run the previous target. # # Bluetooth runner target to run the previous target. # Loading @@ -48,4 +48,4 @@ LOCAL_TEST_PACKAGE := Bluetooth LOCAL_INSTRUMENT_SOURCE_DIRS := $(dir $(LOCAL_PATH))../src LOCAL_INSTRUMENT_SOURCE_DIRS := $(dir $(LOCAL_PATH))../src include external/robolectric-shadows/run_robotests.mk #include external/robolectric-shadows/run_robotests.mk
android/app/tests/unit/Android.bp +9 −3 Original line number Original line Diff line number Diff line Loading @@ -7,7 +7,10 @@ android_test { // We only want this apk build for tests. // We only want this apk build for tests. certificate: "platform", certificate: "platform", defaults: ["framework-bluetooth-tests-defaults"], min_sdk_version: "current", target_sdk_version: "current", libs: [ libs: [ "javax.obex", "javax.obex", "android.test.runner", "android.test.runner", Loading @@ -27,18 +30,21 @@ android_test { "androidx.room_room-runtime", "androidx.room_room-runtime", "androidx.room_room-testing", "androidx.room_room-testing", "truth-prebuilt", "truth-prebuilt", "PlatformProperties" "PlatformProperties", "framework-bluetooth-pre-jarjar", ], ], asset_dirs: ["src/com/android/bluetooth/btservice/storage/schemas"], asset_dirs: ["src/com/android/bluetooth/btservice/storage/schemas"], // Include all test java files. // Include all test java files. srcs: ["src/**/*.java"], srcs: ["src/**/*.java"], jacoco: { include_filter: ["android.bluetooth.*"], exclude_filter: [], }, platform_apis: true, platform_apis: true, test_suites: ["device-tests"], test_suites: ["device-tests"], instrumentation_for: "Bluetooth", instrumentation_for: "Bluetooth", } }
apex/Android.bp +71 −11 Original line number Original line Diff line number Diff line Loading @@ -7,22 +7,40 @@ package { default_applicable_licenses: ["system_bt_license"], default_applicable_licenses: ["system_bt_license"], } } apex { apex_defaults { name: "com.android.bluetooth", name: "com.android.bluetooth-defaults", enabled: false, bootclasspath_fragments: ["com.android.bluetooth-bootclasspath-fragment"], systemserverclasspath_fragments: ["com.android.bluetooth-systemserverclasspath-fragment"], manifest: "apex_manifest.json", apps: ["Bluetooth"], multilib: { first: { // Extractor process runs only with the primary ABI. native_shared_libs: [ native_shared_libs: [ "libbluetooth", ], jni_libs: [ "libbluetooth_jni", "libbluetooth_jni", "libbluetooth" ], ], apps: ["Bluetooth"], }, }, compile_multilib: "both", key: "com.android.bluetooth.key", key: "com.android.bluetooth.key", certificate: ":com.android.bluetooth.certificate", certificate: ":com.android.bluetooth.certificate", min_sdk_version: "current", updatable: false, future_updatable: true, // Indicates that pre-installed version of this apex can be compressed. // Whether it actually will be compressed is controlled on per-device basis. compressible: true, } //Mainline bluetooth apex module. apex { name: "com.android.bluetooth", defaults: ["com.android.bluetooth-defaults"], manifest: "apex_manifest.json", } } apex_key { apex_key { Loading @@ -35,3 +53,45 @@ android_app_certificate { name: "com.android.bluetooth.certificate", name: "com.android.bluetooth.certificate", certificate: "com.android.bluetooth", certificate: "com.android.bluetooth", } } sdk { name: "bluetooth-module-sdk", bootclasspath_fragments: ["com.android.bluetooth-bootclasspath-fragment"], systemserverclasspath_fragments: ["com.android.bluetooth-systemserverclasspath-fragment"], } // Encapsulate the contributions made by the com.android.bluetooth to the bootclasspath. bootclasspath_fragment { name: "com.android.bluetooth-bootclasspath-fragment", contents: ["framework-bluetooth"], apex_available: ["com.android.bluetooth"], // The bootclasspath_fragments that provide APIs on which this depends. fragments: [ { apex: "com.android.art", module: "art-bootclasspath-fragment", }, ], // Additional stubs libraries that this fragment's contents use which are // not provided by another bootclasspath_fragment. additional_stubs: [ "android-non-updatable", ], // Additional hidden API flag files to override the defaults. This must only be // modified by the Soong or platform compat team. hidden_api: { max_target_o_low_priority: ["hiddenapi/hiddenapi-max-target-o-low-priority.txt"], max_target_r_low_priority: ["hiddenapi/hiddenapi-max-target-r-low-priority.txt"], unsupported: ["hiddenapi/hiddenapi-unsupported.txt"], }, } systemserverclasspath_fragment { name: "com.android.bluetooth-systemserverclasspath-fragment", standalone_contents: ["service-bluetooth"], apex_available: ["com.android.bluetooth"], }