binder_tokio: only use threadpool for new transactions

The binder kernel driver will detect whether a binder transaction is
started from a thread that is already handling a transaction, and if-so,
use some special logic to avoid deadlocks. This CL makes the async Rust
wrapper check whether we are handling a transaction before offloading
transactions to the `spawn_blocking` thread pool. This avoids breaking
the deadlock prevention in the kernel.

Test: m
Change-Id: If2707c464a4043c80bd893314113b65ef4633baf
diff --git a/libs/binder/rust/src/lib.rs b/libs/binder/rust/src/lib.rs
index cce55c0..b94dfa1 100644
--- a/libs/binder/rust/src/lib.rs
+++ b/libs/binder/rust/src/lib.rs
@@ -114,7 +114,7 @@
 };
 pub use crate::binder_async::{BoxFuture, BinderAsyncPool};
 pub use error::{status_t, ExceptionCode, Result, Status, StatusCode};
-pub use native::{add_service, force_lazy_services_persist, register_lazy_service, Binder};
+pub use native::{add_service, force_lazy_services_persist, is_handling_transaction, register_lazy_service, Binder};
 pub use parcel::{BorrowedParcel, Parcel};
 pub use proxy::{get_interface, get_service, wait_for_interface, wait_for_service};
 pub use proxy::{AssociateClass, DeathRecipient, Proxy, SpIBinder, WpIBinder};