Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b3bed84 authored by William Escande's avatar William Escande
Browse files

Modify apex_available to Bluetooth apex

Bluetooth apex name has changed from com.android.btservices to
com.android.bt. We now need to update the reference in the code.


for i in `fd Android.bp`
do
  perl -i -0pe "s/(apex_available: \[[^\]]*\")com.android.btservices(\"[^\]]*])/\1com.android.bt\2/g" $i # to replace btservices by bt
  perl -i -0pe "s/apex_available: \[\n *\"com.android.bt\",\n *\],/apex_available: [\"com.android.bt\"],/g" $i # to reduce the 3 lines into 1 when bt is the only apex available
done

Bug: 383863941
Flag: Exempt build infra
Test: m .
Change-Id: Ib9a8e1f5d4b31edbfd66273b09e45329a0122508
parent f7903793
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -23,9 +23,7 @@ java_defaults {
        "androidx.annotation_annotation",
        "modules-utils-build",
    ],
    apex_available: [
        "com.android.btservices",
    ],
    apex_available: ["com.android.bt"],
    min_sdk_version: "Tiramisu",
}

+8 −22
Original line number Diff line number Diff line
@@ -32,9 +32,7 @@ java_library {
    name: "bluetooth.mapsapi",

    srcs: ["lib/mapapi/**/*.java"],
    apex_available: [
        "com.android.btservices",
    ],
    apex_available: ["com.android.bt"],
    min_sdk_version: "Tiramisu",
    sdk_version: "module_current",
    lint: {
@@ -47,9 +45,7 @@ java_library {

    srcs: [":framework-mms-shared-srcs"],
    libs: ["unsupportedappusage"],
    apex_available: [
        "com.android.btservices",
    ],
    apex_available: ["com.android.bt"],
    min_sdk_version: "Tiramisu",
    sdk_version: "module_current",
    lint: {
@@ -80,7 +76,7 @@ cc_library_shared {
        "packages/modules/Bluetooth/system",
        "packages/modules/Bluetooth/system/gd",
    ],
    // libbluetooth_jni is the jni lib included in the btservices apex.
    // libbluetooth_jni is the jni lib included in the com.android.bt apex.
    // As this library is inside an APEX the shared_libs that does not
    // expose stubs are copied inside it. As a result using those as
    // shared libraries is less interesting as they are not shared, so we link
@@ -164,9 +160,7 @@ cc_library_shared {
    sanitize: {
        scs: true,
    },
    apex_available: [
        "com.android.btservices",
    ],
    apex_available: ["com.android.bt"],
    min_sdk_version: "Tiramisu",
}

@@ -200,9 +194,7 @@ cc_library {
    sanitize: {
        scs: true,
    },
    apex_available: [
        "com.android.btservices",
    ],
    apex_available: ["com.android.bt"],
    host_supported: true,
    min_sdk_version: "Tiramisu",
}
@@ -342,9 +334,7 @@ android_app {
        proguard_compatibility: true,
        proguard_flags_files: ["proguard.flags"],
    },
    apex_available: [
        "com.android.btservices",
    ],
    apex_available: ["com.android.bt"],
    min_sdk_version: "Tiramisu",
    sdk_version: "module_current",
    updatable: true,
@@ -358,9 +348,7 @@ java_library {
    libs: [
        "app-compat-annotations",
    ],
    apex_available: [
        "com.android.btservices",
    ],
    apex_available: ["com.android.bt"],
    min_sdk_version: "Tiramisu",
    sdk_version: "module_current",
}
@@ -379,9 +367,7 @@ java_library {
    srcs: [
        ":srcs_bluetooth_protos",
    ],
    apex_available: [
        "com.android.btservices",
    ],
    apex_available: ["com.android.bt"],
    min_sdk_version: "Tiramisu",
    sdk_version: "module_current",
}
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ java_library {
        "bluetooth/constants/aics/GainMode.aidl",
        "bluetooth/constants/aics/Mute.aidl",
    ],
    apex_available: ["com.android.btservices"],
    apex_available: ["com.android.bt"],
    min_sdk_version: "Tiramisu",
    sdk_version: "module_current",
    visibility: ["//packages/modules/Bluetooth:__subpackages__"],
+3 −3
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ java_aconfig_library {
    name: "bluetooth_flags_java_lib",
    aconfig_declarations: "bluetooth_aconfig_flags",
    visibility: ["//packages/modules/Bluetooth:__subpackages__"],
    apex_available: ["com.android.btservices"],
    apex_available: ["com.android.bt"],
    libs: ["framework-configinfrastructure.stubs.module_lib"],
    sdk_version: "module_current",
    min_sdk_version: "Tiramisu",
@@ -83,7 +83,7 @@ cc_aconfig_library {
    aconfig_declarations: "bluetooth_aconfig_flags",
    host_supported: true,
    visibility: ["//packages/modules/Bluetooth:__subpackages__"],
    apex_available: ["com.android.btservices"],
    apex_available: ["com.android.bt"],
    min_sdk_version: "Tiramisu",
}

@@ -101,7 +101,7 @@ rust_aconfig_library {
    host_supported: true,
    crate_name: "bluetooth_aconfig_flags_rust",
    aconfig_declarations: "bluetooth_aconfig_flags",
    apex_available: ["com.android.btservices"],
    apex_available: ["com.android.bt"],
    min_sdk_version: "Tiramisu",
    visibility: ["//packages/modules/Bluetooth/system:__subpackages__"],
}
+1 −3
Original line number Diff line number Diff line
@@ -82,9 +82,7 @@ java_sdk_library {
        ":__subpackages__",
    ],

    apex_available: [
        "com.android.btservices",
    ],
    apex_available: ["com.android.bt"],

    permitted_packages: [
        "android.bluetooth",
Loading