Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/android/binding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,15 @@ pub unsafe fn onFirstActivityCreateWry(env: JNIEnv, _: JClass) {
if libc::read(fd.as_raw_fd(), buf.as_mut_ptr() as *mut _, buf.len())
== buf.len() as libc::ssize_t
{
// unregister itself on errors
main_pipe.recv().is_ok()
match main_pipe.recv() {
Ok(()) => true,
Err(_error) => {
#[cfg(feature = "tracing")]
tracing::error!("Failed to process Android main pipe message: {_error}");
let _ = main_pipe.env.exception_clear();
false
}
}
} else {
// unregister itself
false
Expand Down
Loading