Loading android/app/jni/com_android_bluetooth_gatt.cpp +0 −5 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ #include "hardware/bt_gatt.h" #include "rust/cxx.h" #include "rust/src/gatt/ffi/gatt_shim.h" #include "src/core/ffi.rs.h" #include "src/gatt/ffi.rs.h" #include "utils/Log.h" #define info(fmt, ...) ALOGI("%s(L%d): " fmt, __func__, __LINE__, ##__VA_ARGS__) Loading Loading @@ -1393,10 +1392,6 @@ static void initializeNative(JNIEnv* env, jobject object) { JniDistanceMeasurementCallbacks::GetInstance()); mCallbacksObj = env->NewGlobalRef(object); auto callbacks = std::make_unique<bluetooth::gatt::GattServerCallbacks>( sGattServerCallbacks); bluetooth::rust_shim::init(std::move(callbacks)); } static void cleanupNative(JNIEnv* env, jobject object) { Loading system/btif/src/stack_manager.cc +7 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ #include "device/include/interop.h" #include "internal_include/stack_config.h" #include "main/shim/controller.h" #include "rust/src/core/ffi/module.h" #include "stack/include/smp_api.h" #ifndef BT_STACK_CLEANUP_WAIT_MS Loading Loading @@ -214,6 +215,7 @@ extern const module_t gd_idle_module; extern const module_t gd_shim_module; extern const module_t interop_module; extern const module_t osi_module; extern const module_t rust_module; extern const module_t stack_config_module; extern const module_t device_iot_config_module; Loading @@ -230,6 +232,7 @@ const struct module_lookup module_table[] = { {GD_SHIM_MODULE, &gd_shim_module}, {INTEROP_MODULE, &interop_module}, {OSI_MODULE, &osi_module}, {RUST_MODULE, &rust_module}, {STACK_CONFIG_MODULE, &stack_config_module}, {DEVICE_IOT_CONFIG_MODULE, &device_iot_config_module}, {NULL, NULL}, Loading Loading @@ -349,6 +352,8 @@ static void event_start_up_stack(bluetooth::core::CoreInterface* interface, return; } module_start_up(get_local_module(RUST_MODULE)); stack_is_running = true; LOG_INFO("%s finished", __func__); do_in_jni_thread(FROM_HERE, base::Bind(event_signal_stack_up, nullptr)); Loading @@ -366,6 +371,8 @@ static void event_shut_down_stack(ProfileStopCallback stopProfiles) { hack_future = local_hack_future; stack_is_running = false; module_shut_down(get_local_module(RUST_MODULE)); do_in_main_thread(FROM_HERE, base::Bind(&btm_ble_multi_adv_cleanup)); do_in_main_thread(FROM_HERE, base::Bind(&btm_ble_scanner_cleanup)); Loading system/btif/test/btif_core_test.cc +1 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ module_t gd_controller_module; module_t gd_idle_module; module_t gd_shim_module; module_t osi_module; module_t rust_module; namespace { Loading system/btif/test/btif_hh_test.cc +1 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ module_t gd_controller_module; module_t gd_idle_module; module_t gd_shim_module; module_t osi_module; module_t rust_module; const tBTA_AG_RES_DATA tBTA_AG_RES_DATA::kEmpty = {}; Loading system/main/BUILD.gn +1 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,7 @@ target(lib_type, "bluetooth") { "//bt/system/main/shim:LibBluetoothShimSources", "//bt/system/osi", "//bt/system/packet", "//bt/system/rust:core_rs", "//bt/system/stack", "//bt/system/udrv", ] Loading Loading
android/app/jni/com_android_bluetooth_gatt.cpp +0 −5 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ #include "hardware/bt_gatt.h" #include "rust/cxx.h" #include "rust/src/gatt/ffi/gatt_shim.h" #include "src/core/ffi.rs.h" #include "src/gatt/ffi.rs.h" #include "utils/Log.h" #define info(fmt, ...) ALOGI("%s(L%d): " fmt, __func__, __LINE__, ##__VA_ARGS__) Loading Loading @@ -1393,10 +1392,6 @@ static void initializeNative(JNIEnv* env, jobject object) { JniDistanceMeasurementCallbacks::GetInstance()); mCallbacksObj = env->NewGlobalRef(object); auto callbacks = std::make_unique<bluetooth::gatt::GattServerCallbacks>( sGattServerCallbacks); bluetooth::rust_shim::init(std::move(callbacks)); } static void cleanupNative(JNIEnv* env, jobject object) { Loading
system/btif/src/stack_manager.cc +7 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ #include "device/include/interop.h" #include "internal_include/stack_config.h" #include "main/shim/controller.h" #include "rust/src/core/ffi/module.h" #include "stack/include/smp_api.h" #ifndef BT_STACK_CLEANUP_WAIT_MS Loading Loading @@ -214,6 +215,7 @@ extern const module_t gd_idle_module; extern const module_t gd_shim_module; extern const module_t interop_module; extern const module_t osi_module; extern const module_t rust_module; extern const module_t stack_config_module; extern const module_t device_iot_config_module; Loading @@ -230,6 +232,7 @@ const struct module_lookup module_table[] = { {GD_SHIM_MODULE, &gd_shim_module}, {INTEROP_MODULE, &interop_module}, {OSI_MODULE, &osi_module}, {RUST_MODULE, &rust_module}, {STACK_CONFIG_MODULE, &stack_config_module}, {DEVICE_IOT_CONFIG_MODULE, &device_iot_config_module}, {NULL, NULL}, Loading Loading @@ -349,6 +352,8 @@ static void event_start_up_stack(bluetooth::core::CoreInterface* interface, return; } module_start_up(get_local_module(RUST_MODULE)); stack_is_running = true; LOG_INFO("%s finished", __func__); do_in_jni_thread(FROM_HERE, base::Bind(event_signal_stack_up, nullptr)); Loading @@ -366,6 +371,8 @@ static void event_shut_down_stack(ProfileStopCallback stopProfiles) { hack_future = local_hack_future; stack_is_running = false; module_shut_down(get_local_module(RUST_MODULE)); do_in_main_thread(FROM_HERE, base::Bind(&btm_ble_multi_adv_cleanup)); do_in_main_thread(FROM_HERE, base::Bind(&btm_ble_scanner_cleanup)); Loading
system/btif/test/btif_core_test.cc +1 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ module_t gd_controller_module; module_t gd_idle_module; module_t gd_shim_module; module_t osi_module; module_t rust_module; namespace { Loading
system/btif/test/btif_hh_test.cc +1 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ module_t gd_controller_module; module_t gd_idle_module; module_t gd_shim_module; module_t osi_module; module_t rust_module; const tBTA_AG_RES_DATA tBTA_AG_RES_DATA::kEmpty = {}; Loading
system/main/BUILD.gn +1 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,7 @@ target(lib_type, "bluetooth") { "//bt/system/main/shim:LibBluetoothShimSources", "//bt/system/osi", "//bt/system/packet", "//bt/system/rust:core_rs", "//bt/system/stack", "//bt/system/udrv", ] Loading