Loading libs/binder/rust/src/binder.rs +11 −1 Original line number Diff line number Diff line Loading @@ -532,7 +532,17 @@ macro_rules! declare_binder_interface { } fn on_transact(&self, code: $crate::TransactionCode, data: &$crate::Parcel, reply: &mut $crate::Parcel) -> $crate::Result<()> { $on_transact(&*self.0, code, data, reply) match $on_transact(&*self.0, code, data, reply) { // The C++ backend converts UNEXPECTED_NULL into an exception Err($crate::StatusCode::UNEXPECTED_NULL) => { let status = $crate::Status::new_exception( $crate::ExceptionCode::NULL_POINTER, None, ); reply.write(&status) }, result => result } } fn get_class() -> $crate::InterfaceClass { Loading libs/binder/rust/src/proxy.rs +4 −1 Original line number Diff line number Diff line Loading @@ -352,7 +352,10 @@ impl SerializeArray for Option<&SpIBinder> {} impl Deserialize for SpIBinder { fn deserialize(parcel: &Parcel) -> Result<SpIBinder> { parcel.read_binder().transpose().unwrap() parcel .read_binder() .transpose() .unwrap_or(Err(StatusCode::UNEXPECTED_NULL)) } } Loading Loading
libs/binder/rust/src/binder.rs +11 −1 Original line number Diff line number Diff line Loading @@ -532,7 +532,17 @@ macro_rules! declare_binder_interface { } fn on_transact(&self, code: $crate::TransactionCode, data: &$crate::Parcel, reply: &mut $crate::Parcel) -> $crate::Result<()> { $on_transact(&*self.0, code, data, reply) match $on_transact(&*self.0, code, data, reply) { // The C++ backend converts UNEXPECTED_NULL into an exception Err($crate::StatusCode::UNEXPECTED_NULL) => { let status = $crate::Status::new_exception( $crate::ExceptionCode::NULL_POINTER, None, ); reply.write(&status) }, result => result } } fn get_class() -> $crate::InterfaceClass { Loading
libs/binder/rust/src/proxy.rs +4 −1 Original line number Diff line number Diff line Loading @@ -352,7 +352,10 @@ impl SerializeArray for Option<&SpIBinder> {} impl Deserialize for SpIBinder { fn deserialize(parcel: &Parcel) -> Result<SpIBinder> { parcel.read_binder().transpose().unwrap() parcel .read_binder() .transpose() .unwrap_or(Err(StatusCode::UNEXPECTED_NULL)) } } Loading