Support vec<memory> in HIDL.

Test: hidl interfaces compile with vec<memory>
Test: hidl_test

Bug: 36727951
Bug: 63899698

Merged-In: I68092eda26a6ead11bd09ea6c9bb64655207cb5f
Change-Id: I68092eda26a6ead11bd09ea6c9bb64655207cb5f
diff --git a/VectorType.cpp b/VectorType.cpp
index 22c997f..4d1dae8 100644
--- a/VectorType.cpp
+++ b/VectorType.cpp
@@ -55,6 +55,9 @@
     if (elementType->isHandle()) {
         return true;
     }
+    if (elementType->isMemory()) {
+        return true;
+    }
     if (elementType->isTemplatedType()) {
         Type *inner = static_cast<TemplatedType *>(elementType)->getElementType();
         return this->isCompatibleElementType(inner) && !inner->isInterface();