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

Commit d449017e authored by Chris Manton's avatar Chris Manton
Browse files

IA2: Separate do_in_main_thread into library

Remove main thread code from libbt-stack as
it is used throughout the entire stack
including jni library.

Bug: 301709692
Test: m .

Change-Id: I864db0e12e5ca7636e2a0076a0483e750e60df65
parent b18e965a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -104,6 +104,7 @@ cc_library_shared {
        "libbt-audio-hal-interface",
        "libbt-bta",
        "libbt-bta-core",
        "libbt-btu-main-thread",
        "libbt-common",
        "libbt-hci",
        "libbt-sbc-decoder",
+1 −0
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ cc_defaults {
        "libbt-audio-hal-interface",
        "libbt-bta",
        "libbt-bta-core",
        "libbt-btu-main-thread",
        "libbt-common",
        "libbt-hci",
        "libbt-sbc-decoder",
+1 −0
Original line number Diff line number Diff line
@@ -293,6 +293,7 @@ cc_test {
        "libbt-audio-hal-interface",
        "libbt-bta",
        "libbt-bta-core",
        "libbt-btu-main-thread",
        "libbt-common",
        "libbt-hci",
        "libbt-sbc-decoder",
+1 −1
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ rust_defaults {
        "libbt-audio-hal-interface",
        "libbt-bta",
        "libbt-bta-core",
        "libbt-btu-main-thread",
        "libbt-common",
        "libbt-hci",
        "libbt-sbc-decoder",
@@ -58,7 +59,6 @@ rust_defaults {
        "libbt-stack-core",
        "libbt_shim_bridge",
        "libbt_topshim_cxx",
        "libbt_topshim_cxx",
        "libbtcore",
        "libbtdevice",
        "libbte",
+29 −1
Original line number Diff line number Diff line
@@ -30,6 +30,31 @@ cc_test_library {
    header_libs: ["libbluetooth_headers"],
}

cc_library_static {
    name: "libbt-btu-main-thread",
    defaults: ["fluoride_defaults"],
    srcs: ["btu/btu_task.cc"],
    include_dirs: [
        "packages/modules/Bluetooth/system",
        "packages/modules/Bluetooth/system/gd",
        "packages/modules/Bluetooth/system/include",
        "packages/modules/Bluetooth/system/internal_include",
        "packages/modules/Bluetooth/system/stack/include",
        "packages/modules/Bluetooth/system/types",
    ],
    static_libs: [
        "libbt_shim_bridge",
    ],
    shared_libs: [
        "libchrome",
    ],
    apex_available: [
        "com.android.btservices",
    ],
    host_supported: true,
    min_sdk_version: "Tiramisu",
}

// Bluetooth stack static library for target
cc_library_static {
    name: "libbt-stack",
@@ -136,6 +161,7 @@ cc_library_static {
    ],
    static_libs: [
        "libbluetooth_hci_pdl",
        "libbt-btu-main-thread",
        "libbt-hci",
        "libbt-platform-protos-lite",
        "libbt-stack-core",
@@ -235,7 +261,6 @@ cc_library_static {
        "btm/btm_sec.cc",
        "btu/btu_event.cc",
        "btu/btu_hcif.cc",
        "btu/btu_task.cc",
        "eatt/eatt.cc",
        "gap/gap_ble.cc",
        "gap/gap_conn.cc",
@@ -699,6 +724,7 @@ cc_test {
        "libbt-audio-hal-interface",
        "libbt-bta",
        "libbt-bta-core",
        "libbt-btu-main-thread",
        "libbt-common",
        "libbt-hci",
        "libbt-sbc-decoder",
@@ -785,6 +811,7 @@ cc_test {
        "libbluetooth_hci_pdl",
        "libbluetooth_l2cap_pdl",
        "libbluetooth_smp_pdl",
        "libbt-btu-main-thread",
        "libbt-common",
        "libbt-platform-protos-lite",
        "libbt_shim_bridge",
@@ -871,6 +898,7 @@ cc_test {
        "libbluetooth_hci_pdl",
        "libbluetooth_l2cap_pdl",
        "libbluetooth_smp_pdl",
        "libbt-btu-main-thread",
        "libbt-platform-protos-lite",
        "libbt_shim_bridge",
        "libbt_shim_ffi",
Loading