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

Commit 22761eca authored by Zach Johnson's avatar Zach Johnson
Browse files

rusty-gd: back message loop thread with rust, if rust enabled

the rust code runs in a single threaded environment.
since the main thread is now implicitly running in this environment too,
this means we no longer need to transfer contexts in the shim

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run
Change-Id: I05ec50c525184c29627e1eaff2b62bac0b879416
parent 074d0512
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ cc_library_static {
        "packages/modules/Bluetooth/system/bta/sys",
        "packages/modules/Bluetooth/system/btif/include",
        "packages/modules/Bluetooth/system/stack/include",
        "packages/modules/Bluetooth/system/gd/rust/shim",
    ],
    srcs: [
        "a2dp_encoding.cc",
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ cc_defaults {
        "packages/modules/Bluetooth/system/udrv/include",
        "packages/modules/Bluetooth/system/vnd/include",
        "packages/modules/Bluetooth/system/utils/include",
        "packages/modules/Bluetooth/system/gd/rust/shim",
    ],
    shared_libs: [
        "libcutils",
+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@

#include "bta/hf_client/bta_hf_client_int.h"
#include "bta/include/bta_hf_client_api.h"
#include "common/message_loop_thread.h"

namespace base {
class MessageLoop;
+11 −1
Original line number Diff line number Diff line
@@ -70,10 +70,20 @@ fluoride_defaults {
        },
    },
    defaults: ["fluoride_types_defaults_fuzzable"],
    header_libs: ["libbluetooth_headers"],
    header_libs: ["libbluetooth_headers", "libbt_callbacks_cxx_headers"],
    generated_headers: [
        "libbt_hci_bridge_header",
        "libbt_message_loop_thread_bridge_header",
        "cxx-bridge-header"
    ],
    include_dirs: ["packages/modules/Bluetooth/system/gd/rust/shim"],
    static_libs: [
        "libbluetooth-types",
        "libbt-platform-protos-lite",
        "libbluetooth_rust_interop",
        "liblog",
        "libcutils",
        "libbt_shim_ffi",
    ],
    cpp_std: "c++17",
    sanitize: {
+2 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ cc_library_static {
    include_dirs: [
        "packages/modules/Bluetooth/system",
        "packages/modules/Bluetooth/system/stack/include",
        "packages/modules/Bluetooth/system/gd/rust/shim",
    ],
    srcs: [
        "address_obfuscator.cc",
@@ -37,6 +38,7 @@ cc_test {
    include_dirs: [
        "packages/modules/Bluetooth/system",
        "packages/modules/Bluetooth/system/stack/include",
        "packages/modules/Bluetooth/system/gd/rust/shim",
    ],
    srcs: [
        "address_obfuscator_unittest.cc",
Loading