add Rust async code generation
Test: golden tests
Change-Id: I3ea52393fb54d9d4d513f09f93454d7f1510c286
diff --git a/aidl_to_rust.cpp b/aidl_to_rust.cpp
index 309128c..283b820 100644
--- a/aidl_to_rust.cpp
+++ b/aidl_to_rust.cpp
@@ -166,8 +166,26 @@
return true;
}
+std::string RustLifetimeName(Lifetime lifetime) {
+ switch (lifetime) {
+ case Lifetime::NONE:
+ return "";
+ case Lifetime::A:
+ return "'a ";
+ }
+}
+
+std::string RustLifetimeGeneric(Lifetime lifetime) {
+ switch (lifetime) {
+ case Lifetime::NONE:
+ return "";
+ case Lifetime::A:
+ return "<'a>";
+ }
+}
+
std::string RustNameOf(const AidlTypeSpecifier& type, const AidlTypenames& typenames,
- StorageMode mode) {
+ StorageMode mode, Lifetime lifetime) {
std::string rust_name;
if (type.IsArray() || typenames.IsList(type)) {
StorageMode element_mode;
@@ -199,7 +217,7 @@
if (mode == StorageMode::IN_ARGUMENT || mode == StorageMode::UNSIZED_ARGUMENT) {
// If this is a nullable input argument, put the reference inside the option,
// e.g., `Option<&str>` instead of `&Option<str>`
- rust_name = "&" + rust_name;
+ rust_name = "&" + RustLifetimeName(lifetime) + rust_name;
}
if (type.IsNullable() ||
@@ -216,7 +234,7 @@
}
if (mode == StorageMode::OUT_ARGUMENT || mode == StorageMode::INOUT_ARGUMENT) {
- rust_name = "&mut " + rust_name;
+ rust_name = "&" + RustLifetimeName(lifetime) + "mut " + rust_name;
}
return rust_name;
diff --git a/aidl_to_rust.h b/aidl_to_rust.h
index 7ba6d75..6145122 100644
--- a/aidl_to_rust.h
+++ b/aidl_to_rust.h
@@ -42,6 +42,11 @@
AS_DEREF,
};
+enum class Lifetime {
+ NONE,
+ A,
+};
+
inline bool IsReference(ReferenceMode ref_mode) {
switch (ref_mode) {
case ReferenceMode::REF:
@@ -57,10 +62,19 @@
std::string ConstantValueDecoratorRef(const AidlTypeSpecifier& type, const std::string& raw_value);
+// Returns "'lifetime_name " including the initial apostrophe and the trailing space.
+// Returns empty string for NONE.
+std::string RustLifetimeName(Lifetime lifetime);
+
+// Returns "<'lifetime_name>" or empty string for NONE.
+std::string RustLifetimeGeneric(Lifetime lifetime);
+
// Returns the Rust type signature of the AIDL type spec
// This includes generic type parameters with array modifiers.
+//
+// The lifetime argument is used to annotate all references.
std::string RustNameOf(const AidlTypeSpecifier& aidl, const AidlTypenames& typenames,
- StorageMode mode);
+ StorageMode mode, Lifetime lifetime);
StorageMode ArgumentStorageMode(const AidlArgument& arg, const AidlTypenames& typenames);
diff --git a/generate_rust.cpp b/generate_rust.cpp
index b49503d..721ed18 100644
--- a/generate_rust.cpp
+++ b/generate_rust.cpp
@@ -83,63 +83,86 @@
out << "}\n";
}
-string BuildArg(const AidlArgument& arg, const AidlTypenames& typenames) {
+string BuildArg(const AidlArgument& arg, const AidlTypenames& typenames, Lifetime lifetime) {
// We pass in parameters that are not primitives by const reference.
// Arrays get passed in as slices, which is handled in RustNameOf.
auto arg_mode = ArgumentStorageMode(arg, typenames);
- auto arg_type = RustNameOf(arg.GetType(), typenames, arg_mode);
+ auto arg_type = RustNameOf(arg.GetType(), typenames, arg_mode, lifetime);
return kArgumentPrefix + arg.GetName() + ": " + arg_type;
}
-string BuildMethod(const AidlMethod& method, const AidlTypenames& typenames) {
- auto method_type = RustNameOf(method.GetType(), typenames, StorageMode::VALUE);
+enum class MethodKind {
+ // This is a normal non-async method.
+ NORMAL,
+ // This is an async function, using a Box to return it via the trait.
+ BOXED_FUTURE,
+ // This could have been a non-async method, but it returns a Future so that
+ // it would not be breaking to make the function do async stuff in the future.
+ READY_FUTURE,
+};
+
+string BuildMethod(const AidlMethod& method, const AidlTypenames& typenames,
+ const MethodKind kind = MethodKind::NORMAL) {
+ // We need to mark the arguments with a lifetime only when returning a future that
+ // actually captures the arguments.
+ Lifetime lifetime;
+ switch (kind) {
+ case MethodKind::NORMAL:
+ lifetime = Lifetime::NONE;
+ break;
+ case MethodKind::BOXED_FUTURE:
+ lifetime = Lifetime::A;
+ break;
+ case MethodKind::READY_FUTURE:
+ lifetime = Lifetime::NONE;
+ break;
+ }
+
+ auto method_type = RustNameOf(method.GetType(), typenames, StorageMode::VALUE, lifetime);
auto return_type = string{"binder::public_api::Result<"} + method_type + ">";
+
+ switch (kind) {
+ case MethodKind::NORMAL:
+ // Don't wrap the return type in anything.
+ break;
+ case MethodKind::BOXED_FUTURE:
+ return_type = "binder::BoxFuture<'a, " + return_type + ">";
+ break;
+ case MethodKind::READY_FUTURE:
+ return_type = "std::future::Ready<" + return_type + ">";
+ break;
+ }
+
+ string parameters = "&" + RustLifetimeName(lifetime) + "self";
+ string lifetime_str = RustLifetimeGeneric(lifetime);
+
+ for (const std::unique_ptr<AidlArgument>& arg : method.GetArguments()) {
+ parameters += ", ";
+ parameters += BuildArg(*arg, typenames, lifetime);
+ }
+
+ return "fn " + method.GetName() + lifetime_str + "(" + parameters + ") -> " + return_type;
+}
+
+void GenerateClientMethodHelpers(CodeWriter& out, const AidlInterface& iface,
+ const AidlMethod& method, const AidlTypenames& typenames,
+ const Options& options, const std::string& default_trait_name) {
string parameters = "&self";
for (const std::unique_ptr<AidlArgument>& arg : method.GetArguments()) {
parameters += ", ";
- parameters += BuildArg(*arg, typenames);
- }
- return "fn " + method.GetName() + "(" + parameters + ") -> " + return_type;
-}
-
-void GenerateClientMethod(CodeWriter& out, const AidlInterface& iface, const AidlMethod& method,
- const AidlTypenames& typenames, const Options& options,
- const std::string& trait_name) {
- // Generate the method
- out << BuildMethod(method, typenames) << " {\n";
- out.Indent();
-
- if (!method.IsUserDefined()) {
- if (method.GetName() == kGetInterfaceVersion && options.Version() > 0) {
- // Check if the version is in the cache
- out << "let _aidl_version = "
- "self.cached_version.load(std::sync::atomic::Ordering::Relaxed);\n";
- out << "if _aidl_version != -1 { return Ok(_aidl_version); }\n";
- }
-
- if (method.GetName() == kGetInterfaceHash && !options.Hash().empty()) {
- out << "{\n";
- out << " let _aidl_hash_lock = self.cached_hash.lock().unwrap();\n";
- out << " if let Some(ref _aidl_hash) = *_aidl_hash_lock {\n";
- out << " return Ok(_aidl_hash.clone());\n";
- out << " }\n";
- out << "}\n";
- }
+ parameters += BuildArg(*arg, typenames, Lifetime::NONE);
}
- // Call transact()
- vector<string> flags;
- if (method.IsOneway()) flags.push_back("binder::FLAG_ONEWAY");
- if (iface.IsSensitiveData()) flags.push_back("binder::FLAG_CLEAR_BUF");
- flags.push_back("binder::FLAG_PRIVATE_LOCAL");
-
- string transact_flags = flags.empty() ? "0" : Join(flags, " | ");
- out << "let _aidl_reply = self.binder.transact("
- << "transactions::" << method.GetName() << ", " << transact_flags << ", |_aidl_data| {\n";
+ // Generate build_parcel helper.
+ out << "fn build_parcel_" + method.GetName() + "(" + parameters +
+ ") -> binder::public_api::Result<binder::OwnedParcel> {\n";
out.Indent();
+ out << "let mut aidl_data_owned = self.binder.prepare_transact()?;\n";
+ out << "let mut aidl_data = aidl_data_owned.borrowed();\n";
+
if (iface.IsSensitiveData()) {
- out << "_aidl_data.mark_sensitive();\n";
+ out << "aidl_data.mark_sensitive();\n";
}
// Arguments
@@ -150,24 +173,30 @@
// (unless we turned it into an Option<&T>)
auto ref_mode = ArgumentReferenceMode(*arg, typenames);
if (IsReference(ref_mode)) {
- out << "_aidl_data.write(" << arg_name << ")?;\n";
+ out << "aidl_data.write(" << arg_name << ")?;\n";
} else {
- out << "_aidl_data.write(&" << arg_name << ")?;\n";
+ out << "aidl_data.write(&" << arg_name << ")?;\n";
}
} else if (arg->GetType().IsArray()) {
// For out-only arrays, send the array size
if (arg->GetType().IsNullable()) {
- out << "_aidl_data.write_slice_size(" << arg_name << ".as_deref())?;\n";
+ out << "aidl_data.write_slice_size(" << arg_name << ".as_deref())?;\n";
} else {
- out << "_aidl_data.write_slice_size(Some(" << arg_name << "))?;\n";
+ out << "aidl_data.write_slice_size(Some(" << arg_name << "))?;\n";
}
}
}
- // Return Ok(()) if all the `_aidl_data.write(...)?;` calls pass
- out << "Ok(())\n";
+ out << "Ok(aidl_data_owned)\n";
out.Dedent();
- out << "});\n";
+ out << "}\n";
+
+ // Generate read_response helper.
+ auto return_type = RustNameOf(method.GetType(), typenames, StorageMode::VALUE, Lifetime::NONE);
+ out << "fn read_response_" + method.GetName() + "(" + parameters +
+ ", _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<" +
+ return_type + "> {\n";
+ out.Indent();
// Check for UNKNOWN_TRANSACTION and call the default impl
if (method.IsUserDefined()) {
@@ -180,7 +209,7 @@
default_args += arg->GetName();
}
out << "if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {\n";
- out << " if let Some(_aidl_default_impl) = <Self as " << trait_name
+ out << " if let Some(_aidl_default_impl) = <Self as " << default_trait_name
<< ">::getDefaultImpl() {\n";
out << " return _aidl_default_impl." << method.GetName() << "(" << default_args << ");\n";
out << " }\n";
@@ -188,7 +217,7 @@
}
// Return all other errors
- out << "let _aidl_reply = _aidl_reply?;\n";
+ out << "let _aidl_reply = _aidl_reply?.into_parcel();\n";
string return_val = "()";
if (!method.IsOneway()) {
@@ -198,7 +227,8 @@
// Return reply value
if (method.GetType().GetName() != "void") {
- auto return_type = RustNameOf(method.GetType(), typenames, StorageMode::VALUE);
+ auto return_type =
+ RustNameOf(method.GetType(), typenames, StorageMode::VALUE, Lifetime::NONE);
out << "let _aidl_return: " << return_type << " = _aidl_reply.read()?;\n";
return_val = "_aidl_return";
@@ -219,6 +249,129 @@
// Return the result
out << "Ok(" << return_val << ")\n";
+
+ out.Dedent();
+ out << "}\n";
+}
+
+void GenerateClientMethod(CodeWriter& out, const AidlInterface& iface, const AidlMethod& method,
+ const AidlTypenames& typenames, const Options& options,
+ const MethodKind kind) {
+ // Generate the method
+ out << BuildMethod(method, typenames, kind) << " {\n";
+ out.Indent();
+
+ if (!method.IsUserDefined()) {
+ if (method.GetName() == kGetInterfaceVersion && options.Version() > 0) {
+ // Check if the version is in the cache
+ out << "let _aidl_version = "
+ "self.cached_version.load(std::sync::atomic::Ordering::Relaxed);\n";
+ switch (kind) {
+ case MethodKind::NORMAL:
+ out << "if _aidl_version != -1 { return Ok(_aidl_version); }\n";
+ break;
+ case MethodKind::BOXED_FUTURE:
+ out << "if _aidl_version != -1 { return Box::pin(std::future::ready(Ok(_aidl_version))); "
+ "}\n";
+ break;
+ case MethodKind::READY_FUTURE:
+ out << "if _aidl_version != -1 { return std::future::ready(Ok(_aidl_version)); }\n";
+ break;
+ }
+ }
+
+ if (method.GetName() == kGetInterfaceHash && !options.Hash().empty()) {
+ out << "{\n";
+ out << " let _aidl_hash_lock = self.cached_hash.lock().unwrap();\n";
+ out << " if let Some(ref _aidl_hash) = *_aidl_hash_lock {\n";
+ switch (kind) {
+ case MethodKind::NORMAL:
+ out << " return Ok(_aidl_hash.clone());\n";
+ break;
+ case MethodKind::BOXED_FUTURE:
+ out << " return Box::pin(std::future::ready(Ok(_aidl_hash.clone())));\n";
+ break;
+ case MethodKind::READY_FUTURE:
+ out << " return std::future::ready(Ok(_aidl_hash.clone()));\n";
+ break;
+ }
+ out << " }\n";
+ out << "}\n";
+ }
+ }
+
+ string build_parcel_args;
+ for (const std::unique_ptr<AidlArgument>& arg : method.GetArguments()) {
+ if (!build_parcel_args.empty()) {
+ build_parcel_args += ", ";
+ }
+ build_parcel_args += kArgumentPrefix;
+ build_parcel_args += arg->GetName();
+ }
+
+ string read_response_args =
+ build_parcel_args.empty() ? "_aidl_reply" : build_parcel_args + ", _aidl_reply";
+
+ vector<string> flags;
+ if (method.IsOneway()) flags.push_back("binder::FLAG_ONEWAY");
+ if (iface.IsSensitiveData()) flags.push_back("binder::FLAG_CLEAR_BUF");
+ flags.push_back("binder::FLAG_PRIVATE_LOCAL");
+
+ string transact_flags = flags.empty() ? "0" : Join(flags, " | ");
+
+ switch (kind) {
+ case MethodKind::NORMAL:
+ // Prepare transaction.
+ out << "let _aidl_data = self.build_parcel_" + method.GetName() + "(" + build_parcel_args +
+ ")?;\n";
+ // Submit transaction.
+ out << "let _aidl_reply = self.binder.submit_transact(transactions::" << method.GetName()
+ << ", _aidl_data, " << transact_flags << ");\n";
+ // Deserialize response.
+ out << "self.read_response_" + method.GetName() + "(" + read_response_args + ")\n";
+ break;
+ case MethodKind::READY_FUTURE:
+ // Prepare transaction.
+ out << "let _aidl_data = match self.build_parcel_" + method.GetName() + "(" +
+ build_parcel_args + ") {\n";
+ out.Indent();
+ out << "Ok(_aidl_data) => _aidl_data,\n";
+ out << "Err(err) => return std::future::ready(Err(err)),\n";
+ out.Dedent();
+ out << "};\n";
+ // Submit transaction.
+ out << "let _aidl_reply = self.binder.submit_transact(transactions::" << method.GetName()
+ << ", _aidl_data, " << transact_flags << ");\n";
+ // Deserialize response.
+ out << "std::future::ready(self.read_response_" + method.GetName() + "(" +
+ read_response_args + "))\n";
+ break;
+ case MethodKind::BOXED_FUTURE:
+ // Prepare transaction.
+ out << "let _aidl_data = match self.build_parcel_" + method.GetName() + "(" +
+ build_parcel_args + ") {\n";
+ out.Indent();
+ out << "Ok(_aidl_data) => _aidl_data,\n";
+ out << "Err(err) => return Box::pin(std::future::ready(Err(err))),\n";
+ out.Dedent();
+ out << "};\n";
+ // Submit transaction.
+ out << "let binder = self.binder.clone();\n";
+ out << "P::spawn(\n";
+ out.Indent();
+ out << "move || binder.submit_transact(transactions::" << method.GetName() << ", _aidl_data, "
+ << transact_flags << "),\n";
+ out << "move |_aidl_reply| async move {\n";
+ out.Indent();
+ // Deserialize response.
+ out << "self.read_response_" + method.GetName() + "(" + read_response_args + ")\n";
+ out.Dedent();
+ out << "}\n";
+ out.Dedent();
+ out << ")\n";
+ break;
+ }
+
out.Dedent();
out << "}\n";
}
@@ -238,7 +391,7 @@
// We need a value we can call Default::default() on
arg_mode = StorageMode::DEFAULT_VALUE;
}
- auto arg_type = RustNameOf(arg->GetType(), typenames, arg_mode);
+ auto arg_type = RustNameOf(arg->GetType(), typenames, arg_mode, Lifetime::NONE);
string arg_mut = arg->IsOut() ? "mut " : "";
string arg_init = arg->IsIn() ? "_aidl_data.read()?" : "Default::default()";
@@ -363,7 +516,7 @@
const_type = "&str";
} else if (type.Signature() == "byte" || type.Signature() == "int" ||
type.Signature() == "long") {
- const_type = RustNameOf(type, typenames, StorageMode::VALUE);
+ const_type = RustNameOf(type, typenames, StorageMode::VALUE, Lifetime::NONE);
} else {
AIDL_FATAL(value) << "Unrecognized constant type: " << type.Signature();
}
@@ -382,6 +535,7 @@
*code_writer << "#[allow(unused_imports)] use binder::IBinderInternal;\n";
auto trait_name = ClassName(*iface, cpp::ClassNames::INTERFACE);
+ auto trait_name_async = trait_name + "Async";
auto client_name = ClassName(*iface, cpp::ClassNames::CLIENT);
auto server_name = ClassName(*iface, cpp::ClassNames::SERVER);
*code_writer << "use binder::declare_binder_interface;\n";
@@ -406,14 +560,16 @@
}
code_writer->Dedent();
*code_writer << "},\n";
- code_writer->Dedent();
+ *code_writer << "async: " << trait_name_async << ",\n";
if (iface->IsVintfStability()) {
*code_writer << "stability: binder::Stability::Vintf,\n";
}
+ code_writer->Dedent();
*code_writer << "}\n";
code_writer->Dedent();
*code_writer << "}\n";
+ // Emit the trait.
GenerateDeprecated(*code_writer, *iface);
*code_writer << "pub trait " << trait_name << ": binder::Interface + Send {\n";
code_writer->Indent();
@@ -453,6 +609,37 @@
code_writer->Dedent();
*code_writer << "}\n";
+ // Emit the async trait.
+ GenerateDeprecated(*code_writer, *iface);
+ *code_writer << "pub trait " << trait_name_async << "<P>: binder::Interface + Send {\n";
+ code_writer->Indent();
+ *code_writer << "fn get_descriptor() -> &'static str where Self: Sized { \""
+ << iface->GetDescriptor() << "\" }\n";
+
+ for (const auto& method : iface->GetMethods()) {
+ // Generate the method
+ GenerateDeprecated(*code_writer, *method);
+
+ MethodKind kind = method->IsOneway() ? MethodKind::READY_FUTURE : MethodKind::BOXED_FUTURE;
+
+ if (method->IsUserDefined()) {
+ *code_writer << BuildMethod(*method, typenames, kind) << ";\n";
+ } else {
+ // Generate default implementations for meta methods
+ *code_writer << BuildMethod(*method, typenames, kind) << " {\n";
+ code_writer->Indent();
+ if (method->GetName() == kGetInterfaceVersion && options.Version() > 0) {
+ *code_writer << "Box::pin(async move { Ok(VERSION) })\n";
+ } else if (method->GetName() == kGetInterfaceHash && !options.Hash().empty()) {
+ *code_writer << "Box::pin(async move { Ok(HASH.into()) })\n";
+ }
+ code_writer->Dedent();
+ *code_writer << "}\n";
+ }
+ }
+ code_writer->Dedent();
+ *code_writer << "}\n";
+
// Emit the default trait
*code_writer << "pub trait " << default_trait_name << ": Send + Sync {\n";
code_writer->Indent();
@@ -508,11 +695,34 @@
*code_writer << "pub const HASH: &str = \"" << options.Hash() << "\";\n";
}
+ // Generate the client-side method helpers
+ //
+ // The methods in this block are not marked pub, so they are not accessible from outside the
+ // AIDL generated code.
+ *code_writer << "impl " << client_name << " {\n";
+ code_writer->Indent();
+ for (const auto& method : iface->GetMethods()) {
+ GenerateClientMethodHelpers(*code_writer, *iface, *method, typenames, options, trait_name);
+ }
+ code_writer->Dedent();
+ *code_writer << "}\n";
+
// Generate the client-side methods
*code_writer << "impl " << trait_name << " for " << client_name << " {\n";
code_writer->Indent();
for (const auto& method : iface->GetMethods()) {
- GenerateClientMethod(*code_writer, *iface, *method, typenames, options, trait_name);
+ GenerateClientMethod(*code_writer, *iface, *method, typenames, options, MethodKind::NORMAL);
+ }
+ code_writer->Dedent();
+ *code_writer << "}\n";
+
+ // Generate the async client-side methods
+ *code_writer << "impl<P: binder::BinderAsyncPool> " << trait_name_async << "<P> for "
+ << client_name << " {\n";
+ code_writer->Indent();
+ for (const auto& method : iface->GetMethods()) {
+ MethodKind kind = method->IsOneway() ? MethodKind::READY_FUTURE : MethodKind::BOXED_FUTURE;
+ GenerateClientMethod(*code_writer, *iface, *method, typenames, options, kind);
}
code_writer->Dedent();
*code_writer << "}\n";
@@ -528,7 +738,8 @@
out.Indent();
for (const auto& variable : parcel->GetFields()) {
GenerateDeprecated(out, *variable);
- auto field_type = RustNameOf(variable->GetType(), typenames, StorageMode::PARCELABLE_FIELD);
+ auto field_type =
+ RustNameOf(variable->GetType(), typenames, StorageMode::PARCELABLE_FIELD, Lifetime::NONE);
out << "pub " << variable->GetName() << ": " << field_type << ",\n";
}
out.Dedent();
@@ -613,7 +824,8 @@
out.Indent();
for (const auto& variable : parcel->GetFields()) {
GenerateDeprecated(out, *variable);
- auto field_type = RustNameOf(variable->GetType(), typenames, StorageMode::PARCELABLE_FIELD);
+ auto field_type =
+ RustNameOf(variable->GetType(), typenames, StorageMode::PARCELABLE_FIELD, Lifetime::NONE);
out << variable->GetCapitalizedName() << "(" << field_type << "),\n";
}
out.Dedent();
@@ -673,7 +885,8 @@
out.Indent();
int tag = 0;
for (const auto& variable : parcel->GetFields()) {
- auto field_type = RustNameOf(variable->GetType(), typenames, StorageMode::PARCELABLE_FIELD);
+ auto field_type =
+ RustNameOf(variable->GetType(), typenames, StorageMode::PARCELABLE_FIELD, Lifetime::NONE);
out << std::to_string(tag++) << " => {\n";
out.Indent();
@@ -765,7 +978,7 @@
void GenerateRustEnumDeclaration(CodeWriter* code_writer, const AidlEnumDeclaration* enum_decl,
const AidlTypenames& typenames) {
const auto& aidl_backing_type = enum_decl->GetBackingType();
- auto backing_type = RustNameOf(aidl_backing_type, typenames, StorageMode::VALUE);
+ auto backing_type = RustNameOf(aidl_backing_type, typenames, StorageMode::VALUE, Lifetime::NONE);
// TODO(b/177860423) support "deprecated" for enum types
*code_writer << "#![allow(non_upper_case_globals)]\n";
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/IDeprecated.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/IDeprecated.rs
index 3cb695d..5dbb980 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/IDeprecated.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/IDeprecated.rs
@@ -8,6 +8,7 @@
native: BnDeprecated(on_transact),
proxy: BpDeprecated {
},
+ async: IDeprecatedAsync,
}
}
#[deprecated = "test"]
@@ -20,6 +21,10 @@
std::mem::replace(&mut *DEFAULT_IMPL.lock().unwrap(), d)
}
}
+#[deprecated = "test"]
+pub trait IDeprecatedAsync<P>: binder::Interface + Send {
+ fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.IDeprecated" }
+}
pub trait IDeprecatedDefault: Send + Sync {
}
pub mod transactions {
@@ -29,8 +34,12 @@
lazy_static! {
static ref DEFAULT_IMPL: std::sync::Mutex<IDeprecatedDefaultRef> = std::sync::Mutex::new(None);
}
+impl BpDeprecated {
+}
impl IDeprecated for BpDeprecated {
}
+impl<P: binder::BinderAsyncPool> IDeprecatedAsync<P> for BpDeprecated {
+}
impl IDeprecated for binder::Binder<BnDeprecated> {
}
fn on_transact(_aidl_service: &dyn IDeprecated, _aidl_code: binder::TransactionCode, _aidl_data: &binder::parcel::Parcel, _aidl_reply: &mut binder::parcel::Parcel) -> binder::Result<()> {
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/INamedCallback.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/INamedCallback.rs
index 171e04a..c009653 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/INamedCallback.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/INamedCallback.rs
@@ -8,6 +8,7 @@
native: BnNamedCallback(on_transact),
proxy: BpNamedCallback {
},
+ async: INamedCallbackAsync,
}
}
pub trait INamedCallback: binder::Interface + Send {
@@ -20,6 +21,10 @@
std::mem::replace(&mut *DEFAULT_IMPL.lock().unwrap(), d)
}
}
+pub trait INamedCallbackAsync<P>: binder::Interface + Send {
+ fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.INamedCallback" }
+ fn GetName<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<String>>;
+}
pub trait INamedCallbackDefault: Send + Sync {
fn GetName(&self) -> binder::public_api::Result<String> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
@@ -33,23 +38,47 @@
lazy_static! {
static ref DEFAULT_IMPL: std::sync::Mutex<INamedCallbackDefaultRef> = std::sync::Mutex::new(None);
}
-impl INamedCallback for BpNamedCallback {
- fn GetName(&self) -> binder::public_api::Result<String> {
- let _aidl_reply = self.binder.transact(transactions::GetName, binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- Ok(())
- });
+impl BpNamedCallback {
+ fn build_parcel_GetName(&self) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ Ok(aidl_data_owned)
+ }
+ fn read_response_GetName(&self, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<String> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as INamedCallback>::getDefaultImpl() {
return _aidl_default_impl.GetName();
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: String = _aidl_reply.read()?;
Ok(_aidl_return)
}
}
+impl INamedCallback for BpNamedCallback {
+ fn GetName(&self) -> binder::public_api::Result<String> {
+ let _aidl_data = self.build_parcel_GetName()?;
+ let _aidl_reply = self.binder.submit_transact(transactions::GetName, _aidl_data, binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_GetName(_aidl_reply)
+ }
+}
+impl<P: binder::BinderAsyncPool> INamedCallbackAsync<P> for BpNamedCallback {
+ fn GetName<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<String>> {
+ let _aidl_data = match self.build_parcel_GetName() {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::GetName, _aidl_data, binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_GetName(_aidl_reply)
+ }
+ )
+ }
+}
impl INamedCallback for binder::Binder<BnNamedCallback> {
fn GetName(&self) -> binder::public_api::Result<String> { self.0.GetName() }
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/INewName.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/INewName.rs
index 4d8b78b..687518b 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/INewName.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/INewName.rs
@@ -8,6 +8,7 @@
native: BnNewName(on_transact),
proxy: BpNewName {
},
+ async: INewNameAsync,
}
}
pub trait INewName: binder::Interface + Send {
@@ -20,6 +21,10 @@
std::mem::replace(&mut *DEFAULT_IMPL.lock().unwrap(), d)
}
}
+pub trait INewNameAsync<P>: binder::Interface + Send {
+ fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.IOldName" }
+ fn RealName<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<String>>;
+}
pub trait INewNameDefault: Send + Sync {
fn RealName(&self) -> binder::public_api::Result<String> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
@@ -33,23 +38,47 @@
lazy_static! {
static ref DEFAULT_IMPL: std::sync::Mutex<INewNameDefaultRef> = std::sync::Mutex::new(None);
}
-impl INewName for BpNewName {
- fn RealName(&self) -> binder::public_api::Result<String> {
- let _aidl_reply = self.binder.transact(transactions::RealName, binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- Ok(())
- });
+impl BpNewName {
+ fn build_parcel_RealName(&self) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RealName(&self, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<String> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as INewName>::getDefaultImpl() {
return _aidl_default_impl.RealName();
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: String = _aidl_reply.read()?;
Ok(_aidl_return)
}
}
+impl INewName for BpNewName {
+ fn RealName(&self) -> binder::public_api::Result<String> {
+ let _aidl_data = self.build_parcel_RealName()?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RealName, _aidl_data, binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RealName(_aidl_reply)
+ }
+}
+impl<P: binder::BinderAsyncPool> INewNameAsync<P> for BpNewName {
+ fn RealName<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<String>> {
+ let _aidl_data = match self.build_parcel_RealName() {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RealName, _aidl_data, binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RealName(_aidl_reply)
+ }
+ )
+ }
+}
impl INewName for binder::Binder<BnNewName> {
fn RealName(&self) -> binder::public_api::Result<String> { self.0.RealName() }
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/IOldName.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/IOldName.rs
index d959015..45edd06 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/IOldName.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/IOldName.rs
@@ -8,6 +8,7 @@
native: BnOldName(on_transact),
proxy: BpOldName {
},
+ async: IOldNameAsync,
}
}
pub trait IOldName: binder::Interface + Send {
@@ -20,6 +21,10 @@
std::mem::replace(&mut *DEFAULT_IMPL.lock().unwrap(), d)
}
}
+pub trait IOldNameAsync<P>: binder::Interface + Send {
+ fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.IOldName" }
+ fn RealName<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<String>>;
+}
pub trait IOldNameDefault: Send + Sync {
fn RealName(&self) -> binder::public_api::Result<String> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
@@ -33,23 +38,47 @@
lazy_static! {
static ref DEFAULT_IMPL: std::sync::Mutex<IOldNameDefaultRef> = std::sync::Mutex::new(None);
}
-impl IOldName for BpOldName {
- fn RealName(&self) -> binder::public_api::Result<String> {
- let _aidl_reply = self.binder.transact(transactions::RealName, binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- Ok(())
- });
+impl BpOldName {
+ fn build_parcel_RealName(&self) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RealName(&self, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<String> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as IOldName>::getDefaultImpl() {
return _aidl_default_impl.RealName();
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: String = _aidl_reply.read()?;
Ok(_aidl_return)
}
}
+impl IOldName for BpOldName {
+ fn RealName(&self) -> binder::public_api::Result<String> {
+ let _aidl_data = self.build_parcel_RealName()?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RealName, _aidl_data, binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RealName(_aidl_reply)
+ }
+}
+impl<P: binder::BinderAsyncPool> IOldNameAsync<P> for BpOldName {
+ fn RealName<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<String>> {
+ let _aidl_data = match self.build_parcel_RealName() {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RealName, _aidl_data, binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RealName(_aidl_reply)
+ }
+ )
+ }
+}
impl IOldName for binder::Binder<BnOldName> {
fn RealName(&self) -> binder::public_api::Result<String> { self.0.RealName() }
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ITestService.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ITestService.rs
index 681d599..2ff2035 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ITestService.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ITestService.rs
@@ -8,6 +8,7 @@
native: BnTestService(on_transact),
proxy: BpTestService {
},
+ async: ITestServiceAsync,
}
}
pub trait ITestService: binder::Interface + Send {
@@ -79,6 +80,69 @@
std::mem::replace(&mut *DEFAULT_IMPL.lock().unwrap(), d)
}
}
+pub trait ITestServiceAsync<P>: binder::Interface + Send {
+ fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.ITestService" }
+ fn UnimplementedMethod<'a>(&'a self, _arg_arg: i32) -> binder::BoxFuture<'a, binder::public_api::Result<i32>>;
+ #[deprecated = "to make sure we have something in system/tools/aidl which does a compile check of deprecated and make sure this is reflected in goldens"]
+ fn Deprecated<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<()>>;
+ fn TestOneway(&self) -> std::future::Ready<binder::public_api::Result<()>>;
+ fn RepeatBoolean<'a>(&'a self, _arg_token: bool) -> binder::BoxFuture<'a, binder::public_api::Result<bool>>;
+ fn RepeatByte<'a>(&'a self, _arg_token: i8) -> binder::BoxFuture<'a, binder::public_api::Result<i8>>;
+ fn RepeatChar<'a>(&'a self, _arg_token: u16) -> binder::BoxFuture<'a, binder::public_api::Result<u16>>;
+ fn RepeatInt<'a>(&'a self, _arg_token: i32) -> binder::BoxFuture<'a, binder::public_api::Result<i32>>;
+ fn RepeatLong<'a>(&'a self, _arg_token: i64) -> binder::BoxFuture<'a, binder::public_api::Result<i64>>;
+ fn RepeatFloat<'a>(&'a self, _arg_token: f32) -> binder::BoxFuture<'a, binder::public_api::Result<f32>>;
+ fn RepeatDouble<'a>(&'a self, _arg_token: f64) -> binder::BoxFuture<'a, binder::public_api::Result<f64>>;
+ fn RepeatString<'a>(&'a self, _arg_token: &'a str) -> binder::BoxFuture<'a, binder::public_api::Result<String>>;
+ fn RepeatByteEnum<'a>(&'a self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum) -> binder::BoxFuture<'a, binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>;
+ fn RepeatIntEnum<'a>(&'a self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum) -> binder::BoxFuture<'a, binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>;
+ fn RepeatLongEnum<'a>(&'a self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum) -> binder::BoxFuture<'a, binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>;
+ fn ReverseBoolean<'a>(&'a self, _arg_input: &'a [bool], _arg_repeated: &'a mut Vec<bool>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<bool>>>;
+ fn ReverseByte<'a>(&'a self, _arg_input: &'a [u8], _arg_repeated: &'a mut Vec<u8>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<u8>>>;
+ fn ReverseChar<'a>(&'a self, _arg_input: &'a [u16], _arg_repeated: &'a mut Vec<u16>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<u16>>>;
+ fn ReverseInt<'a>(&'a self, _arg_input: &'a [i32], _arg_repeated: &'a mut Vec<i32>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<i32>>>;
+ fn ReverseLong<'a>(&'a self, _arg_input: &'a [i64], _arg_repeated: &'a mut Vec<i64>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<i64>>>;
+ fn ReverseFloat<'a>(&'a self, _arg_input: &'a [f32], _arg_repeated: &'a mut Vec<f32>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<f32>>>;
+ fn ReverseDouble<'a>(&'a self, _arg_input: &'a [f64], _arg_repeated: &'a mut Vec<f64>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<f64>>>;
+ fn ReverseString<'a>(&'a self, _arg_input: &'a [String], _arg_repeated: &'a mut Vec<String>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<String>>>;
+ fn ReverseByteEnum<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum], _arg_repeated: &'a mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>>;
+ fn ReverseIntEnum<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum], _arg_repeated: &'a mut Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>>;
+ fn ReverseLongEnum<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum], _arg_repeated: &'a mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>>;
+ fn GetOtherTestService<'a>(&'a self, _arg_name: &'a str) -> binder::BoxFuture<'a, binder::public_api::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>;
+ fn VerifyName<'a>(&'a self, _arg_service: &'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>, _arg_name: &'a str) -> binder::BoxFuture<'a, binder::public_api::Result<bool>>;
+ fn ReverseStringList<'a>(&'a self, _arg_input: &'a [String], _arg_repeated: &'a mut Vec<String>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<String>>>;
+ fn RepeatParcelFileDescriptor<'a>(&'a self, _arg_read: &'a binder::parcel::ParcelFileDescriptor) -> binder::BoxFuture<'a, binder::public_api::Result<binder::parcel::ParcelFileDescriptor>>;
+ fn ReverseParcelFileDescriptorArray<'a>(&'a self, _arg_input: &'a [binder::parcel::ParcelFileDescriptor], _arg_repeated: &'a mut Vec<Option<binder::parcel::ParcelFileDescriptor>>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<binder::parcel::ParcelFileDescriptor>>>;
+ fn ThrowServiceException<'a>(&'a self, _arg_code: i32) -> binder::BoxFuture<'a, binder::public_api::Result<()>>;
+ fn RepeatNullableIntArray<'a>(&'a self, _arg_input: Option<&'a [i32]>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<Vec<i32>>>>;
+ fn RepeatNullableByteEnumArray<'a>(&'a self, _arg_input: Option<&'a [crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum]>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>>>;
+ fn RepeatNullableIntEnumArray<'a>(&'a self, _arg_input: Option<&'a [crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum]>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>>>;
+ fn RepeatNullableLongEnumArray<'a>(&'a self, _arg_input: Option<&'a [crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum]>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>>>;
+ fn RepeatNullableString<'a>(&'a self, _arg_input: Option<&'a str>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<String>>>;
+ fn RepeatNullableStringList<'a>(&'a self, _arg_input: Option<&'a [Option<String>]>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<Vec<Option<String>>>>>;
+ fn RepeatNullableParcelable<'a>(&'a self, _arg_input: Option<&'a crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>;
+ fn RepeatNullableParcelableArray<'a>(&'a self, _arg_input: Option<&'a [Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>>>;
+ fn RepeatNullableParcelableList<'a>(&'a self, _arg_input: Option<&'a [Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>>>;
+ fn TakesAnIBinder<'a>(&'a self, _arg_input: &'a binder::SpIBinder) -> binder::BoxFuture<'a, binder::public_api::Result<()>>;
+ fn TakesANullableIBinder<'a>(&'a self, _arg_input: Option<&'a binder::SpIBinder>) -> binder::BoxFuture<'a, binder::public_api::Result<()>>;
+ fn TakesAnIBinderList<'a>(&'a self, _arg_input: &'a [binder::SpIBinder]) -> binder::BoxFuture<'a, binder::public_api::Result<()>>;
+ fn TakesANullableIBinderList<'a>(&'a self, _arg_input: Option<&'a [Option<binder::SpIBinder>]>) -> binder::BoxFuture<'a, binder::public_api::Result<()>>;
+ fn RepeatUtf8CppString<'a>(&'a self, _arg_token: &'a str) -> binder::BoxFuture<'a, binder::public_api::Result<String>>;
+ fn RepeatNullableUtf8CppString<'a>(&'a self, _arg_token: Option<&'a str>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<String>>>;
+ fn ReverseUtf8CppString<'a>(&'a self, _arg_input: &'a [String], _arg_repeated: &'a mut Vec<String>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<String>>>;
+ fn ReverseNullableUtf8CppString<'a>(&'a self, _arg_input: Option<&'a [Option<String>]>, _arg_repeated: &'a mut Option<Vec<Option<String>>>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<Vec<Option<String>>>>>;
+ fn ReverseUtf8CppStringList<'a>(&'a self, _arg_input: Option<&'a [Option<String>]>, _arg_repeated: &'a mut Option<Vec<Option<String>>>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<Vec<Option<String>>>>>;
+ fn GetCallback<'a>(&'a self, _arg_return_null: bool) -> binder::BoxFuture<'a, binder::public_api::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>;
+ fn FillOutStructuredParcelable<'a>(&'a self, _arg_parcel: &'a mut crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable) -> binder::BoxFuture<'a, binder::public_api::Result<()>>;
+ fn RepeatExtendableParcelable<'a>(&'a self, _arg_ep: &'a crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable, _arg_ep2: &'a mut crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable) -> binder::BoxFuture<'a, binder::public_api::Result<()>>;
+ fn ReverseList<'a>(&'a self, _arg_list: &'a crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList) -> binder::BoxFuture<'a, binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList>>;
+ fn ReverseIBinderArray<'a>(&'a self, _arg_input: &'a [binder::SpIBinder], _arg_repeated: &'a mut Vec<Option<binder::SpIBinder>>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<binder::SpIBinder>>>;
+ fn ReverseNullableIBinderArray<'a>(&'a self, _arg_input: Option<&'a [Option<binder::SpIBinder>]>, _arg_repeated: &'a mut Option<Vec<Option<binder::SpIBinder>>>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<Vec<Option<binder::SpIBinder>>>>>;
+ fn GetOldNameInterface<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_IOldName>>>;
+ fn GetNewNameInterface<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_INewName>>>;
+ fn GetCppJavaTests<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<Option<binder::SpIBinder>>>;
+ fn getBackendType<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_11_BackendType>>;
+}
pub trait ITestServiceDefault: Send + Sync {
fn UnimplementedMethod(&self, _arg_arg: i32) -> binder::public_api::Result<i32> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
@@ -398,1031 +462,2210 @@
pub const A55: i32 = 1;
pub const A56: i32 = 1;
pub const A57: i32 = 1;
-impl ITestService for BpTestService {
- fn UnimplementedMethod(&self, _arg_arg: i32) -> binder::public_api::Result<i32> {
- let _aidl_reply = self.binder.transact(transactions::UnimplementedMethod, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_arg)?;
- Ok(())
- });
+impl BpTestService {
+ fn build_parcel_UnimplementedMethod(&self, _arg_arg: i32) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_arg)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_UnimplementedMethod(&self, _arg_arg: i32, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<i32> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.UnimplementedMethod(_arg_arg);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: i32 = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn Deprecated(&self) -> binder::public_api::Result<()> {
- let _aidl_reply = self.binder.transact(transactions::Deprecated, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- Ok(())
- });
+ fn build_parcel_Deprecated(&self) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ Ok(aidl_data_owned)
+ }
+ fn read_response_Deprecated(&self, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.Deprecated();
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
Ok(())
}
- fn TestOneway(&self) -> binder::public_api::Result<()> {
- let _aidl_reply = self.binder.transact(transactions::TestOneway, binder::FLAG_ONEWAY | binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- Ok(())
- });
+ fn build_parcel_TestOneway(&self) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ Ok(aidl_data_owned)
+ }
+ fn read_response_TestOneway(&self, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.TestOneway();
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
Ok(())
}
- fn RepeatBoolean(&self, _arg_token: bool) -> binder::public_api::Result<bool> {
- let _aidl_reply = self.binder.transact(transactions::RepeatBoolean, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_token)?;
- Ok(())
- });
+ fn build_parcel_RepeatBoolean(&self, _arg_token: bool) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_token)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RepeatBoolean(&self, _arg_token: bool, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<bool> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.RepeatBoolean(_arg_token);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: bool = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn RepeatByte(&self, _arg_token: i8) -> binder::public_api::Result<i8> {
- let _aidl_reply = self.binder.transact(transactions::RepeatByte, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_token)?;
- Ok(())
- });
+ fn build_parcel_RepeatByte(&self, _arg_token: i8) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_token)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RepeatByte(&self, _arg_token: i8, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<i8> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.RepeatByte(_arg_token);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: i8 = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn RepeatChar(&self, _arg_token: u16) -> binder::public_api::Result<u16> {
- let _aidl_reply = self.binder.transact(transactions::RepeatChar, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_token)?;
- Ok(())
- });
+ fn build_parcel_RepeatChar(&self, _arg_token: u16) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_token)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RepeatChar(&self, _arg_token: u16, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<u16> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.RepeatChar(_arg_token);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: u16 = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn RepeatInt(&self, _arg_token: i32) -> binder::public_api::Result<i32> {
- let _aidl_reply = self.binder.transact(transactions::RepeatInt, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_token)?;
- Ok(())
- });
+ fn build_parcel_RepeatInt(&self, _arg_token: i32) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_token)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RepeatInt(&self, _arg_token: i32, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<i32> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.RepeatInt(_arg_token);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: i32 = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn RepeatLong(&self, _arg_token: i64) -> binder::public_api::Result<i64> {
- let _aidl_reply = self.binder.transact(transactions::RepeatLong, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_token)?;
- Ok(())
- });
+ fn build_parcel_RepeatLong(&self, _arg_token: i64) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_token)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RepeatLong(&self, _arg_token: i64, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<i64> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.RepeatLong(_arg_token);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: i64 = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn RepeatFloat(&self, _arg_token: f32) -> binder::public_api::Result<f32> {
- let _aidl_reply = self.binder.transact(transactions::RepeatFloat, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_token)?;
- Ok(())
- });
+ fn build_parcel_RepeatFloat(&self, _arg_token: f32) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_token)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RepeatFloat(&self, _arg_token: f32, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<f32> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.RepeatFloat(_arg_token);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: f32 = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn RepeatDouble(&self, _arg_token: f64) -> binder::public_api::Result<f64> {
- let _aidl_reply = self.binder.transact(transactions::RepeatDouble, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_token)?;
- Ok(())
- });
+ fn build_parcel_RepeatDouble(&self, _arg_token: f64) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_token)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RepeatDouble(&self, _arg_token: f64, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<f64> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.RepeatDouble(_arg_token);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: f64 = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn RepeatString(&self, _arg_token: &str) -> binder::public_api::Result<String> {
- let _aidl_reply = self.binder.transact(transactions::RepeatString, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(_arg_token)?;
- Ok(())
- });
+ fn build_parcel_RepeatString(&self, _arg_token: &str) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_token)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RepeatString(&self, _arg_token: &str, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<String> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.RepeatString(_arg_token);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: String = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn RepeatByteEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum) -> binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum> {
- let _aidl_reply = self.binder.transact(transactions::RepeatByteEnum, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_token)?;
- Ok(())
- });
+ fn build_parcel_RepeatByteEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_token)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RepeatByteEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.RepeatByteEnum(_arg_token);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn RepeatIntEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum) -> binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum> {
- let _aidl_reply = self.binder.transact(transactions::RepeatIntEnum, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_token)?;
- Ok(())
- });
+ fn build_parcel_RepeatIntEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_token)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RepeatIntEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.RepeatIntEnum(_arg_token);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn RepeatLongEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum) -> binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum> {
- let _aidl_reply = self.binder.transact(transactions::RepeatLongEnum, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_token)?;
- Ok(())
- });
+ fn build_parcel_RepeatLongEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_token)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RepeatLongEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.RepeatLongEnum(_arg_token);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn ReverseBoolean(&self, _arg_input: &[bool], _arg_repeated: &mut Vec<bool>) -> binder::public_api::Result<Vec<bool>> {
- let _aidl_reply = self.binder.transact(transactions::ReverseBoolean, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(_arg_input)?;
- _aidl_data.write_slice_size(Some(_arg_repeated))?;
- Ok(())
- });
+ fn build_parcel_ReverseBoolean(&self, _arg_input: &[bool], _arg_repeated: &mut Vec<bool>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_input)?;
+ aidl_data.write_slice_size(Some(_arg_repeated))?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_ReverseBoolean(&self, _arg_input: &[bool], _arg_repeated: &mut Vec<bool>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Vec<bool>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.ReverseBoolean(_arg_input, _arg_repeated);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Vec<bool> = _aidl_reply.read()?;
_aidl_reply.read_onto(_arg_repeated)?;
Ok(_aidl_return)
}
- fn ReverseByte(&self, _arg_input: &[u8], _arg_repeated: &mut Vec<u8>) -> binder::public_api::Result<Vec<u8>> {
- let _aidl_reply = self.binder.transact(transactions::ReverseByte, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(_arg_input)?;
- _aidl_data.write_slice_size(Some(_arg_repeated))?;
- Ok(())
- });
+ fn build_parcel_ReverseByte(&self, _arg_input: &[u8], _arg_repeated: &mut Vec<u8>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_input)?;
+ aidl_data.write_slice_size(Some(_arg_repeated))?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_ReverseByte(&self, _arg_input: &[u8], _arg_repeated: &mut Vec<u8>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Vec<u8>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.ReverseByte(_arg_input, _arg_repeated);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Vec<u8> = _aidl_reply.read()?;
_aidl_reply.read_onto(_arg_repeated)?;
Ok(_aidl_return)
}
- fn ReverseChar(&self, _arg_input: &[u16], _arg_repeated: &mut Vec<u16>) -> binder::public_api::Result<Vec<u16>> {
- let _aidl_reply = self.binder.transact(transactions::ReverseChar, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(_arg_input)?;
- _aidl_data.write_slice_size(Some(_arg_repeated))?;
- Ok(())
- });
+ fn build_parcel_ReverseChar(&self, _arg_input: &[u16], _arg_repeated: &mut Vec<u16>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_input)?;
+ aidl_data.write_slice_size(Some(_arg_repeated))?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_ReverseChar(&self, _arg_input: &[u16], _arg_repeated: &mut Vec<u16>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Vec<u16>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.ReverseChar(_arg_input, _arg_repeated);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Vec<u16> = _aidl_reply.read()?;
_aidl_reply.read_onto(_arg_repeated)?;
Ok(_aidl_return)
}
- fn ReverseInt(&self, _arg_input: &[i32], _arg_repeated: &mut Vec<i32>) -> binder::public_api::Result<Vec<i32>> {
- let _aidl_reply = self.binder.transact(transactions::ReverseInt, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(_arg_input)?;
- _aidl_data.write_slice_size(Some(_arg_repeated))?;
- Ok(())
- });
+ fn build_parcel_ReverseInt(&self, _arg_input: &[i32], _arg_repeated: &mut Vec<i32>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_input)?;
+ aidl_data.write_slice_size(Some(_arg_repeated))?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_ReverseInt(&self, _arg_input: &[i32], _arg_repeated: &mut Vec<i32>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Vec<i32>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.ReverseInt(_arg_input, _arg_repeated);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Vec<i32> = _aidl_reply.read()?;
_aidl_reply.read_onto(_arg_repeated)?;
Ok(_aidl_return)
}
- fn ReverseLong(&self, _arg_input: &[i64], _arg_repeated: &mut Vec<i64>) -> binder::public_api::Result<Vec<i64>> {
- let _aidl_reply = self.binder.transact(transactions::ReverseLong, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(_arg_input)?;
- _aidl_data.write_slice_size(Some(_arg_repeated))?;
- Ok(())
- });
+ fn build_parcel_ReverseLong(&self, _arg_input: &[i64], _arg_repeated: &mut Vec<i64>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_input)?;
+ aidl_data.write_slice_size(Some(_arg_repeated))?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_ReverseLong(&self, _arg_input: &[i64], _arg_repeated: &mut Vec<i64>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Vec<i64>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.ReverseLong(_arg_input, _arg_repeated);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Vec<i64> = _aidl_reply.read()?;
_aidl_reply.read_onto(_arg_repeated)?;
Ok(_aidl_return)
}
- fn ReverseFloat(&self, _arg_input: &[f32], _arg_repeated: &mut Vec<f32>) -> binder::public_api::Result<Vec<f32>> {
- let _aidl_reply = self.binder.transact(transactions::ReverseFloat, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(_arg_input)?;
- _aidl_data.write_slice_size(Some(_arg_repeated))?;
- Ok(())
- });
+ fn build_parcel_ReverseFloat(&self, _arg_input: &[f32], _arg_repeated: &mut Vec<f32>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_input)?;
+ aidl_data.write_slice_size(Some(_arg_repeated))?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_ReverseFloat(&self, _arg_input: &[f32], _arg_repeated: &mut Vec<f32>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Vec<f32>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.ReverseFloat(_arg_input, _arg_repeated);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Vec<f32> = _aidl_reply.read()?;
_aidl_reply.read_onto(_arg_repeated)?;
Ok(_aidl_return)
}
- fn ReverseDouble(&self, _arg_input: &[f64], _arg_repeated: &mut Vec<f64>) -> binder::public_api::Result<Vec<f64>> {
- let _aidl_reply = self.binder.transact(transactions::ReverseDouble, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(_arg_input)?;
- _aidl_data.write_slice_size(Some(_arg_repeated))?;
- Ok(())
- });
+ fn build_parcel_ReverseDouble(&self, _arg_input: &[f64], _arg_repeated: &mut Vec<f64>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_input)?;
+ aidl_data.write_slice_size(Some(_arg_repeated))?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_ReverseDouble(&self, _arg_input: &[f64], _arg_repeated: &mut Vec<f64>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Vec<f64>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.ReverseDouble(_arg_input, _arg_repeated);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Vec<f64> = _aidl_reply.read()?;
_aidl_reply.read_onto(_arg_repeated)?;
Ok(_aidl_return)
}
- fn ReverseString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::public_api::Result<Vec<String>> {
- let _aidl_reply = self.binder.transact(transactions::ReverseString, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(_arg_input)?;
- _aidl_data.write_slice_size(Some(_arg_repeated))?;
- Ok(())
- });
+ fn build_parcel_ReverseString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_input)?;
+ aidl_data.write_slice_size(Some(_arg_repeated))?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_ReverseString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Vec<String>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.ReverseString(_arg_input, _arg_repeated);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Vec<String> = _aidl_reply.read()?;
_aidl_reply.read_onto(_arg_repeated)?;
Ok(_aidl_return)
}
- fn ReverseByteEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>) -> binder::public_api::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>> {
- let _aidl_reply = self.binder.transact(transactions::ReverseByteEnum, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(_arg_input)?;
- _aidl_data.write_slice_size(Some(_arg_repeated))?;
- Ok(())
- });
+ fn build_parcel_ReverseByteEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_input)?;
+ aidl_data.write_slice_size(Some(_arg_repeated))?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_ReverseByteEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.ReverseByteEnum(_arg_input, _arg_repeated);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum> = _aidl_reply.read()?;
_aidl_reply.read_onto(_arg_repeated)?;
Ok(_aidl_return)
}
- fn ReverseIntEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>) -> binder::public_api::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>> {
- let _aidl_reply = self.binder.transact(transactions::ReverseIntEnum, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(_arg_input)?;
- _aidl_data.write_slice_size(Some(_arg_repeated))?;
- Ok(())
- });
+ fn build_parcel_ReverseIntEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_input)?;
+ aidl_data.write_slice_size(Some(_arg_repeated))?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_ReverseIntEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.ReverseIntEnum(_arg_input, _arg_repeated);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum> = _aidl_reply.read()?;
_aidl_reply.read_onto(_arg_repeated)?;
Ok(_aidl_return)
}
- fn ReverseLongEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>) -> binder::public_api::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>> {
- let _aidl_reply = self.binder.transact(transactions::ReverseLongEnum, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(_arg_input)?;
- _aidl_data.write_slice_size(Some(_arg_repeated))?;
- Ok(())
- });
+ fn build_parcel_ReverseLongEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_input)?;
+ aidl_data.write_slice_size(Some(_arg_repeated))?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_ReverseLongEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.ReverseLongEnum(_arg_input, _arg_repeated);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum> = _aidl_reply.read()?;
_aidl_reply.read_onto(_arg_repeated)?;
Ok(_aidl_return)
}
- fn GetOtherTestService(&self, _arg_name: &str) -> binder::public_api::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>> {
- let _aidl_reply = self.binder.transact(transactions::GetOtherTestService, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(_arg_name)?;
- Ok(())
- });
+ fn build_parcel_GetOtherTestService(&self, _arg_name: &str) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_name)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_GetOtherTestService(&self, _arg_name: &str, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.GetOtherTestService(_arg_name);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback> = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn VerifyName(&self, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>, _arg_name: &str) -> binder::public_api::Result<bool> {
- let _aidl_reply = self.binder.transact(transactions::VerifyName, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(_arg_service)?;
- _aidl_data.write(_arg_name)?;
- Ok(())
- });
+ fn build_parcel_VerifyName(&self, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>, _arg_name: &str) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_service)?;
+ aidl_data.write(_arg_name)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_VerifyName(&self, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>, _arg_name: &str, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<bool> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.VerifyName(_arg_service, _arg_name);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: bool = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn ReverseStringList(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::public_api::Result<Vec<String>> {
- let _aidl_reply = self.binder.transact(transactions::ReverseStringList, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(_arg_input)?;
- Ok(())
- });
+ fn build_parcel_ReverseStringList(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_input)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_ReverseStringList(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Vec<String>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.ReverseStringList(_arg_input, _arg_repeated);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Vec<String> = _aidl_reply.read()?;
_aidl_reply.read_onto(_arg_repeated)?;
Ok(_aidl_return)
}
- fn RepeatParcelFileDescriptor(&self, _arg_read: &binder::parcel::ParcelFileDescriptor) -> binder::public_api::Result<binder::parcel::ParcelFileDescriptor> {
- let _aidl_reply = self.binder.transact(transactions::RepeatParcelFileDescriptor, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(_arg_read)?;
- Ok(())
- });
+ fn build_parcel_RepeatParcelFileDescriptor(&self, _arg_read: &binder::parcel::ParcelFileDescriptor) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_read)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RepeatParcelFileDescriptor(&self, _arg_read: &binder::parcel::ParcelFileDescriptor, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<binder::parcel::ParcelFileDescriptor> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.RepeatParcelFileDescriptor(_arg_read);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: binder::parcel::ParcelFileDescriptor = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn ReverseParcelFileDescriptorArray(&self, _arg_input: &[binder::parcel::ParcelFileDescriptor], _arg_repeated: &mut Vec<Option<binder::parcel::ParcelFileDescriptor>>) -> binder::public_api::Result<Vec<binder::parcel::ParcelFileDescriptor>> {
- let _aidl_reply = self.binder.transact(transactions::ReverseParcelFileDescriptorArray, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(_arg_input)?;
- _aidl_data.write_slice_size(Some(_arg_repeated))?;
- Ok(())
- });
+ fn build_parcel_ReverseParcelFileDescriptorArray(&self, _arg_input: &[binder::parcel::ParcelFileDescriptor], _arg_repeated: &mut Vec<Option<binder::parcel::ParcelFileDescriptor>>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_input)?;
+ aidl_data.write_slice_size(Some(_arg_repeated))?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_ReverseParcelFileDescriptorArray(&self, _arg_input: &[binder::parcel::ParcelFileDescriptor], _arg_repeated: &mut Vec<Option<binder::parcel::ParcelFileDescriptor>>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Vec<binder::parcel::ParcelFileDescriptor>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.ReverseParcelFileDescriptorArray(_arg_input, _arg_repeated);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Vec<binder::parcel::ParcelFileDescriptor> = _aidl_reply.read()?;
_aidl_reply.read_onto(_arg_repeated)?;
Ok(_aidl_return)
}
- fn ThrowServiceException(&self, _arg_code: i32) -> binder::public_api::Result<()> {
- let _aidl_reply = self.binder.transact(transactions::ThrowServiceException, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_code)?;
- Ok(())
- });
+ fn build_parcel_ThrowServiceException(&self, _arg_code: i32) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_code)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_ThrowServiceException(&self, _arg_code: i32, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.ThrowServiceException(_arg_code);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
Ok(())
}
- fn RepeatNullableIntArray(&self, _arg_input: Option<&[i32]>) -> binder::public_api::Result<Option<Vec<i32>>> {
- let _aidl_reply = self.binder.transact(transactions::RepeatNullableIntArray, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_input)?;
- Ok(())
- });
+ fn build_parcel_RepeatNullableIntArray(&self, _arg_input: Option<&[i32]>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_input)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RepeatNullableIntArray(&self, _arg_input: Option<&[i32]>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Option<Vec<i32>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.RepeatNullableIntArray(_arg_input);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Option<Vec<i32>> = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn RepeatNullableByteEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum]>) -> binder::public_api::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>> {
- let _aidl_reply = self.binder.transact(transactions::RepeatNullableByteEnumArray, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_input)?;
- Ok(())
- });
+ fn build_parcel_RepeatNullableByteEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum]>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_input)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RepeatNullableByteEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum]>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.RepeatNullableByteEnumArray(_arg_input);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>> = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn RepeatNullableIntEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum]>) -> binder::public_api::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>> {
- let _aidl_reply = self.binder.transact(transactions::RepeatNullableIntEnumArray, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_input)?;
- Ok(())
- });
+ fn build_parcel_RepeatNullableIntEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum]>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_input)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RepeatNullableIntEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum]>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.RepeatNullableIntEnumArray(_arg_input);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>> = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn RepeatNullableLongEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum]>) -> binder::public_api::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>> {
- let _aidl_reply = self.binder.transact(transactions::RepeatNullableLongEnumArray, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_input)?;
- Ok(())
- });
+ fn build_parcel_RepeatNullableLongEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum]>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_input)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RepeatNullableLongEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum]>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.RepeatNullableLongEnumArray(_arg_input);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>> = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn RepeatNullableString(&self, _arg_input: Option<&str>) -> binder::public_api::Result<Option<String>> {
- let _aidl_reply = self.binder.transact(transactions::RepeatNullableString, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_input)?;
- Ok(())
- });
+ fn build_parcel_RepeatNullableString(&self, _arg_input: Option<&str>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_input)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RepeatNullableString(&self, _arg_input: Option<&str>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Option<String>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.RepeatNullableString(_arg_input);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Option<String> = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn RepeatNullableStringList(&self, _arg_input: Option<&[Option<String>]>) -> binder::public_api::Result<Option<Vec<Option<String>>>> {
- let _aidl_reply = self.binder.transact(transactions::RepeatNullableStringList, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_input)?;
- Ok(())
- });
+ fn build_parcel_RepeatNullableStringList(&self, _arg_input: Option<&[Option<String>]>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_input)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RepeatNullableStringList(&self, _arg_input: Option<&[Option<String>]>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Option<Vec<Option<String>>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.RepeatNullableStringList(_arg_input);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Option<Vec<Option<String>>> = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn RepeatNullableParcelable(&self, _arg_input: Option<&crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>) -> binder::public_api::Result<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>> {
- let _aidl_reply = self.binder.transact(transactions::RepeatNullableParcelable, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_input)?;
- Ok(())
- });
+ fn build_parcel_RepeatNullableParcelable(&self, _arg_input: Option<&crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_input)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RepeatNullableParcelable(&self, _arg_input: Option<&crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.RepeatNullableParcelable(_arg_input);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty> = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn RepeatNullableParcelableArray(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::public_api::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>> {
- let _aidl_reply = self.binder.transact(transactions::RepeatNullableParcelableArray, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_input)?;
- Ok(())
- });
+ fn build_parcel_RepeatNullableParcelableArray(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_input)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RepeatNullableParcelableArray(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.RepeatNullableParcelableArray(_arg_input);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>> = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn RepeatNullableParcelableList(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::public_api::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>> {
- let _aidl_reply = self.binder.transact(transactions::RepeatNullableParcelableList, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_input)?;
- Ok(())
- });
+ fn build_parcel_RepeatNullableParcelableList(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_input)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RepeatNullableParcelableList(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.RepeatNullableParcelableList(_arg_input);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>> = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn TakesAnIBinder(&self, _arg_input: &binder::SpIBinder) -> binder::public_api::Result<()> {
- let _aidl_reply = self.binder.transact(transactions::TakesAnIBinder, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(_arg_input)?;
- Ok(())
- });
+ fn build_parcel_TakesAnIBinder(&self, _arg_input: &binder::SpIBinder) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_input)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_TakesAnIBinder(&self, _arg_input: &binder::SpIBinder, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.TakesAnIBinder(_arg_input);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
Ok(())
}
- fn TakesANullableIBinder(&self, _arg_input: Option<&binder::SpIBinder>) -> binder::public_api::Result<()> {
- let _aidl_reply = self.binder.transact(transactions::TakesANullableIBinder, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_input)?;
- Ok(())
- });
+ fn build_parcel_TakesANullableIBinder(&self, _arg_input: Option<&binder::SpIBinder>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_input)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_TakesANullableIBinder(&self, _arg_input: Option<&binder::SpIBinder>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.TakesANullableIBinder(_arg_input);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
Ok(())
}
- fn TakesAnIBinderList(&self, _arg_input: &[binder::SpIBinder]) -> binder::public_api::Result<()> {
- let _aidl_reply = self.binder.transact(transactions::TakesAnIBinderList, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(_arg_input)?;
- Ok(())
- });
+ fn build_parcel_TakesAnIBinderList(&self, _arg_input: &[binder::SpIBinder]) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_input)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_TakesAnIBinderList(&self, _arg_input: &[binder::SpIBinder], _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.TakesAnIBinderList(_arg_input);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
Ok(())
}
- fn TakesANullableIBinderList(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>) -> binder::public_api::Result<()> {
- let _aidl_reply = self.binder.transact(transactions::TakesANullableIBinderList, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_input)?;
- Ok(())
- });
+ fn build_parcel_TakesANullableIBinderList(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_input)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_TakesANullableIBinderList(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.TakesANullableIBinderList(_arg_input);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
Ok(())
}
- fn RepeatUtf8CppString(&self, _arg_token: &str) -> binder::public_api::Result<String> {
- let _aidl_reply = self.binder.transact(transactions::RepeatUtf8CppString, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(_arg_token)?;
- Ok(())
- });
+ fn build_parcel_RepeatUtf8CppString(&self, _arg_token: &str) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_token)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RepeatUtf8CppString(&self, _arg_token: &str, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<String> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.RepeatUtf8CppString(_arg_token);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: String = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn RepeatNullableUtf8CppString(&self, _arg_token: Option<&str>) -> binder::public_api::Result<Option<String>> {
- let _aidl_reply = self.binder.transact(transactions::RepeatNullableUtf8CppString, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_token)?;
- Ok(())
- });
+ fn build_parcel_RepeatNullableUtf8CppString(&self, _arg_token: Option<&str>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_token)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RepeatNullableUtf8CppString(&self, _arg_token: Option<&str>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Option<String>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.RepeatNullableUtf8CppString(_arg_token);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Option<String> = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn ReverseUtf8CppString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::public_api::Result<Vec<String>> {
- let _aidl_reply = self.binder.transact(transactions::ReverseUtf8CppString, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(_arg_input)?;
- _aidl_data.write_slice_size(Some(_arg_repeated))?;
- Ok(())
- });
+ fn build_parcel_ReverseUtf8CppString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_input)?;
+ aidl_data.write_slice_size(Some(_arg_repeated))?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_ReverseUtf8CppString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Vec<String>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.ReverseUtf8CppString(_arg_input, _arg_repeated);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Vec<String> = _aidl_reply.read()?;
_aidl_reply.read_onto(_arg_repeated)?;
Ok(_aidl_return)
}
- fn ReverseNullableUtf8CppString(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::public_api::Result<Option<Vec<Option<String>>>> {
- let _aidl_reply = self.binder.transact(transactions::ReverseNullableUtf8CppString, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_input)?;
- _aidl_data.write_slice_size(_arg_repeated.as_deref())?;
- Ok(())
- });
+ fn build_parcel_ReverseNullableUtf8CppString(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_input)?;
+ aidl_data.write_slice_size(_arg_repeated.as_deref())?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_ReverseNullableUtf8CppString(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Option<Vec<Option<String>>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.ReverseNullableUtf8CppString(_arg_input, _arg_repeated);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Option<Vec<Option<String>>> = _aidl_reply.read()?;
_aidl_reply.read_onto(_arg_repeated)?;
Ok(_aidl_return)
}
- fn ReverseUtf8CppStringList(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::public_api::Result<Option<Vec<Option<String>>>> {
- let _aidl_reply = self.binder.transact(transactions::ReverseUtf8CppStringList, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_input)?;
- Ok(())
- });
+ fn build_parcel_ReverseUtf8CppStringList(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_input)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_ReverseUtf8CppStringList(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Option<Vec<Option<String>>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.ReverseUtf8CppStringList(_arg_input, _arg_repeated);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Option<Vec<Option<String>>> = _aidl_reply.read()?;
_aidl_reply.read_onto(_arg_repeated)?;
Ok(_aidl_return)
}
- fn GetCallback(&self, _arg_return_null: bool) -> binder::public_api::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>> {
- let _aidl_reply = self.binder.transact(transactions::GetCallback, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_return_null)?;
- Ok(())
- });
+ fn build_parcel_GetCallback(&self, _arg_return_null: bool) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_return_null)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_GetCallback(&self, _arg_return_null: bool, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.GetCallback(_arg_return_null);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>> = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn FillOutStructuredParcelable(&self, _arg_parcel: &mut crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable) -> binder::public_api::Result<()> {
- let _aidl_reply = self.binder.transact(transactions::FillOutStructuredParcelable, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(_arg_parcel)?;
- Ok(())
- });
+ fn build_parcel_FillOutStructuredParcelable(&self, _arg_parcel: &mut crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_parcel)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_FillOutStructuredParcelable(&self, _arg_parcel: &mut crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.FillOutStructuredParcelable(_arg_parcel);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
_aidl_reply.read_onto(_arg_parcel)?;
Ok(())
}
- fn RepeatExtendableParcelable(&self, _arg_ep: &crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable, _arg_ep2: &mut crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable) -> binder::public_api::Result<()> {
- let _aidl_reply = self.binder.transact(transactions::RepeatExtendableParcelable, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(_arg_ep)?;
- Ok(())
- });
+ fn build_parcel_RepeatExtendableParcelable(&self, _arg_ep: &crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable, _arg_ep2: &mut crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_ep)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_RepeatExtendableParcelable(&self, _arg_ep: &crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable, _arg_ep2: &mut crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.RepeatExtendableParcelable(_arg_ep, _arg_ep2);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
_aidl_reply.read_onto(_arg_ep2)?;
Ok(())
}
- fn ReverseList(&self, _arg_list: &crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList) -> binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList> {
- let _aidl_reply = self.binder.transact(transactions::ReverseList, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(_arg_list)?;
- Ok(())
- });
+ fn build_parcel_ReverseList(&self, _arg_list: &crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_list)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_ReverseList(&self, _arg_list: &crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.ReverseList(_arg_list);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn ReverseIBinderArray(&self, _arg_input: &[binder::SpIBinder], _arg_repeated: &mut Vec<Option<binder::SpIBinder>>) -> binder::public_api::Result<Vec<binder::SpIBinder>> {
- let _aidl_reply = self.binder.transact(transactions::ReverseIBinderArray, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(_arg_input)?;
- _aidl_data.write_slice_size(Some(_arg_repeated))?;
- Ok(())
- });
+ fn build_parcel_ReverseIBinderArray(&self, _arg_input: &[binder::SpIBinder], _arg_repeated: &mut Vec<Option<binder::SpIBinder>>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_input)?;
+ aidl_data.write_slice_size(Some(_arg_repeated))?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_ReverseIBinderArray(&self, _arg_input: &[binder::SpIBinder], _arg_repeated: &mut Vec<Option<binder::SpIBinder>>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Vec<binder::SpIBinder>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.ReverseIBinderArray(_arg_input, _arg_repeated);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Vec<binder::SpIBinder> = _aidl_reply.read()?;
_aidl_reply.read_onto(_arg_repeated)?;
Ok(_aidl_return)
}
- fn ReverseNullableIBinderArray(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>, _arg_repeated: &mut Option<Vec<Option<binder::SpIBinder>>>) -> binder::public_api::Result<Option<Vec<Option<binder::SpIBinder>>>> {
- let _aidl_reply = self.binder.transact(transactions::ReverseNullableIBinderArray, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- _aidl_data.write(&_arg_input)?;
- _aidl_data.write_slice_size(_arg_repeated.as_deref())?;
- Ok(())
- });
+ fn build_parcel_ReverseNullableIBinderArray(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>, _arg_repeated: &mut Option<Vec<Option<binder::SpIBinder>>>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ aidl_data.write(&_arg_input)?;
+ aidl_data.write_slice_size(_arg_repeated.as_deref())?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_ReverseNullableIBinderArray(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>, _arg_repeated: &mut Option<Vec<Option<binder::SpIBinder>>>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Option<Vec<Option<binder::SpIBinder>>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.ReverseNullableIBinderArray(_arg_input, _arg_repeated);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Option<Vec<Option<binder::SpIBinder>>> = _aidl_reply.read()?;
_aidl_reply.read_onto(_arg_repeated)?;
Ok(_aidl_return)
}
- fn GetOldNameInterface(&self) -> binder::public_api::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_IOldName>> {
- let _aidl_reply = self.binder.transact(transactions::GetOldNameInterface, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- Ok(())
- });
+ fn build_parcel_GetOldNameInterface(&self) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ Ok(aidl_data_owned)
+ }
+ fn read_response_GetOldNameInterface(&self, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_IOldName>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.GetOldNameInterface();
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_IOldName> = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn GetNewNameInterface(&self) -> binder::public_api::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_INewName>> {
- let _aidl_reply = self.binder.transact(transactions::GetNewNameInterface, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- Ok(())
- });
+ fn build_parcel_GetNewNameInterface(&self) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ Ok(aidl_data_owned)
+ }
+ fn read_response_GetNewNameInterface(&self, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_INewName>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.GetNewNameInterface();
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_INewName> = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn GetCppJavaTests(&self) -> binder::public_api::Result<Option<binder::SpIBinder>> {
- let _aidl_reply = self.binder.transact(transactions::GetCppJavaTests, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- Ok(())
- });
+ fn build_parcel_GetCppJavaTests(&self) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ Ok(aidl_data_owned)
+ }
+ fn read_response_GetCppJavaTests(&self, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<Option<binder::SpIBinder>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.GetCppJavaTests();
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: Option<binder::SpIBinder> = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn getBackendType(&self) -> binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_11_BackendType> {
- let _aidl_reply = self.binder.transact(transactions::getBackendType, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.mark_sensitive();
- Ok(())
- });
+ fn build_parcel_getBackendType(&self) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.mark_sensitive();
+ Ok(aidl_data_owned)
+ }
+ fn read_response_getBackendType(&self, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_11_BackendType> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
return _aidl_default_impl.getBackendType();
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: crate::mangled::_7_android_4_aidl_5_tests_11_BackendType = _aidl_reply.read()?;
Ok(_aidl_return)
}
}
+impl ITestService for BpTestService {
+ fn UnimplementedMethod(&self, _arg_arg: i32) -> binder::public_api::Result<i32> {
+ let _aidl_data = self.build_parcel_UnimplementedMethod(_arg_arg)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::UnimplementedMethod, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_UnimplementedMethod(_arg_arg, _aidl_reply)
+ }
+ fn Deprecated(&self) -> binder::public_api::Result<()> {
+ let _aidl_data = self.build_parcel_Deprecated()?;
+ let _aidl_reply = self.binder.submit_transact(transactions::Deprecated, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_Deprecated(_aidl_reply)
+ }
+ fn TestOneway(&self) -> binder::public_api::Result<()> {
+ let _aidl_data = self.build_parcel_TestOneway()?;
+ let _aidl_reply = self.binder.submit_transact(transactions::TestOneway, _aidl_data, binder::FLAG_ONEWAY | binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_TestOneway(_aidl_reply)
+ }
+ fn RepeatBoolean(&self, _arg_token: bool) -> binder::public_api::Result<bool> {
+ let _aidl_data = self.build_parcel_RepeatBoolean(_arg_token)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RepeatBoolean, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RepeatBoolean(_arg_token, _aidl_reply)
+ }
+ fn RepeatByte(&self, _arg_token: i8) -> binder::public_api::Result<i8> {
+ let _aidl_data = self.build_parcel_RepeatByte(_arg_token)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RepeatByte, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RepeatByte(_arg_token, _aidl_reply)
+ }
+ fn RepeatChar(&self, _arg_token: u16) -> binder::public_api::Result<u16> {
+ let _aidl_data = self.build_parcel_RepeatChar(_arg_token)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RepeatChar, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RepeatChar(_arg_token, _aidl_reply)
+ }
+ fn RepeatInt(&self, _arg_token: i32) -> binder::public_api::Result<i32> {
+ let _aidl_data = self.build_parcel_RepeatInt(_arg_token)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RepeatInt, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RepeatInt(_arg_token, _aidl_reply)
+ }
+ fn RepeatLong(&self, _arg_token: i64) -> binder::public_api::Result<i64> {
+ let _aidl_data = self.build_parcel_RepeatLong(_arg_token)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RepeatLong, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RepeatLong(_arg_token, _aidl_reply)
+ }
+ fn RepeatFloat(&self, _arg_token: f32) -> binder::public_api::Result<f32> {
+ let _aidl_data = self.build_parcel_RepeatFloat(_arg_token)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RepeatFloat, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RepeatFloat(_arg_token, _aidl_reply)
+ }
+ fn RepeatDouble(&self, _arg_token: f64) -> binder::public_api::Result<f64> {
+ let _aidl_data = self.build_parcel_RepeatDouble(_arg_token)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RepeatDouble, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RepeatDouble(_arg_token, _aidl_reply)
+ }
+ fn RepeatString(&self, _arg_token: &str) -> binder::public_api::Result<String> {
+ let _aidl_data = self.build_parcel_RepeatString(_arg_token)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RepeatString, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RepeatString(_arg_token, _aidl_reply)
+ }
+ fn RepeatByteEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum) -> binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum> {
+ let _aidl_data = self.build_parcel_RepeatByteEnum(_arg_token)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RepeatByteEnum, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RepeatByteEnum(_arg_token, _aidl_reply)
+ }
+ fn RepeatIntEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum) -> binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum> {
+ let _aidl_data = self.build_parcel_RepeatIntEnum(_arg_token)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RepeatIntEnum, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RepeatIntEnum(_arg_token, _aidl_reply)
+ }
+ fn RepeatLongEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum) -> binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum> {
+ let _aidl_data = self.build_parcel_RepeatLongEnum(_arg_token)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RepeatLongEnum, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RepeatLongEnum(_arg_token, _aidl_reply)
+ }
+ fn ReverseBoolean(&self, _arg_input: &[bool], _arg_repeated: &mut Vec<bool>) -> binder::public_api::Result<Vec<bool>> {
+ let _aidl_data = self.build_parcel_ReverseBoolean(_arg_input, _arg_repeated)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::ReverseBoolean, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_ReverseBoolean(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ fn ReverseByte(&self, _arg_input: &[u8], _arg_repeated: &mut Vec<u8>) -> binder::public_api::Result<Vec<u8>> {
+ let _aidl_data = self.build_parcel_ReverseByte(_arg_input, _arg_repeated)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::ReverseByte, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_ReverseByte(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ fn ReverseChar(&self, _arg_input: &[u16], _arg_repeated: &mut Vec<u16>) -> binder::public_api::Result<Vec<u16>> {
+ let _aidl_data = self.build_parcel_ReverseChar(_arg_input, _arg_repeated)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::ReverseChar, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_ReverseChar(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ fn ReverseInt(&self, _arg_input: &[i32], _arg_repeated: &mut Vec<i32>) -> binder::public_api::Result<Vec<i32>> {
+ let _aidl_data = self.build_parcel_ReverseInt(_arg_input, _arg_repeated)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::ReverseInt, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_ReverseInt(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ fn ReverseLong(&self, _arg_input: &[i64], _arg_repeated: &mut Vec<i64>) -> binder::public_api::Result<Vec<i64>> {
+ let _aidl_data = self.build_parcel_ReverseLong(_arg_input, _arg_repeated)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::ReverseLong, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_ReverseLong(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ fn ReverseFloat(&self, _arg_input: &[f32], _arg_repeated: &mut Vec<f32>) -> binder::public_api::Result<Vec<f32>> {
+ let _aidl_data = self.build_parcel_ReverseFloat(_arg_input, _arg_repeated)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::ReverseFloat, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_ReverseFloat(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ fn ReverseDouble(&self, _arg_input: &[f64], _arg_repeated: &mut Vec<f64>) -> binder::public_api::Result<Vec<f64>> {
+ let _aidl_data = self.build_parcel_ReverseDouble(_arg_input, _arg_repeated)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::ReverseDouble, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_ReverseDouble(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ fn ReverseString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::public_api::Result<Vec<String>> {
+ let _aidl_data = self.build_parcel_ReverseString(_arg_input, _arg_repeated)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::ReverseString, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_ReverseString(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ fn ReverseByteEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>) -> binder::public_api::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>> {
+ let _aidl_data = self.build_parcel_ReverseByteEnum(_arg_input, _arg_repeated)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::ReverseByteEnum, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_ReverseByteEnum(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ fn ReverseIntEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>) -> binder::public_api::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>> {
+ let _aidl_data = self.build_parcel_ReverseIntEnum(_arg_input, _arg_repeated)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::ReverseIntEnum, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_ReverseIntEnum(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ fn ReverseLongEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>) -> binder::public_api::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>> {
+ let _aidl_data = self.build_parcel_ReverseLongEnum(_arg_input, _arg_repeated)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::ReverseLongEnum, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_ReverseLongEnum(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ fn GetOtherTestService(&self, _arg_name: &str) -> binder::public_api::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>> {
+ let _aidl_data = self.build_parcel_GetOtherTestService(_arg_name)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::GetOtherTestService, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_GetOtherTestService(_arg_name, _aidl_reply)
+ }
+ fn VerifyName(&self, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>, _arg_name: &str) -> binder::public_api::Result<bool> {
+ let _aidl_data = self.build_parcel_VerifyName(_arg_service, _arg_name)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::VerifyName, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_VerifyName(_arg_service, _arg_name, _aidl_reply)
+ }
+ fn ReverseStringList(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::public_api::Result<Vec<String>> {
+ let _aidl_data = self.build_parcel_ReverseStringList(_arg_input, _arg_repeated)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::ReverseStringList, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_ReverseStringList(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ fn RepeatParcelFileDescriptor(&self, _arg_read: &binder::parcel::ParcelFileDescriptor) -> binder::public_api::Result<binder::parcel::ParcelFileDescriptor> {
+ let _aidl_data = self.build_parcel_RepeatParcelFileDescriptor(_arg_read)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RepeatParcelFileDescriptor, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RepeatParcelFileDescriptor(_arg_read, _aidl_reply)
+ }
+ fn ReverseParcelFileDescriptorArray(&self, _arg_input: &[binder::parcel::ParcelFileDescriptor], _arg_repeated: &mut Vec<Option<binder::parcel::ParcelFileDescriptor>>) -> binder::public_api::Result<Vec<binder::parcel::ParcelFileDescriptor>> {
+ let _aidl_data = self.build_parcel_ReverseParcelFileDescriptorArray(_arg_input, _arg_repeated)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::ReverseParcelFileDescriptorArray, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_ReverseParcelFileDescriptorArray(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ fn ThrowServiceException(&self, _arg_code: i32) -> binder::public_api::Result<()> {
+ let _aidl_data = self.build_parcel_ThrowServiceException(_arg_code)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::ThrowServiceException, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_ThrowServiceException(_arg_code, _aidl_reply)
+ }
+ fn RepeatNullableIntArray(&self, _arg_input: Option<&[i32]>) -> binder::public_api::Result<Option<Vec<i32>>> {
+ let _aidl_data = self.build_parcel_RepeatNullableIntArray(_arg_input)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RepeatNullableIntArray, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RepeatNullableIntArray(_arg_input, _aidl_reply)
+ }
+ fn RepeatNullableByteEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum]>) -> binder::public_api::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>> {
+ let _aidl_data = self.build_parcel_RepeatNullableByteEnumArray(_arg_input)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RepeatNullableByteEnumArray, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RepeatNullableByteEnumArray(_arg_input, _aidl_reply)
+ }
+ fn RepeatNullableIntEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum]>) -> binder::public_api::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>> {
+ let _aidl_data = self.build_parcel_RepeatNullableIntEnumArray(_arg_input)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RepeatNullableIntEnumArray, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RepeatNullableIntEnumArray(_arg_input, _aidl_reply)
+ }
+ fn RepeatNullableLongEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum]>) -> binder::public_api::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>> {
+ let _aidl_data = self.build_parcel_RepeatNullableLongEnumArray(_arg_input)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RepeatNullableLongEnumArray, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RepeatNullableLongEnumArray(_arg_input, _aidl_reply)
+ }
+ fn RepeatNullableString(&self, _arg_input: Option<&str>) -> binder::public_api::Result<Option<String>> {
+ let _aidl_data = self.build_parcel_RepeatNullableString(_arg_input)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RepeatNullableString, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RepeatNullableString(_arg_input, _aidl_reply)
+ }
+ fn RepeatNullableStringList(&self, _arg_input: Option<&[Option<String>]>) -> binder::public_api::Result<Option<Vec<Option<String>>>> {
+ let _aidl_data = self.build_parcel_RepeatNullableStringList(_arg_input)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RepeatNullableStringList, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RepeatNullableStringList(_arg_input, _aidl_reply)
+ }
+ fn RepeatNullableParcelable(&self, _arg_input: Option<&crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>) -> binder::public_api::Result<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>> {
+ let _aidl_data = self.build_parcel_RepeatNullableParcelable(_arg_input)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RepeatNullableParcelable, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RepeatNullableParcelable(_arg_input, _aidl_reply)
+ }
+ fn RepeatNullableParcelableArray(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::public_api::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>> {
+ let _aidl_data = self.build_parcel_RepeatNullableParcelableArray(_arg_input)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RepeatNullableParcelableArray, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RepeatNullableParcelableArray(_arg_input, _aidl_reply)
+ }
+ fn RepeatNullableParcelableList(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::public_api::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>> {
+ let _aidl_data = self.build_parcel_RepeatNullableParcelableList(_arg_input)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RepeatNullableParcelableList, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RepeatNullableParcelableList(_arg_input, _aidl_reply)
+ }
+ fn TakesAnIBinder(&self, _arg_input: &binder::SpIBinder) -> binder::public_api::Result<()> {
+ let _aidl_data = self.build_parcel_TakesAnIBinder(_arg_input)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::TakesAnIBinder, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_TakesAnIBinder(_arg_input, _aidl_reply)
+ }
+ fn TakesANullableIBinder(&self, _arg_input: Option<&binder::SpIBinder>) -> binder::public_api::Result<()> {
+ let _aidl_data = self.build_parcel_TakesANullableIBinder(_arg_input)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::TakesANullableIBinder, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_TakesANullableIBinder(_arg_input, _aidl_reply)
+ }
+ fn TakesAnIBinderList(&self, _arg_input: &[binder::SpIBinder]) -> binder::public_api::Result<()> {
+ let _aidl_data = self.build_parcel_TakesAnIBinderList(_arg_input)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::TakesAnIBinderList, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_TakesAnIBinderList(_arg_input, _aidl_reply)
+ }
+ fn TakesANullableIBinderList(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>) -> binder::public_api::Result<()> {
+ let _aidl_data = self.build_parcel_TakesANullableIBinderList(_arg_input)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::TakesANullableIBinderList, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_TakesANullableIBinderList(_arg_input, _aidl_reply)
+ }
+ fn RepeatUtf8CppString(&self, _arg_token: &str) -> binder::public_api::Result<String> {
+ let _aidl_data = self.build_parcel_RepeatUtf8CppString(_arg_token)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RepeatUtf8CppString, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RepeatUtf8CppString(_arg_token, _aidl_reply)
+ }
+ fn RepeatNullableUtf8CppString(&self, _arg_token: Option<&str>) -> binder::public_api::Result<Option<String>> {
+ let _aidl_data = self.build_parcel_RepeatNullableUtf8CppString(_arg_token)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RepeatNullableUtf8CppString, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RepeatNullableUtf8CppString(_arg_token, _aidl_reply)
+ }
+ fn ReverseUtf8CppString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::public_api::Result<Vec<String>> {
+ let _aidl_data = self.build_parcel_ReverseUtf8CppString(_arg_input, _arg_repeated)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::ReverseUtf8CppString, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_ReverseUtf8CppString(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ fn ReverseNullableUtf8CppString(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::public_api::Result<Option<Vec<Option<String>>>> {
+ let _aidl_data = self.build_parcel_ReverseNullableUtf8CppString(_arg_input, _arg_repeated)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::ReverseNullableUtf8CppString, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_ReverseNullableUtf8CppString(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ fn ReverseUtf8CppStringList(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::public_api::Result<Option<Vec<Option<String>>>> {
+ let _aidl_data = self.build_parcel_ReverseUtf8CppStringList(_arg_input, _arg_repeated)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::ReverseUtf8CppStringList, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_ReverseUtf8CppStringList(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ fn GetCallback(&self, _arg_return_null: bool) -> binder::public_api::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>> {
+ let _aidl_data = self.build_parcel_GetCallback(_arg_return_null)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::GetCallback, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_GetCallback(_arg_return_null, _aidl_reply)
+ }
+ fn FillOutStructuredParcelable(&self, _arg_parcel: &mut crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable) -> binder::public_api::Result<()> {
+ let _aidl_data = self.build_parcel_FillOutStructuredParcelable(_arg_parcel)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::FillOutStructuredParcelable, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_FillOutStructuredParcelable(_arg_parcel, _aidl_reply)
+ }
+ fn RepeatExtendableParcelable(&self, _arg_ep: &crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable, _arg_ep2: &mut crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable) -> binder::public_api::Result<()> {
+ let _aidl_data = self.build_parcel_RepeatExtendableParcelable(_arg_ep, _arg_ep2)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::RepeatExtendableParcelable, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_RepeatExtendableParcelable(_arg_ep, _arg_ep2, _aidl_reply)
+ }
+ fn ReverseList(&self, _arg_list: &crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList) -> binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList> {
+ let _aidl_data = self.build_parcel_ReverseList(_arg_list)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::ReverseList, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_ReverseList(_arg_list, _aidl_reply)
+ }
+ fn ReverseIBinderArray(&self, _arg_input: &[binder::SpIBinder], _arg_repeated: &mut Vec<Option<binder::SpIBinder>>) -> binder::public_api::Result<Vec<binder::SpIBinder>> {
+ let _aidl_data = self.build_parcel_ReverseIBinderArray(_arg_input, _arg_repeated)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::ReverseIBinderArray, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_ReverseIBinderArray(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ fn ReverseNullableIBinderArray(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>, _arg_repeated: &mut Option<Vec<Option<binder::SpIBinder>>>) -> binder::public_api::Result<Option<Vec<Option<binder::SpIBinder>>>> {
+ let _aidl_data = self.build_parcel_ReverseNullableIBinderArray(_arg_input, _arg_repeated)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::ReverseNullableIBinderArray, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_ReverseNullableIBinderArray(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ fn GetOldNameInterface(&self) -> binder::public_api::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_IOldName>> {
+ let _aidl_data = self.build_parcel_GetOldNameInterface()?;
+ let _aidl_reply = self.binder.submit_transact(transactions::GetOldNameInterface, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_GetOldNameInterface(_aidl_reply)
+ }
+ fn GetNewNameInterface(&self) -> binder::public_api::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_INewName>> {
+ let _aidl_data = self.build_parcel_GetNewNameInterface()?;
+ let _aidl_reply = self.binder.submit_transact(transactions::GetNewNameInterface, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_GetNewNameInterface(_aidl_reply)
+ }
+ fn GetCppJavaTests(&self) -> binder::public_api::Result<Option<binder::SpIBinder>> {
+ let _aidl_data = self.build_parcel_GetCppJavaTests()?;
+ let _aidl_reply = self.binder.submit_transact(transactions::GetCppJavaTests, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_GetCppJavaTests(_aidl_reply)
+ }
+ fn getBackendType(&self) -> binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_11_BackendType> {
+ let _aidl_data = self.build_parcel_getBackendType()?;
+ let _aidl_reply = self.binder.submit_transact(transactions::getBackendType, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_getBackendType(_aidl_reply)
+ }
+}
+impl<P: binder::BinderAsyncPool> ITestServiceAsync<P> for BpTestService {
+ fn UnimplementedMethod<'a>(&'a self, _arg_arg: i32) -> binder::BoxFuture<'a, binder::public_api::Result<i32>> {
+ let _aidl_data = match self.build_parcel_UnimplementedMethod(_arg_arg) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::UnimplementedMethod, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_UnimplementedMethod(_arg_arg, _aidl_reply)
+ }
+ )
+ }
+ fn Deprecated<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<()>> {
+ let _aidl_data = match self.build_parcel_Deprecated() {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::Deprecated, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_Deprecated(_aidl_reply)
+ }
+ )
+ }
+ fn TestOneway(&self) -> std::future::Ready<binder::public_api::Result<()>> {
+ let _aidl_data = match self.build_parcel_TestOneway() {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return std::future::ready(Err(err)),
+ };
+ let _aidl_reply = self.binder.submit_transact(transactions::TestOneway, _aidl_data, binder::FLAG_ONEWAY | binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL);
+ std::future::ready(self.read_response_TestOneway(_aidl_reply))
+ }
+ fn RepeatBoolean<'a>(&'a self, _arg_token: bool) -> binder::BoxFuture<'a, binder::public_api::Result<bool>> {
+ let _aidl_data = match self.build_parcel_RepeatBoolean(_arg_token) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RepeatBoolean, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RepeatBoolean(_arg_token, _aidl_reply)
+ }
+ )
+ }
+ fn RepeatByte<'a>(&'a self, _arg_token: i8) -> binder::BoxFuture<'a, binder::public_api::Result<i8>> {
+ let _aidl_data = match self.build_parcel_RepeatByte(_arg_token) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RepeatByte, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RepeatByte(_arg_token, _aidl_reply)
+ }
+ )
+ }
+ fn RepeatChar<'a>(&'a self, _arg_token: u16) -> binder::BoxFuture<'a, binder::public_api::Result<u16>> {
+ let _aidl_data = match self.build_parcel_RepeatChar(_arg_token) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RepeatChar, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RepeatChar(_arg_token, _aidl_reply)
+ }
+ )
+ }
+ fn RepeatInt<'a>(&'a self, _arg_token: i32) -> binder::BoxFuture<'a, binder::public_api::Result<i32>> {
+ let _aidl_data = match self.build_parcel_RepeatInt(_arg_token) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RepeatInt, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RepeatInt(_arg_token, _aidl_reply)
+ }
+ )
+ }
+ fn RepeatLong<'a>(&'a self, _arg_token: i64) -> binder::BoxFuture<'a, binder::public_api::Result<i64>> {
+ let _aidl_data = match self.build_parcel_RepeatLong(_arg_token) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RepeatLong, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RepeatLong(_arg_token, _aidl_reply)
+ }
+ )
+ }
+ fn RepeatFloat<'a>(&'a self, _arg_token: f32) -> binder::BoxFuture<'a, binder::public_api::Result<f32>> {
+ let _aidl_data = match self.build_parcel_RepeatFloat(_arg_token) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RepeatFloat, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RepeatFloat(_arg_token, _aidl_reply)
+ }
+ )
+ }
+ fn RepeatDouble<'a>(&'a self, _arg_token: f64) -> binder::BoxFuture<'a, binder::public_api::Result<f64>> {
+ let _aidl_data = match self.build_parcel_RepeatDouble(_arg_token) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RepeatDouble, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RepeatDouble(_arg_token, _aidl_reply)
+ }
+ )
+ }
+ fn RepeatString<'a>(&'a self, _arg_token: &'a str) -> binder::BoxFuture<'a, binder::public_api::Result<String>> {
+ let _aidl_data = match self.build_parcel_RepeatString(_arg_token) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RepeatString, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RepeatString(_arg_token, _aidl_reply)
+ }
+ )
+ }
+ fn RepeatByteEnum<'a>(&'a self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum) -> binder::BoxFuture<'a, binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>> {
+ let _aidl_data = match self.build_parcel_RepeatByteEnum(_arg_token) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RepeatByteEnum, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RepeatByteEnum(_arg_token, _aidl_reply)
+ }
+ )
+ }
+ fn RepeatIntEnum<'a>(&'a self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum) -> binder::BoxFuture<'a, binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>> {
+ let _aidl_data = match self.build_parcel_RepeatIntEnum(_arg_token) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RepeatIntEnum, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RepeatIntEnum(_arg_token, _aidl_reply)
+ }
+ )
+ }
+ fn RepeatLongEnum<'a>(&'a self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum) -> binder::BoxFuture<'a, binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>> {
+ let _aidl_data = match self.build_parcel_RepeatLongEnum(_arg_token) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RepeatLongEnum, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RepeatLongEnum(_arg_token, _aidl_reply)
+ }
+ )
+ }
+ fn ReverseBoolean<'a>(&'a self, _arg_input: &'a [bool], _arg_repeated: &'a mut Vec<bool>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<bool>>> {
+ let _aidl_data = match self.build_parcel_ReverseBoolean(_arg_input, _arg_repeated) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::ReverseBoolean, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_ReverseBoolean(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ )
+ }
+ fn ReverseByte<'a>(&'a self, _arg_input: &'a [u8], _arg_repeated: &'a mut Vec<u8>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<u8>>> {
+ let _aidl_data = match self.build_parcel_ReverseByte(_arg_input, _arg_repeated) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::ReverseByte, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_ReverseByte(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ )
+ }
+ fn ReverseChar<'a>(&'a self, _arg_input: &'a [u16], _arg_repeated: &'a mut Vec<u16>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<u16>>> {
+ let _aidl_data = match self.build_parcel_ReverseChar(_arg_input, _arg_repeated) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::ReverseChar, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_ReverseChar(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ )
+ }
+ fn ReverseInt<'a>(&'a self, _arg_input: &'a [i32], _arg_repeated: &'a mut Vec<i32>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<i32>>> {
+ let _aidl_data = match self.build_parcel_ReverseInt(_arg_input, _arg_repeated) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::ReverseInt, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_ReverseInt(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ )
+ }
+ fn ReverseLong<'a>(&'a self, _arg_input: &'a [i64], _arg_repeated: &'a mut Vec<i64>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<i64>>> {
+ let _aidl_data = match self.build_parcel_ReverseLong(_arg_input, _arg_repeated) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::ReverseLong, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_ReverseLong(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ )
+ }
+ fn ReverseFloat<'a>(&'a self, _arg_input: &'a [f32], _arg_repeated: &'a mut Vec<f32>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<f32>>> {
+ let _aidl_data = match self.build_parcel_ReverseFloat(_arg_input, _arg_repeated) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::ReverseFloat, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_ReverseFloat(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ )
+ }
+ fn ReverseDouble<'a>(&'a self, _arg_input: &'a [f64], _arg_repeated: &'a mut Vec<f64>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<f64>>> {
+ let _aidl_data = match self.build_parcel_ReverseDouble(_arg_input, _arg_repeated) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::ReverseDouble, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_ReverseDouble(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ )
+ }
+ fn ReverseString<'a>(&'a self, _arg_input: &'a [String], _arg_repeated: &'a mut Vec<String>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<String>>> {
+ let _aidl_data = match self.build_parcel_ReverseString(_arg_input, _arg_repeated) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::ReverseString, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_ReverseString(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ )
+ }
+ fn ReverseByteEnum<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum], _arg_repeated: &'a mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>> {
+ let _aidl_data = match self.build_parcel_ReverseByteEnum(_arg_input, _arg_repeated) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::ReverseByteEnum, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_ReverseByteEnum(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ )
+ }
+ fn ReverseIntEnum<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum], _arg_repeated: &'a mut Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>> {
+ let _aidl_data = match self.build_parcel_ReverseIntEnum(_arg_input, _arg_repeated) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::ReverseIntEnum, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_ReverseIntEnum(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ )
+ }
+ fn ReverseLongEnum<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum], _arg_repeated: &'a mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>> {
+ let _aidl_data = match self.build_parcel_ReverseLongEnum(_arg_input, _arg_repeated) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::ReverseLongEnum, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_ReverseLongEnum(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ )
+ }
+ fn GetOtherTestService<'a>(&'a self, _arg_name: &'a str) -> binder::BoxFuture<'a, binder::public_api::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>> {
+ let _aidl_data = match self.build_parcel_GetOtherTestService(_arg_name) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::GetOtherTestService, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_GetOtherTestService(_arg_name, _aidl_reply)
+ }
+ )
+ }
+ fn VerifyName<'a>(&'a self, _arg_service: &'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>, _arg_name: &'a str) -> binder::BoxFuture<'a, binder::public_api::Result<bool>> {
+ let _aidl_data = match self.build_parcel_VerifyName(_arg_service, _arg_name) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::VerifyName, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_VerifyName(_arg_service, _arg_name, _aidl_reply)
+ }
+ )
+ }
+ fn ReverseStringList<'a>(&'a self, _arg_input: &'a [String], _arg_repeated: &'a mut Vec<String>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<String>>> {
+ let _aidl_data = match self.build_parcel_ReverseStringList(_arg_input, _arg_repeated) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::ReverseStringList, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_ReverseStringList(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ )
+ }
+ fn RepeatParcelFileDescriptor<'a>(&'a self, _arg_read: &'a binder::parcel::ParcelFileDescriptor) -> binder::BoxFuture<'a, binder::public_api::Result<binder::parcel::ParcelFileDescriptor>> {
+ let _aidl_data = match self.build_parcel_RepeatParcelFileDescriptor(_arg_read) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RepeatParcelFileDescriptor, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RepeatParcelFileDescriptor(_arg_read, _aidl_reply)
+ }
+ )
+ }
+ fn ReverseParcelFileDescriptorArray<'a>(&'a self, _arg_input: &'a [binder::parcel::ParcelFileDescriptor], _arg_repeated: &'a mut Vec<Option<binder::parcel::ParcelFileDescriptor>>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<binder::parcel::ParcelFileDescriptor>>> {
+ let _aidl_data = match self.build_parcel_ReverseParcelFileDescriptorArray(_arg_input, _arg_repeated) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::ReverseParcelFileDescriptorArray, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_ReverseParcelFileDescriptorArray(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ )
+ }
+ fn ThrowServiceException<'a>(&'a self, _arg_code: i32) -> binder::BoxFuture<'a, binder::public_api::Result<()>> {
+ let _aidl_data = match self.build_parcel_ThrowServiceException(_arg_code) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::ThrowServiceException, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_ThrowServiceException(_arg_code, _aidl_reply)
+ }
+ )
+ }
+ fn RepeatNullableIntArray<'a>(&'a self, _arg_input: Option<&'a [i32]>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<Vec<i32>>>> {
+ let _aidl_data = match self.build_parcel_RepeatNullableIntArray(_arg_input) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RepeatNullableIntArray, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RepeatNullableIntArray(_arg_input, _aidl_reply)
+ }
+ )
+ }
+ fn RepeatNullableByteEnumArray<'a>(&'a self, _arg_input: Option<&'a [crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum]>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>>> {
+ let _aidl_data = match self.build_parcel_RepeatNullableByteEnumArray(_arg_input) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RepeatNullableByteEnumArray, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RepeatNullableByteEnumArray(_arg_input, _aidl_reply)
+ }
+ )
+ }
+ fn RepeatNullableIntEnumArray<'a>(&'a self, _arg_input: Option<&'a [crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum]>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>>> {
+ let _aidl_data = match self.build_parcel_RepeatNullableIntEnumArray(_arg_input) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RepeatNullableIntEnumArray, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RepeatNullableIntEnumArray(_arg_input, _aidl_reply)
+ }
+ )
+ }
+ fn RepeatNullableLongEnumArray<'a>(&'a self, _arg_input: Option<&'a [crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum]>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>>> {
+ let _aidl_data = match self.build_parcel_RepeatNullableLongEnumArray(_arg_input) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RepeatNullableLongEnumArray, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RepeatNullableLongEnumArray(_arg_input, _aidl_reply)
+ }
+ )
+ }
+ fn RepeatNullableString<'a>(&'a self, _arg_input: Option<&'a str>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<String>>> {
+ let _aidl_data = match self.build_parcel_RepeatNullableString(_arg_input) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RepeatNullableString, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RepeatNullableString(_arg_input, _aidl_reply)
+ }
+ )
+ }
+ fn RepeatNullableStringList<'a>(&'a self, _arg_input: Option<&'a [Option<String>]>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<Vec<Option<String>>>>> {
+ let _aidl_data = match self.build_parcel_RepeatNullableStringList(_arg_input) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RepeatNullableStringList, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RepeatNullableStringList(_arg_input, _aidl_reply)
+ }
+ )
+ }
+ fn RepeatNullableParcelable<'a>(&'a self, _arg_input: Option<&'a crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>> {
+ let _aidl_data = match self.build_parcel_RepeatNullableParcelable(_arg_input) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RepeatNullableParcelable, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RepeatNullableParcelable(_arg_input, _aidl_reply)
+ }
+ )
+ }
+ fn RepeatNullableParcelableArray<'a>(&'a self, _arg_input: Option<&'a [Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>>> {
+ let _aidl_data = match self.build_parcel_RepeatNullableParcelableArray(_arg_input) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RepeatNullableParcelableArray, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RepeatNullableParcelableArray(_arg_input, _aidl_reply)
+ }
+ )
+ }
+ fn RepeatNullableParcelableList<'a>(&'a self, _arg_input: Option<&'a [Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>>> {
+ let _aidl_data = match self.build_parcel_RepeatNullableParcelableList(_arg_input) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RepeatNullableParcelableList, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RepeatNullableParcelableList(_arg_input, _aidl_reply)
+ }
+ )
+ }
+ fn TakesAnIBinder<'a>(&'a self, _arg_input: &'a binder::SpIBinder) -> binder::BoxFuture<'a, binder::public_api::Result<()>> {
+ let _aidl_data = match self.build_parcel_TakesAnIBinder(_arg_input) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::TakesAnIBinder, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_TakesAnIBinder(_arg_input, _aidl_reply)
+ }
+ )
+ }
+ fn TakesANullableIBinder<'a>(&'a self, _arg_input: Option<&'a binder::SpIBinder>) -> binder::BoxFuture<'a, binder::public_api::Result<()>> {
+ let _aidl_data = match self.build_parcel_TakesANullableIBinder(_arg_input) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::TakesANullableIBinder, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_TakesANullableIBinder(_arg_input, _aidl_reply)
+ }
+ )
+ }
+ fn TakesAnIBinderList<'a>(&'a self, _arg_input: &'a [binder::SpIBinder]) -> binder::BoxFuture<'a, binder::public_api::Result<()>> {
+ let _aidl_data = match self.build_parcel_TakesAnIBinderList(_arg_input) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::TakesAnIBinderList, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_TakesAnIBinderList(_arg_input, _aidl_reply)
+ }
+ )
+ }
+ fn TakesANullableIBinderList<'a>(&'a self, _arg_input: Option<&'a [Option<binder::SpIBinder>]>) -> binder::BoxFuture<'a, binder::public_api::Result<()>> {
+ let _aidl_data = match self.build_parcel_TakesANullableIBinderList(_arg_input) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::TakesANullableIBinderList, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_TakesANullableIBinderList(_arg_input, _aidl_reply)
+ }
+ )
+ }
+ fn RepeatUtf8CppString<'a>(&'a self, _arg_token: &'a str) -> binder::BoxFuture<'a, binder::public_api::Result<String>> {
+ let _aidl_data = match self.build_parcel_RepeatUtf8CppString(_arg_token) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RepeatUtf8CppString, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RepeatUtf8CppString(_arg_token, _aidl_reply)
+ }
+ )
+ }
+ fn RepeatNullableUtf8CppString<'a>(&'a self, _arg_token: Option<&'a str>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<String>>> {
+ let _aidl_data = match self.build_parcel_RepeatNullableUtf8CppString(_arg_token) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RepeatNullableUtf8CppString, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RepeatNullableUtf8CppString(_arg_token, _aidl_reply)
+ }
+ )
+ }
+ fn ReverseUtf8CppString<'a>(&'a self, _arg_input: &'a [String], _arg_repeated: &'a mut Vec<String>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<String>>> {
+ let _aidl_data = match self.build_parcel_ReverseUtf8CppString(_arg_input, _arg_repeated) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::ReverseUtf8CppString, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_ReverseUtf8CppString(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ )
+ }
+ fn ReverseNullableUtf8CppString<'a>(&'a self, _arg_input: Option<&'a [Option<String>]>, _arg_repeated: &'a mut Option<Vec<Option<String>>>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<Vec<Option<String>>>>> {
+ let _aidl_data = match self.build_parcel_ReverseNullableUtf8CppString(_arg_input, _arg_repeated) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::ReverseNullableUtf8CppString, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_ReverseNullableUtf8CppString(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ )
+ }
+ fn ReverseUtf8CppStringList<'a>(&'a self, _arg_input: Option<&'a [Option<String>]>, _arg_repeated: &'a mut Option<Vec<Option<String>>>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<Vec<Option<String>>>>> {
+ let _aidl_data = match self.build_parcel_ReverseUtf8CppStringList(_arg_input, _arg_repeated) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::ReverseUtf8CppStringList, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_ReverseUtf8CppStringList(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ )
+ }
+ fn GetCallback<'a>(&'a self, _arg_return_null: bool) -> binder::BoxFuture<'a, binder::public_api::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>> {
+ let _aidl_data = match self.build_parcel_GetCallback(_arg_return_null) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::GetCallback, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_GetCallback(_arg_return_null, _aidl_reply)
+ }
+ )
+ }
+ fn FillOutStructuredParcelable<'a>(&'a self, _arg_parcel: &'a mut crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable) -> binder::BoxFuture<'a, binder::public_api::Result<()>> {
+ let _aidl_data = match self.build_parcel_FillOutStructuredParcelable(_arg_parcel) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::FillOutStructuredParcelable, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_FillOutStructuredParcelable(_arg_parcel, _aidl_reply)
+ }
+ )
+ }
+ fn RepeatExtendableParcelable<'a>(&'a self, _arg_ep: &'a crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable, _arg_ep2: &'a mut crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable) -> binder::BoxFuture<'a, binder::public_api::Result<()>> {
+ let _aidl_data = match self.build_parcel_RepeatExtendableParcelable(_arg_ep, _arg_ep2) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::RepeatExtendableParcelable, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_RepeatExtendableParcelable(_arg_ep, _arg_ep2, _aidl_reply)
+ }
+ )
+ }
+ fn ReverseList<'a>(&'a self, _arg_list: &'a crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList) -> binder::BoxFuture<'a, binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList>> {
+ let _aidl_data = match self.build_parcel_ReverseList(_arg_list) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::ReverseList, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_ReverseList(_arg_list, _aidl_reply)
+ }
+ )
+ }
+ fn ReverseIBinderArray<'a>(&'a self, _arg_input: &'a [binder::SpIBinder], _arg_repeated: &'a mut Vec<Option<binder::SpIBinder>>) -> binder::BoxFuture<'a, binder::public_api::Result<Vec<binder::SpIBinder>>> {
+ let _aidl_data = match self.build_parcel_ReverseIBinderArray(_arg_input, _arg_repeated) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::ReverseIBinderArray, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_ReverseIBinderArray(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ )
+ }
+ fn ReverseNullableIBinderArray<'a>(&'a self, _arg_input: Option<&'a [Option<binder::SpIBinder>]>, _arg_repeated: &'a mut Option<Vec<Option<binder::SpIBinder>>>) -> binder::BoxFuture<'a, binder::public_api::Result<Option<Vec<Option<binder::SpIBinder>>>>> {
+ let _aidl_data = match self.build_parcel_ReverseNullableIBinderArray(_arg_input, _arg_repeated) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::ReverseNullableIBinderArray, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_ReverseNullableIBinderArray(_arg_input, _arg_repeated, _aidl_reply)
+ }
+ )
+ }
+ fn GetOldNameInterface<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_IOldName>>> {
+ let _aidl_data = match self.build_parcel_GetOldNameInterface() {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::GetOldNameInterface, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_GetOldNameInterface(_aidl_reply)
+ }
+ )
+ }
+ fn GetNewNameInterface<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_INewName>>> {
+ let _aidl_data = match self.build_parcel_GetNewNameInterface() {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::GetNewNameInterface, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_GetNewNameInterface(_aidl_reply)
+ }
+ )
+ }
+ fn GetCppJavaTests<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<Option<binder::SpIBinder>>> {
+ let _aidl_data = match self.build_parcel_GetCppJavaTests() {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::GetCppJavaTests, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_GetCppJavaTests(_aidl_reply)
+ }
+ )
+ }
+ fn getBackendType<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_11_BackendType>> {
+ let _aidl_data = match self.build_parcel_getBackendType() {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::getBackendType, _aidl_data, binder::FLAG_CLEAR_BUF | binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_getBackendType(_aidl_reply)
+ }
+ )
+ }
+}
impl ITestService for binder::Binder<BnTestService> {
fn UnimplementedMethod(&self, _arg_arg: i32) -> binder::public_api::Result<i32> { self.0.UnimplementedMethod(_arg_arg) }
fn Deprecated(&self) -> binder::public_api::Result<()> { self.0.Deprecated() }
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/nested/INestedService.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/nested/INestedService.rs
index 61d7c50..7eab633 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/nested/INestedService.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/nested/INestedService.rs
@@ -8,6 +8,7 @@
native: BnNestedService(on_transact),
proxy: BpNestedService {
},
+ async: INestedServiceAsync,
}
}
pub trait INestedService: binder::Interface + Send {
@@ -21,6 +22,11 @@
std::mem::replace(&mut *DEFAULT_IMPL.lock().unwrap(), d)
}
}
+pub trait INestedServiceAsync<P>: binder::Interface + Send {
+ fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.nested.INestedService" }
+ fn flipStatus<'a>(&'a self, _arg_p: &'a crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested) -> binder::BoxFuture<'a, binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result>>;
+ fn flipStatusWithCallback<'a>(&'a self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _arg_cb: &'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback>) -> binder::BoxFuture<'a, binder::public_api::Result<()>>;
+}
pub trait INestedServiceDefault: Send + Sync {
fn flipStatus(&self, _arg_p: &crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested) -> binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
@@ -38,40 +44,84 @@
lazy_static! {
static ref DEFAULT_IMPL: std::sync::Mutex<INestedServiceDefaultRef> = std::sync::Mutex::new(None);
}
-impl INestedService for BpNestedService {
- fn flipStatus(&self, _arg_p: &crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested) -> binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result> {
- let _aidl_reply = self.binder.transact(transactions::flipStatus, binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.write(_arg_p)?;
- Ok(())
- });
+impl BpNestedService {
+ fn build_parcel_flipStatus(&self, _arg_p: &crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.write(_arg_p)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_flipStatus(&self, _arg_p: &crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as INestedService>::getDefaultImpl() {
return _aidl_default_impl.flipStatus(_arg_p);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
let _aidl_return: crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result = _aidl_reply.read()?;
Ok(_aidl_return)
}
- fn flipStatusWithCallback(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _arg_cb: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback>) -> binder::public_api::Result<()> {
- let _aidl_reply = self.binder.transact(transactions::flipStatusWithCallback, binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.write(&_arg_status)?;
- _aidl_data.write(_arg_cb)?;
- Ok(())
- });
+ fn build_parcel_flipStatusWithCallback(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _arg_cb: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback>) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.write(&_arg_status)?;
+ aidl_data.write(_arg_cb)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_flipStatusWithCallback(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _arg_cb: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback>, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as INestedService>::getDefaultImpl() {
return _aidl_default_impl.flipStatusWithCallback(_arg_status, _arg_cb);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
Ok(())
}
}
+impl INestedService for BpNestedService {
+ fn flipStatus(&self, _arg_p: &crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested) -> binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result> {
+ let _aidl_data = self.build_parcel_flipStatus(_arg_p)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::flipStatus, _aidl_data, binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_flipStatus(_arg_p, _aidl_reply)
+ }
+ fn flipStatusWithCallback(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _arg_cb: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback>) -> binder::public_api::Result<()> {
+ let _aidl_data = self.build_parcel_flipStatusWithCallback(_arg_status, _arg_cb)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::flipStatusWithCallback, _aidl_data, binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_flipStatusWithCallback(_arg_status, _arg_cb, _aidl_reply)
+ }
+}
+impl<P: binder::BinderAsyncPool> INestedServiceAsync<P> for BpNestedService {
+ fn flipStatus<'a>(&'a self, _arg_p: &'a crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested) -> binder::BoxFuture<'a, binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result>> {
+ let _aidl_data = match self.build_parcel_flipStatus(_arg_p) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::flipStatus, _aidl_data, binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_flipStatus(_arg_p, _aidl_reply)
+ }
+ )
+ }
+ fn flipStatusWithCallback<'a>(&'a self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _arg_cb: &'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback>) -> binder::BoxFuture<'a, binder::public_api::Result<()>> {
+ let _aidl_data = match self.build_parcel_flipStatusWithCallback(_arg_status, _arg_cb) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::flipStatusWithCallback, _aidl_data, binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_flipStatusWithCallback(_arg_status, _arg_cb, _aidl_reply)
+ }
+ )
+ }
+}
impl INestedService for binder::Binder<BnNestedService> {
fn flipStatus(&self, _arg_p: &crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested) -> binder::public_api::Result<crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result> { self.0.flipStatus(_arg_p) }
fn flipStatusWithCallback(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _arg_cb: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback>) -> binder::public_api::Result<()> { self.0.flipStatusWithCallback(_arg_status, _arg_cb) }
@@ -149,6 +199,7 @@
native: BnCallback(on_transact),
proxy: BpCallback {
},
+ async: ICallbackAsync,
}
}
pub trait ICallback: binder::Interface + Send {
@@ -161,6 +212,10 @@
std::mem::replace(&mut *DEFAULT_IMPL.lock().unwrap(), d)
}
}
+ pub trait ICallbackAsync<P>: binder::Interface + Send {
+ fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.nested.INestedService.ICallback" }
+ fn done<'a>(&'a self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status) -> binder::BoxFuture<'a, binder::public_api::Result<()>>;
+ }
pub trait ICallbackDefault: Send + Sync {
fn done(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status) -> binder::public_api::Result<()> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
@@ -174,23 +229,47 @@
lazy_static! {
static ref DEFAULT_IMPL: std::sync::Mutex<ICallbackDefaultRef> = std::sync::Mutex::new(None);
}
- impl ICallback for BpCallback {
- fn done(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status) -> binder::public_api::Result<()> {
- let _aidl_reply = self.binder.transact(transactions::done, binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- _aidl_data.write(&_arg_status)?;
- Ok(())
- });
+ impl BpCallback {
+ fn build_parcel_done(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ aidl_data.write(&_arg_status)?;
+ Ok(aidl_data_owned)
+ }
+ fn read_response_done(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ICallback>::getDefaultImpl() {
return _aidl_default_impl.done(_arg_status);
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
Ok(())
}
}
+ impl ICallback for BpCallback {
+ fn done(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status) -> binder::public_api::Result<()> {
+ let _aidl_data = self.build_parcel_done(_arg_status)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::done, _aidl_data, binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_done(_arg_status, _aidl_reply)
+ }
+ }
+ impl<P: binder::BinderAsyncPool> ICallbackAsync<P> for BpCallback {
+ fn done<'a>(&'a self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status) -> binder::BoxFuture<'a, binder::public_api::Result<()>> {
+ let _aidl_data = match self.build_parcel_done(_arg_status) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::done, _aidl_data, binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_done(_arg_status, _aidl_reply)
+ }
+ )
+ }
+ }
impl ICallback for binder::Binder<BnCallback> {
fn done(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status) -> binder::public_api::Result<()> { self.0.done(_arg_status) }
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/permission/IProtected.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/permission/IProtected.rs
index e8ef428..6d8d0ca 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/permission/IProtected.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/permission/IProtected.rs
@@ -8,6 +8,7 @@
native: BnProtected(on_transact),
proxy: BpProtected {
},
+ async: IProtectedAsync,
}
}
pub trait IProtected: binder::Interface + Send {
@@ -22,6 +23,12 @@
std::mem::replace(&mut *DEFAULT_IMPL.lock().unwrap(), d)
}
}
+pub trait IProtectedAsync<P>: binder::Interface + Send {
+ fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.permission.IProtected" }
+ fn PermissionProtected<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<()>>;
+ fn MultiplePermissions<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<()>>;
+ fn MultiplePermissions2<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<()>>;
+}
pub trait IProtectedDefault: Send + Sync {
fn PermissionProtected(&self) -> binder::public_api::Result<()> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
@@ -43,50 +50,114 @@
lazy_static! {
static ref DEFAULT_IMPL: std::sync::Mutex<IProtectedDefaultRef> = std::sync::Mutex::new(None);
}
-impl IProtected for BpProtected {
- fn PermissionProtected(&self) -> binder::public_api::Result<()> {
- let _aidl_reply = self.binder.transact(transactions::PermissionProtected, binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- Ok(())
- });
+impl BpProtected {
+ fn build_parcel_PermissionProtected(&self) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ Ok(aidl_data_owned)
+ }
+ fn read_response_PermissionProtected(&self, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as IProtected>::getDefaultImpl() {
return _aidl_default_impl.PermissionProtected();
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
Ok(())
}
- fn MultiplePermissions(&self) -> binder::public_api::Result<()> {
- let _aidl_reply = self.binder.transact(transactions::MultiplePermissions, binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- Ok(())
- });
+ fn build_parcel_MultiplePermissions(&self) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ Ok(aidl_data_owned)
+ }
+ fn read_response_MultiplePermissions(&self, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as IProtected>::getDefaultImpl() {
return _aidl_default_impl.MultiplePermissions();
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
Ok(())
}
- fn MultiplePermissions2(&self) -> binder::public_api::Result<()> {
- let _aidl_reply = self.binder.transact(transactions::MultiplePermissions2, binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- Ok(())
- });
+ fn build_parcel_MultiplePermissions2(&self) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ Ok(aidl_data_owned)
+ }
+ fn read_response_MultiplePermissions2(&self, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as IProtected>::getDefaultImpl() {
return _aidl_default_impl.MultiplePermissions2();
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
Ok(())
}
}
+impl IProtected for BpProtected {
+ fn PermissionProtected(&self) -> binder::public_api::Result<()> {
+ let _aidl_data = self.build_parcel_PermissionProtected()?;
+ let _aidl_reply = self.binder.submit_transact(transactions::PermissionProtected, _aidl_data, binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_PermissionProtected(_aidl_reply)
+ }
+ fn MultiplePermissions(&self) -> binder::public_api::Result<()> {
+ let _aidl_data = self.build_parcel_MultiplePermissions()?;
+ let _aidl_reply = self.binder.submit_transact(transactions::MultiplePermissions, _aidl_data, binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_MultiplePermissions(_aidl_reply)
+ }
+ fn MultiplePermissions2(&self) -> binder::public_api::Result<()> {
+ let _aidl_data = self.build_parcel_MultiplePermissions2()?;
+ let _aidl_reply = self.binder.submit_transact(transactions::MultiplePermissions2, _aidl_data, binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_MultiplePermissions2(_aidl_reply)
+ }
+}
+impl<P: binder::BinderAsyncPool> IProtectedAsync<P> for BpProtected {
+ fn PermissionProtected<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<()>> {
+ let _aidl_data = match self.build_parcel_PermissionProtected() {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::PermissionProtected, _aidl_data, binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_PermissionProtected(_aidl_reply)
+ }
+ )
+ }
+ fn MultiplePermissions<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<()>> {
+ let _aidl_data = match self.build_parcel_MultiplePermissions() {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::MultiplePermissions, _aidl_data, binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_MultiplePermissions(_aidl_reply)
+ }
+ )
+ }
+ fn MultiplePermissions2<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<()>> {
+ let _aidl_data = match self.build_parcel_MultiplePermissions2() {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::MultiplePermissions2, _aidl_data, binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_MultiplePermissions2(_aidl_reply)
+ }
+ )
+ }
+}
impl IProtected for binder::Binder<BnProtected> {
fn PermissionProtected(&self) -> binder::public_api::Result<()> { self.0.PermissionProtected() }
fn MultiplePermissions(&self) -> binder::public_api::Result<()> { self.0.MultiplePermissions() }
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/permission/IProtectedInterface.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/permission/IProtectedInterface.rs
index 6ac11f7..22dc96a 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/permission/IProtectedInterface.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/permission/IProtectedInterface.rs
@@ -8,6 +8,7 @@
native: BnProtectedInterface(on_transact),
proxy: BpProtectedInterface {
},
+ async: IProtectedInterfaceAsync,
}
}
pub trait IProtectedInterface: binder::Interface + Send {
@@ -21,6 +22,11 @@
std::mem::replace(&mut *DEFAULT_IMPL.lock().unwrap(), d)
}
}
+pub trait IProtectedInterfaceAsync<P>: binder::Interface + Send {
+ fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.permission.IProtectedInterface" }
+ fn Method1<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<()>>;
+ fn Method2<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<()>>;
+}
pub trait IProtectedInterfaceDefault: Send + Sync {
fn Method1(&self) -> binder::public_api::Result<()> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
@@ -38,36 +44,80 @@
lazy_static! {
static ref DEFAULT_IMPL: std::sync::Mutex<IProtectedInterfaceDefaultRef> = std::sync::Mutex::new(None);
}
-impl IProtectedInterface for BpProtectedInterface {
- fn Method1(&self) -> binder::public_api::Result<()> {
- let _aidl_reply = self.binder.transact(transactions::Method1, binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- Ok(())
- });
+impl BpProtectedInterface {
+ fn build_parcel_Method1(&self) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ Ok(aidl_data_owned)
+ }
+ fn read_response_Method1(&self, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as IProtectedInterface>::getDefaultImpl() {
return _aidl_default_impl.Method1();
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
Ok(())
}
- fn Method2(&self) -> binder::public_api::Result<()> {
- let _aidl_reply = self.binder.transact(transactions::Method2, binder::FLAG_PRIVATE_LOCAL, |_aidl_data| {
- Ok(())
- });
+ fn build_parcel_Method2(&self) -> binder::public_api::Result<binder::OwnedParcel> {
+ let mut aidl_data_owned = self.binder.prepare_transact()?;
+ let mut aidl_data = aidl_data_owned.borrowed();
+ Ok(aidl_data_owned)
+ }
+ fn read_response_Method2(&self, _aidl_reply: binder::Result<binder::OwnedParcel>) -> binder::public_api::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as IProtectedInterface>::getDefaultImpl() {
return _aidl_default_impl.Method2();
}
}
- let _aidl_reply = _aidl_reply?;
+ let _aidl_reply = _aidl_reply?.into_parcel();
let _aidl_status: binder::Status = _aidl_reply.read()?;
if !_aidl_status.is_ok() { return Err(_aidl_status); }
Ok(())
}
}
+impl IProtectedInterface for BpProtectedInterface {
+ fn Method1(&self) -> binder::public_api::Result<()> {
+ let _aidl_data = self.build_parcel_Method1()?;
+ let _aidl_reply = self.binder.submit_transact(transactions::Method1, _aidl_data, binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_Method1(_aidl_reply)
+ }
+ fn Method2(&self) -> binder::public_api::Result<()> {
+ let _aidl_data = self.build_parcel_Method2()?;
+ let _aidl_reply = self.binder.submit_transact(transactions::Method2, _aidl_data, binder::FLAG_PRIVATE_LOCAL);
+ self.read_response_Method2(_aidl_reply)
+ }
+}
+impl<P: binder::BinderAsyncPool> IProtectedInterfaceAsync<P> for BpProtectedInterface {
+ fn Method1<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<()>> {
+ let _aidl_data = match self.build_parcel_Method1() {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::Method1, _aidl_data, binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_Method1(_aidl_reply)
+ }
+ )
+ }
+ fn Method2<'a>(&'a self) -> binder::BoxFuture<'a, binder::public_api::Result<()>> {
+ let _aidl_data = match self.build_parcel_Method2() {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::Method2, _aidl_data, binder::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_Method2(_aidl_reply)
+ }
+ )
+ }
+}
impl IProtectedInterface for binder::Binder<BnProtectedInterface> {
fn Method1(&self) -> binder::public_api::Result<()> { self.0.Method1() }
fn Method2(&self) -> binder::public_api::Result<()> { self.0.Method2() }