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

Commit 180cbd12 authored by William Escande's avatar William Escande Committed by Gerrit Code Review
Browse files

Merge "[Invisalign] Build changes to split out libbluetooth-core"

parents 0bdc30f2 f84fe540
Loading
Loading
Loading
Loading
+45 −0
Original line number Diff line number Diff line
@@ -79,6 +79,51 @@ cc_library_shared {
    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 {
+47 −22
Original line number Diff line number Diff line
@@ -32,6 +32,9 @@ cc_defaults {
        "packages/modules/Bluetooth/system/gd/rust/shim",
    ],
    header_libs: ["libbluetooth_headers"],
    generated_headers: [
        "BluetoothGeneratedDumpsysDataSchema_h",
    ],
    cflags: ["-DBUILDCFG"],
}

@@ -52,7 +55,6 @@ cc_library_static {
    name: "libbt-bta",
    defaults: ["fluoride_bta_defaults"],
    srcs: [
        ":BtaDmSources",
        "ag/bta_ag_act.cc",
        "ag/bta_ag_api.cc",
        "ag/bta_ag_at.cc",
@@ -71,20 +73,6 @@ cc_library_static {
        "av/bta_av_main.cc",
        "av/bta_av_ssm.cc",
        "csis/csis_client.cc",
        "gatt/bta_gattc_act.cc",
        "gatt/bta_gattc_api.cc",
        "gatt/bta_gattc_cache.cc",
        "gatt/bta_gattc_db_storage.cc",
        "gatt/bta_gattc_main.cc",
        "gatt/bta_gattc_queue.cc",
        "gatt/bta_gattc_utils.cc",
        "gatt/bta_gatts_act.cc",
        "gatt/bta_gatts_api.cc",
        "gatt/bta_gatts_main.cc",
        "gatt/bta_gatts_queue.cc",
        "gatt/bta_gatts_utils.cc",
        "gatt/database.cc",
        "gatt/database_builder.cc",
        "groups/groups.cc",
        "vc/device.cc",
        "vc/vc.cc",
@@ -129,13 +117,49 @@ cc_library_static {
        "hd/bta_hd_act.cc",
        "hd/bta_hd_api.cc",
        "hd/bta_hd_main.cc",
        "jv/bta_jv_act.cc",
        "jv/bta_jv_api.cc",
        "jv/bta_jv_cfg.cc",
        "pan/bta_pan_act.cc",
        "pan/bta_pan_api.cc",
        "pan/bta_pan_ci.cc",
        "pan/bta_pan_main.cc",
    ],
    cflags: [
        /* we export all classes, so change default visibility, instead of having EXPORT_SYMBOL on each class*/
        "-fvisibility=default",
    ],
    static_libs: [
        "avrcp-target-service",
        "lib-bt-packets",
        "libbt-bta-core",
    ],
    generated_headers: [
        "LeAudioSetConfigSchemas_h",
    ],
    host_supported: true,
    min_sdk_version: "Tiramisu"
}

cc_library_static {
    name: "libbt-bta-core",
    defaults: ["fluoride_bta_defaults"],
    srcs: [
        ":BtaDmSources",
        "gatt/bta_gattc_act.cc",
        "gatt/bta_gattc_api.cc",
        "gatt/bta_gattc_cache.cc",
        "gatt/bta_gattc_db_storage.cc",
        "gatt/bta_gattc_main.cc",
        "gatt/bta_gattc_queue.cc",
        "gatt/bta_gattc_utils.cc",
        "gatt/bta_gatts_act.cc",
        "gatt/bta_gatts_api.cc",
        "gatt/bta_gatts_main.cc",
        "gatt/bta_gatts_queue.cc",
        "gatt/bta_gatts_utils.cc",
        "gatt/database.cc",
        "gatt/database_builder.cc",
        "jv/bta_jv_act.cc",
        "jv/bta_jv_api.cc",
        "jv/bta_jv_cfg.cc",
        "sdp/bta_sdp.cc",
        "sdp/bta_sdp_act.cc",
        "sdp/bta_sdp_api.cc",
@@ -144,13 +168,13 @@ cc_library_static {
        "sys/bta_sys_main.cc",
        "sys/utl.cc",
    ],
    cflags: [
        /* we export all classes, so change default visibility, instead of having EXPORT_SYMBOL on each class*/
        "-fvisibility=default",
    ],
    static_libs: [
        "avrcp-target-service",
        "lib-bt-packets",
    ],
    generated_headers: [
        "LeAudioSetConfigSchemas_h",
    ],
    host_supported: true,
    min_sdk_version: "Tiramisu"
}
@@ -184,6 +208,7 @@ cc_test {
        "crypto_toolbox_for_tests",
        "libbtcore",
        "libbt-bta",
        "libbt-bta-core",
        "libbt-audio-hal-interface",
        "libbluetooth-types",
        "libbt-protos-lite",
+23 −1
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ cc_defaults {
    ],
    srcs: [
        "src/device_class.cc",
        "src/hal_util.cc",
        "src/module.cc",
        "src/osi_module.cc",
        "src/property.cc",
@@ -35,6 +34,29 @@ cc_defaults {
    },
}

cc_library_static {
    name: "libbthalutils",
    defaults: ["fluoride_basic_defaults"],
    srcs: [
        "src/hal_util.cc",
    ],
    local_include_dirs: ["include"],
    include_dirs: [
        "packages/modules/Bluetooth/system",
        "packages/modules/Bluetooth/system/gd",
    ],
    header_libs: ["libbluetooth_headers"],
    host_supported: true,
    apex_available: [
        "com.android.btservices",
    ],
    target: {
        host_linux: {
            cflags: ["-D_GNU_SOURCE"],
        },
    },
}

cc_library_static {
    name: "libbtcore",
    visibility:[
+81 −38
Original line number Diff line number Diff line
@@ -87,19 +87,17 @@ genrule {
}

// libbtif static library for target
cc_defaults {
    name: "libbtif_defaults",

cc_library_static {
    name: "libbtif",
    defaults: ["fluoride_basic_defaults"],
    include_dirs: btifCommonIncludes,
    srcs: [
        // AVRCP Target Service
        "avrcp/avrcp_service.cc",
        // Callouts
        "co/bta_dm_co.cc",
        "co/bta_av_co.cc",
        "co/bta_hh_co.cc",
        "co/bta_pan_co.cc",
        "co/bta_gatts_co.cc",
        // HAL layer
        "src/bluetooth.cc",
        "src/bluetooth_data_migration.cc",
@@ -108,8 +106,72 @@ cc_defaults {
        "src/btif_a2dp_control.cc",
        "src/btif_a2dp_sink.cc",
        "src/btif_a2dp_source.cc",
        "src/btif_activity_attribution.cc",
        "src/btif_av.cc",
        "src/btif_csis_client.cc",
        "src/btif_vc.cc",
        "src/btif_has_client.cc",
        "src/btif_hearing_aid.cc",
        "src/btif_hf.cc",
        "src/btif_hf_client.cc",
        "src/btif_hh.cc",
        "src/btif_hd.cc",
        "src/btif_le_audio.cc",
        "src/btif_le_audio_broadcaster.cc",
        "src/btif_pan.cc",
        "src/btif_profile_queue.cc",
        "src/btif_profile_storage.cc",
        "src/btif_rc.cc",
        "src/profile_log_levels.cc",
    ],
    generated_headers: [
        "BluetoothGeneratedDumpsysDataSchema_h",
        "BluetoothGeneratedPackets_h",
    ],
    local_include_dirs: [
        "include"
    ],
    target: {
        android: {
            whole_static_libs: [
                "libPlatformProperties",
            ],
            srcs: ["src/btif_avrcp_audio_track.cc"],
        },
        host: {
            srcs: [
                     "src/btif_avrcp_audio_track_linux.cc",
                     "src/btif_leaudio_hal_version_host.cc",
                  ],
        },
    },
    static_libs: [
        "avrcp-target-service",
        "lib-bt-packets",
        "lib-bt-packets-base",
        "lib-bt-packets-avrcp",
        "libbt-audio-hal-interface",
        "libbt-stack",
        "libbt-stack-core",
        "libbtif-core",
        "libaudio-a2dp-hw-utils",
    ],
    cflags: [
        "-DBUILDCFG",
    ],
    host_supported: true,
    min_sdk_version: "Tiramisu"
}

cc_library_static {
    name: "libbtif-core",
    defaults: ["fluoride_basic_defaults"],
    include_dirs: btifCommonIncludes,
    srcs: [
        // Callouts
        "co/bta_dm_co.cc",
        "co/bta_gatts_co.cc",
        // BTIF implementation
        "src/btif_activity_attribution.cc",
        "src/btif_ble_advertiser.cc",
        "src/btif_ble_scanner.cc",
        "src/btif_bqr.cc",
@@ -117,7 +179,6 @@ cc_defaults {
        "src/btif_config_cache.cc",
        "src/btif_config_transcode.cc",
        "src/btif_core.cc",
        "src/btif_csis_client.cc",
        "src/btif_debug_conn.cc",
        "src/btif_dm.cc",
        "src/btif_gatt.cc",
@@ -125,20 +186,8 @@ cc_defaults {
        "src/btif_gatt_server.cc",
        "src/btif_gatt_test.cc",
        "src/btif_gatt_util.cc",
        "src/btif_vc.cc",
        "src/btif_has_client.cc",
        "src/btif_hearing_aid.cc",
        "src/btif_hf.cc",
        "src/btif_hf_client.cc",
        "src/btif_hh.cc",
        "src/btif_hd.cc",
        "src/btif_le_audio.cc",
        "src/btif_le_audio_broadcaster.cc",
        "src/btif_metrics_logging.cc",
        "src/btif_pan.cc",
        "src/btif_profile_queue.cc",
        "src/btif_profile_storage.cc",
        "src/btif_rc.cc",
        "src/btif_sdp.cc",
        "src/btif_sdp_server.cc",
        "src/btif_sock.cc",
@@ -152,16 +201,12 @@ cc_defaults {
        "src/btif_uid.cc",
        "src/btif_util.cc",
        "src/btif_keystore.cc",
        "src/profile_log_levels.cc",
        "src/stack_manager.cc",
    ],
    generated_headers: [
        "BluetoothGeneratedDumpsysDataSchema_h",
        "BluetoothGeneratedPackets_h",
    ],
    local_include_dirs: [
        "include"
    ],
    target: {
        android: {
            whole_static_libs: [
@@ -177,23 +222,18 @@ cc_defaults {
        },
    },
    static_libs: [
        "avrcp-target-service",
        "lib-bt-packets",
        "lib-bt-packets-base",
        "lib-bt-packets-avrcp",
        "libbt-audio-hal-interface",
        "libbt-stack",
        "libbt-stack-core",
        "libaudio-a2dp-hw-utils",
    ],
    cflags: [
        /* we export all classes, so change default visibility, instead of having EXPORT_SYMBOL on each class*/
        "-fvisibility=default",
        "-DBUILDCFG",
    ],
    host_supported: true,
}

cc_library_static {
    name: "libbtif",
    defaults: ["libbtif_defaults"],
    min_sdk_version: "Tiramisu"
}

@@ -229,6 +269,9 @@ cc_test {
        "libbluetooth-types",
        "libbt-audio-hal-interface",
        "libbt-bta",
        "libbt-bta-core",
        "libbtif",
        "libbtif-core",
        "libbt-common",
        "libbtcore",
        "libbtdevice",
@@ -237,6 +280,7 @@ cc_test {
        "libbt-sbc-decoder",
        "libbt-sbc-encoder",
        "libbt-stack",
        "libbt-stack-core",
        "libbt-utils",
        "libFraunhoferAAC",
        "libg722codec",
@@ -245,7 +289,6 @@ cc_test {
        "libudrv-uipc",
   ],
    whole_static_libs: [
        "libbtif",
        "libbluetooth-dumpsys",
        "libbluetooth-for-tests",
    ],
@@ -481,9 +524,6 @@ cc_test {
          "liblog",
          "libtinyxml2",
      ],
      whole_static_libs: [
          "libbtif",
      ],
      static_libs: [
          "android.hardware.bluetooth.a2dp@1.0",
          "avrcp-target-service",
@@ -493,6 +533,9 @@ cc_test {
          "libbt-sbc-decoder",
          "libbt-sbc-encoder",
          "libbt-stack",
          "libbt-stack-core",
          "libbtif",
          "libbtif-core",
          "libbtdevice",
          "lib-bt-packets",
          "lib-bt-packets-avrcp",
@@ -604,9 +647,6 @@ cc_test {
          "liblog",
          "libtinyxml2",
      ],
      whole_static_libs: [
          "libbtif",
      ],
      static_libs: [
          "android.hardware.bluetooth.a2dp@1.0",
          "avrcp-target-service",
@@ -615,7 +655,10 @@ cc_test {
          "libbt-audio-hal-interface",
          "libbt-sbc-decoder",
          "libbt-sbc-encoder",
          "libbtif",
          "libbtif-core",
          "libbt-stack",
          "libbt-stack-core",
          "libbtdevice",
          "lib-bt-packets",
          "lib-bt-packets-avrcp",
+3 −1
Original line number Diff line number Diff line
@@ -33,6 +33,9 @@ static_library("btif") {
    # HAL layer
    "src/bluetooth.cc",

    # Initializing core library
    "src/profile_log_levels.cc",

    # BTIF implementation
    "src/btif_a2dp.cc",

@@ -87,7 +90,6 @@ static_library("btif") {
    "src/btif_storage.cc",
    "src/btif_uid.cc",
    "src/btif_util.cc",
    "src/profile_log_levels.cc",
    "src/stack_manager.cc",
  ]

Loading