Set parcel attached binder.

This is used so that the format of the transaction is known.

For C++ backend only (the NDK backend and therefore Rust already has a
similar API). The Java backend currently doesn't have support for this.

Bug: 167966510
Test: binderRpcTest
Change-Id: Ib29e1039c555f30d2ffe98d85270e1dbb741192c
diff --git a/generate_cpp_unittest.cpp b/generate_cpp_unittest.cpp
index 8a1b23f..a88ae9e 100644
--- a/generate_cpp_unittest.cpp
+++ b/generate_cpp_unittest.cpp
@@ -101,6 +101,7 @@
 
 ::android::binder::Status BpComplexTypeInterface::Send(const ::std::optional<::std::vector<int32_t>>& goes_in, ::std::vector<double>* goes_in_and_out, ::std::vector<bool>* goes_out, ::std::vector<int32_t>* _aidl_return) {
   ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remote());
   ::android::Parcel _aidl_reply;
   ::android::status_t _aidl_ret_status = ::android::OK;
   ::android::binder::Status _aidl_status;
@@ -153,6 +154,7 @@
 
 ::android::binder::Status BpComplexTypeInterface::Piff(int32_t times) {
   ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remote());
   ::android::Parcel _aidl_reply;
   ::android::status_t _aidl_ret_status = ::android::OK;
   ::android::binder::Status _aidl_status;
@@ -178,6 +180,7 @@
 
 ::android::binder::Status BpComplexTypeInterface::TakesABinder(const ::android::sp<::foo::IFooType>& f, ::android::sp<::foo::IFooType>* _aidl_return) {
   ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remote());
   ::android::Parcel _aidl_reply;
   ::android::status_t _aidl_ret_status = ::android::OK;
   ::android::binder::Status _aidl_status;
@@ -214,6 +217,7 @@
 
 ::android::binder::Status BpComplexTypeInterface::NullableBinder(::android::sp<::foo::IFooType>* _aidl_return) {
   ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remote());
   ::android::Parcel _aidl_reply;
   ::android::status_t _aidl_ret_status = ::android::OK;
   ::android::binder::Status _aidl_status;
@@ -246,6 +250,7 @@
 
 ::android::binder::Status BpComplexTypeInterface::StringListMethod(const ::std::vector<::android::String16>& input, ::std::vector<::android::String16>* output, ::std::vector<::android::String16>* _aidl_return) {
   ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remote());
   ::android::Parcel _aidl_reply;
   ::android::status_t _aidl_ret_status = ::android::OK;
   ::android::binder::Status _aidl_status;
@@ -286,6 +291,7 @@
 
 ::android::binder::Status BpComplexTypeInterface::BinderListMethod(const ::std::vector<::android::sp<::android::IBinder>>& input, ::std::vector<::android::sp<::android::IBinder>>* output, ::std::vector<::android::sp<::android::IBinder>>* _aidl_return) {
   ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remote());
   ::android::Parcel _aidl_reply;
   ::android::status_t _aidl_ret_status = ::android::OK;
   ::android::binder::Status _aidl_status;
@@ -326,6 +332,7 @@
 
 ::android::binder::Status BpComplexTypeInterface::TakesAFileDescriptor(::android::base::unique_fd f, ::android::base::unique_fd* _aidl_return) {
   ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remote());
   ::android::Parcel _aidl_reply;
   ::android::status_t _aidl_ret_status = ::android::OK;
   ::android::binder::Status _aidl_status;
@@ -362,6 +369,7 @@
 
 ::android::binder::Status BpComplexTypeInterface::TakesAFileDescriptorArray(const ::std::vector<::android::base::unique_fd>& f, ::std::vector<::android::base::unique_fd>* _aidl_return) {
   ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remote());
   ::android::Parcel _aidl_reply;
   ::android::status_t _aidl_ret_status = ::android::OK;
   ::android::binder::Status _aidl_status;
@@ -417,6 +425,7 @@
 
 ::android::binder::Status BpComplexTypeInterface::Send(const ::std::optional<::std::vector<int32_t>>& goes_in, ::std::vector<double>* goes_in_and_out, ::std::vector<bool>* goes_out, ::std::vector<int32_t>* _aidl_return) {
   ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remote());
   ::android::Parcel _aidl_reply;
   ::android::status_t _aidl_ret_status = ::android::OK;
   ::android::binder::Status _aidl_status;
@@ -470,6 +479,7 @@
 
 ::android::binder::Status BpComplexTypeInterface::Piff(int32_t times) {
   ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remote());
   ::android::Parcel _aidl_reply;
   ::android::status_t _aidl_ret_status = ::android::OK;
   ::android::binder::Status _aidl_status;
@@ -496,6 +506,7 @@
 
 ::android::binder::Status BpComplexTypeInterface::TakesABinder(const ::android::sp<::foo::IFooType>& f, ::android::sp<::foo::IFooType>* _aidl_return) {
   ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remote());
   ::android::Parcel _aidl_reply;
   ::android::status_t _aidl_ret_status = ::android::OK;
   ::android::binder::Status _aidl_status;
@@ -533,6 +544,7 @@
 
 ::android::binder::Status BpComplexTypeInterface::NullableBinder(::android::sp<::foo::IFooType>* _aidl_return) {
   ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remote());
   ::android::Parcel _aidl_reply;
   ::android::status_t _aidl_ret_status = ::android::OK;
   ::android::binder::Status _aidl_status;
@@ -566,6 +578,7 @@
 
 ::android::binder::Status BpComplexTypeInterface::StringListMethod(const ::std::vector<::android::String16>& input, ::std::vector<::android::String16>* output, ::std::vector<::android::String16>* _aidl_return) {
   ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remote());
   ::android::Parcel _aidl_reply;
   ::android::status_t _aidl_ret_status = ::android::OK;
   ::android::binder::Status _aidl_status;
@@ -607,6 +620,7 @@
 
 ::android::binder::Status BpComplexTypeInterface::BinderListMethod(const ::std::vector<::android::sp<::android::IBinder>>& input, ::std::vector<::android::sp<::android::IBinder>>* output, ::std::vector<::android::sp<::android::IBinder>>* _aidl_return) {
   ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remote());
   ::android::Parcel _aidl_reply;
   ::android::status_t _aidl_ret_status = ::android::OK;
   ::android::binder::Status _aidl_status;
@@ -648,6 +662,7 @@
 
 ::android::binder::Status BpComplexTypeInterface::TakesAFileDescriptor(::android::base::unique_fd f, ::android::base::unique_fd* _aidl_return) {
   ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remote());
   ::android::Parcel _aidl_reply;
   ::android::status_t _aidl_ret_status = ::android::OK;
   ::android::binder::Status _aidl_status;
@@ -685,6 +700,7 @@
 
 ::android::binder::Status BpComplexTypeInterface::TakesAFileDescriptorArray(const ::std::vector<::android::base::unique_fd>& f, ::std::vector<::android::base::unique_fd>* _aidl_return) {
   ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remote());
   ::android::Parcel _aidl_reply;
   ::android::status_t _aidl_ret_status = ::android::OK;
   ::android::binder::Status _aidl_status;