Make libbinder_rs vendor available.
Add vendor_available: true to libbinder_rs and dependencies.
Also remove set_requesting_sid conditionally if building the vendor
variant.
Test: Vendor components can compile and link against libbinder_rs.
Bug: 198197213
Change-Id: I9ad9ed226e76c16bff7d3feb201fd9fef20ad934
diff --git a/libs/binder/rust/src/native.rs b/libs/binder/rust/src/native.rs
index a91092e..efa9546 100644
--- a/libs/binder/rust/src/native.rs
+++ b/libs/binder/rust/src/native.rs
@@ -212,7 +212,7 @@
/// Mark this binder object with local stability, which is vendor if we are
/// building for the VNDK and system otherwise.
- #[cfg(vendor_ndk)]
+ #[cfg(any(vendor_ndk, android_vndk))]
fn mark_local_stability(&mut self) {
unsafe {
// Safety: Self always contains a valid `AIBinder` pointer, so
@@ -223,7 +223,7 @@
/// Mark this binder object with local stability, which is vendor if we are
/// building for the VNDK and system otherwise.
- #[cfg(not(vendor_ndk))]
+ #[cfg(not(any(vendor_ndk, android_vndk)))]
fn mark_local_stability(&mut self) {
unsafe {
// Safety: Self always contains a valid `AIBinder` pointer, so