binder: fix decoding of vintf stability ParcelableHolder
Unlike the C++ implementation, `ParcelableHolder`s in rust are decoded
into a new object. The new object was losing the original stability
level, always reverting to local stability, so vintf parcelables would
fail the assertion.
We could replicate the C++ implementation, but it would require a lot of
API refactoring and it is easy to mess up. Instead, we make the
stability part of the type. This somewhat matches AIDL, where the
stability is a static annotation on the type containing the
`ParcelableHolder`.
Bug: 366383257
Test: m
Change-Id: Ic4654830d404fbf18046660eeb0129ab8abf7e61
diff --git a/libs/binder/rust/src/lib.rs b/libs/binder/rust/src/lib.rs
index e70f4f0..e048696 100644
--- a/libs/binder/rust/src/lib.rs
+++ b/libs/binder/rust/src/lib.rs
@@ -128,9 +128,10 @@
/// without AIDL.
pub mod binder_impl {
pub use crate::binder::{
- IBinderInternal, InterfaceClass, Remotable, Stability, ToAsyncInterface, ToSyncInterface,
- TransactionCode, TransactionFlags, FIRST_CALL_TRANSACTION, FLAG_CLEAR_BUF, FLAG_ONEWAY,
- FLAG_PRIVATE_LOCAL, LAST_CALL_TRANSACTION,
+ IBinderInternal, InterfaceClass, LocalStabilityType, Remotable, Stability, StabilityType,
+ ToAsyncInterface, ToSyncInterface, TransactionCode, TransactionFlags, VintfStabilityType,
+ FIRST_CALL_TRANSACTION, FLAG_CLEAR_BUF, FLAG_ONEWAY, FLAG_PRIVATE_LOCAL,
+ LAST_CALL_TRANSACTION,
};
pub use crate::binder_async::BinderAsyncRuntime;
pub use crate::error::status_t;