The hidl-gen Java backend now supports structures (NOT unions) and types.hal

files.

Bug: 30575790
Change-Id: I6461235a1c469ce1bdb279bfa3d531113c5788f9
diff --git a/AST.cpp b/AST.cpp
index 66e54c4..3ec24fb 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -246,6 +246,11 @@
                     resolvedName.package(), resolvedName.version(), "types");
 
             mImportedNames.insert(typesName);
+
+            if (resolvedType->isNamedType()) {
+                mImportedNamesForJava.insert(
+                        static_cast<NamedType *>(resolvedType)->fqName());
+            }
         } else {
             // Do _not_ use fqName, i.e. the name we used to look up the type,
             // but instead use the name of the interface we found.
@@ -255,6 +260,9 @@
 
             mImportedNames.insert(
                     static_cast<Interface *>(resolvedType)->fqName());
+
+            mImportedNamesForJava.insert(
+                    static_cast<Interface *>(resolvedType)->fqName());
         }
     }