Loading libs/binder/rust/binder_tokio/lib.rs +6 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,12 @@ impl BinderAsyncPool for Tokio { // // This shouldn't cause issues with blocking the thread as only one task will run in a // call to `block_on`, so there aren't other tasks to block. let result = spawn_me(); // // If the `block_in_place` call fails, then you are driving a current-thread runtime on // the binder threadpool. Instead, it is recommended to use `TokioRuntime<Handle>` when // the runtime is a current-thread runtime, as the current-thread runtime can be driven // only by `Runtime::block_on` calls and not by `Handle::block_on`. let result = tokio::task::block_in_place(spawn_me); Box::pin(after_spawn(result)) } else { let handle = tokio::task::spawn_blocking(spawn_me); Loading libs/binder/rust/src/binder.rs +1 −11 Original line number Diff line number Diff line Loading @@ -1023,18 +1023,8 @@ macro_rules! declare_binder_interface { } if ibinder.associate_class(<$native as $crate::binder_impl::Remotable>::get_class()) { let service: std::result::Result<$crate::binder_impl::Binder<$native>, $crate::StatusCode> = std::convert::TryFrom::try_from(ibinder.clone()); if let Ok(service) = service { // We were able to associate with our expected class and // the service is local. todo!() //return Ok($crate::Strong::new(Box::new(service))); } else { // Service is remote return Ok($crate::Strong::new(Box::new(<$proxy as $crate::binder_impl::Proxy>::from_binder(ibinder)?))); } } Err($crate::StatusCode::BAD_TYPE.into()) } Loading Loading
libs/binder/rust/binder_tokio/lib.rs +6 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,12 @@ impl BinderAsyncPool for Tokio { // // This shouldn't cause issues with blocking the thread as only one task will run in a // call to `block_on`, so there aren't other tasks to block. let result = spawn_me(); // // If the `block_in_place` call fails, then you are driving a current-thread runtime on // the binder threadpool. Instead, it is recommended to use `TokioRuntime<Handle>` when // the runtime is a current-thread runtime, as the current-thread runtime can be driven // only by `Runtime::block_on` calls and not by `Handle::block_on`. let result = tokio::task::block_in_place(spawn_me); Box::pin(after_spawn(result)) } else { let handle = tokio::task::spawn_blocking(spawn_me); Loading
libs/binder/rust/src/binder.rs +1 −11 Original line number Diff line number Diff line Loading @@ -1023,18 +1023,8 @@ macro_rules! declare_binder_interface { } if ibinder.associate_class(<$native as $crate::binder_impl::Remotable>::get_class()) { let service: std::result::Result<$crate::binder_impl::Binder<$native>, $crate::StatusCode> = std::convert::TryFrom::try_from(ibinder.clone()); if let Ok(service) = service { // We were able to associate with our expected class and // the service is local. todo!() //return Ok($crate::Strong::new(Box::new(service))); } else { // Service is remote return Ok($crate::Strong::new(Box::new(<$proxy as $crate::binder_impl::Proxy>::from_binder(ibinder)?))); } } Err($crate::StatusCode::BAD_TYPE.into()) } Loading