Adds tests to verify proper marshaling of vectors of interface types.

Bug: 30570663
Test: hidl_test
Change-Id: I1e4d1f826773abbde6b9019eb6af90ac64007e38
diff --git a/tests/bar/1.0/default/Bar.cpp b/tests/bar/1.0/default/Bar.cpp
index 4433802..6da9eec 100644
--- a/tests/bar/1.0/default/Bar.cpp
+++ b/tests/bar/1.0/default/Bar.cpp
@@ -118,6 +118,22 @@
     return mFoo->sendVecVec(_hidl_cb);
 }
 
+Return<void> Bar::haveAVectorOfInterfaces(
+        const hidl_vec<sp<ISimple> > &in,
+        haveAVectorOfInterfaces_cb _hidl_cb) {
+    _hidl_cb(in);
+
+    return Void();
+}
+
+Return<void> Bar::haveAVectorOfGenericInterfaces(
+        const hidl_vec<sp<android::hardware::IBinder> > &in,
+        haveAVectorOfGenericInterfaces_cb _hidl_cb) {
+    _hidl_cb(in);
+
+    return Void();
+}
+
 // Methods from ::android::hardware::tests::bar::V1_0::IBar follow.
 Return<void> Bar::thisIsNew()  {
     ALOGI("SERVER(Bar) thisIsNew");
diff --git a/tests/bar/1.0/default/Bar.h b/tests/bar/1.0/default/Bar.h
index 58d9f9a..ae18d93 100644
--- a/tests/bar/1.0/default/Bar.h
+++ b/tests/bar/1.0/default/Bar.h
@@ -16,6 +16,7 @@
 using ::android::hardware::tests::foo::V1_0::Abc;
 using ::android::hardware::tests::foo::V1_0::IFoo;
 using ::android::hardware::tests::foo::V1_0::IFooCallback;
+using ::android::hardware::tests::foo::V1_0::ISimple;
 using ::android::hardware::Return;
 using ::android::hardware::Void;
 using ::android::hardware::hidl_vec;
@@ -49,6 +50,14 @@
     virtual Return<void> sendVec(const hidl_vec<uint8_t>& data, sendVec_cb _hidl_cb)  override;
     virtual Return<void> sendVecVec(sendVecVec_cb _hidl_cb)  override;
 
+    Return<void> haveAVectorOfInterfaces(
+            const hidl_vec<sp<ISimple> > &in,
+            haveAVectorOfInterfaces_cb _hidl_cb) override;
+
+    Return<void> haveAVectorOfGenericInterfaces(
+            const hidl_vec<sp<android::hardware::IBinder> > &in,
+            haveAVectorOfGenericInterfaces_cb _hidl_cb) override;
+
     // Methods from ::android::hardware::tests::bar::V1_0::IBar follow.
     Return<void> thisIsNew()  override;