Update hidl-gen to generate full name for vts attributes.

* This is used to handle namespace issue with vts compiler.

Bug: 32410739
Test: make hidl-gen, update generated vts files for nfc and vibrate then
make vts

Change-Id: I38dc8240afb28c1cfa75723289dfcbcff4766af5
diff --git a/CompoundType.cpp b/CompoundType.cpp
index eb5d083..870402b 100644
--- a/CompoundType.cpp
+++ b/CompoundType.cpp
@@ -758,7 +758,7 @@
 }
 
 status_t CompoundType::emitVtsTypeDeclarations(Formatter &out) const {
-    out << "name: \"" << localName() << "\"\n";
+    out << "name: \"" << fullName() << "\"\n";
     out << "type: " << getVtsType() << "\n";
 
     // Emit declaration for each subtype.
@@ -813,7 +813,7 @@
 
 status_t CompoundType::emitVtsAttributeType(Formatter &out) const {
     out << "type: " << getVtsType() << "\n";
-    out << "predefined_type: \"" << localName() << "\"\n";
+    out << "predefined_type: \"" << fullName() << "\"\n";
     return OK;
 }
 
diff --git a/EnumType.cpp b/EnumType.cpp
index 1905a3e..27c0075 100644
--- a/EnumType.cpp
+++ b/EnumType.cpp
@@ -295,7 +295,7 @@
 }
 
 status_t EnumType::emitVtsTypeDeclarations(Formatter &out) const {
-    out << "name: \"" << localName() << "\"\n";
+    out << "name: \"" << fullName() << "\"\n";
     out << "type: " << getVtsType() << "\n";
     out << "enum_value: {\n";
     out.indent();
@@ -334,7 +334,7 @@
 
 status_t EnumType::emitVtsAttributeType(Formatter &out) const {
     out << "type: " << getVtsType() << "\n";
-    out << "predefined_type: \"" << localName() << "\"\n";
+    out << "predefined_type: \"" << fullName() << "\"\n";
     return OK;
 }
 
diff --git a/test/data/android/hardware/nfc/1.0/NfcClientCallback.vts b/test/data/android/hardware/nfc/1.0/NfcClientCallback.vts
index e2a3e5b..e39ea7c 100644
--- a/test/data/android/hardware/nfc/1.0/NfcClientCallback.vts
+++ b/test/data/android/hardware/nfc/1.0/NfcClientCallback.vts
@@ -11,11 +11,11 @@
         name: "sendEvent"
         arg: {
             type: TYPE_ENUM
-            predefined_type: "NfcEvent"
+            predefined_type: "::android::hardware::nfc::V1_0::NfcEvent"
         }
         arg: {
             type: TYPE_ENUM
-            predefined_type: "NfcStatus"
+            predefined_type: "::android::hardware::nfc::V1_0::NfcStatus"
         }
     }
 
diff --git a/test/data/android/hardware/nfc/1.0/types.vts b/test/data/android/hardware/nfc/1.0/types.vts
index 8e4f93b..e43db1e 100644
--- a/test/data/android/hardware/nfc/1.0/types.vts
+++ b/test/data/android/hardware/nfc/1.0/types.vts
@@ -6,7 +6,7 @@
 
 
 attribute: {
-    name: "NfcEvent"
+    name: "::android::hardware::nfc::V1_0::NfcEvent"
     type: TYPE_ENUM
     enum_value: {
         scalar_type: "uint32_t"
@@ -43,7 +43,7 @@
 }
 
 attribute: {
-    name: "NfcStatus"
+    name: "::android::hardware::nfc::V1_0::NfcStatus"
     type: TYPE_ENUM
     enum_value: {
         scalar_type: "uint32_t"