Fix android_runtime_lock not being cfg guarded (#5244)

The `android_runtime_lock` wasn't properly `cfg` guarded in various
places, so it got included on all operating systems, not just Android by
accident. This causes deadlocks when trying to use `muda`.
This commit is contained in:
Christopher Serr authored and GitHub committed 2026-01-20 14:42:45 -08:00
1 parent d01a820b6f
commit 409d8358b6
3 files changed
+6 -2

No files matched your search

+2 -2
View File
@@ -330,9 +330,9 @@ impl App {
{
// This is a place where wry says it's threadsafe but it's actually not.
// If we're patching the app, we want to make sure it's not going to progress in the interim.
let lock = crate::android_sync_lock::android_runtime_lock();
#[cfg(target_os = "android")]
let _lock = crate::android_sync_lock::android_runtime_lock();
dioxus_devtools::apply_changes(&webview.dom, &hr_msg);
drop(lock);
}
webview.poll_vdom();