libbinder_rs: Add Strong<> and Weak<> Binder references
Adds Strong<dyn Interface> and Weak<dyn Interface> references for Binder
interfaces. These structs are equivalent to sp<Interface> and
wp<Interface> in C++.
Bug: 175584883
Test: atest -p frameworks/native/libs/binder/TEST_MAPPING
Change-Id: Icf1b3acf0d8c82d541281a5aae9814372a5ab800
diff --git a/libs/binder/rust/src/lib.rs b/libs/binder/rust/src/lib.rs
index edfb56a..43a237a 100644
--- a/libs/binder/rust/src/lib.rs
+++ b/libs/binder/rust/src/lib.rs
@@ -107,7 +107,8 @@
pub mod parcel;
pub use crate::binder::{
- FromIBinder, IBinder, Interface, InterfaceClass, Remotable, TransactionCode, TransactionFlags,
+ FromIBinder, IBinder, Interface, InterfaceClass, Remotable, Strong, TransactionCode,
+ TransactionFlags, Weak,
};
pub use error::{status_t, ExceptionCode, Result, Status, StatusCode};
pub use native::add_service;
@@ -122,7 +123,8 @@
pub use super::parcel::ParcelFileDescriptor;
pub use super::{add_service, get_interface};
pub use super::{
- ExceptionCode, Interface, ProcessState, SpIBinder, Status, StatusCode, WpIBinder,
+ ExceptionCode, Interface, ProcessState, SpIBinder, Status, StatusCode, Strong, ThreadState,
+ Weak, WpIBinder,
};
/// Binder result containing a [`Status`] on error.