Remove getInterfaceVersion from hidl interfaces.

It's not used anywhere and serves no purpose.

V1_0 maps to {1, 0} via getInterfaceVersion. However, the information
this converys was originally only for certain version checks.
getInterfaceChain provides functionality that actually used.

Bug: 34041669
Test: hidl_test

Note this will require all hals on a device to be recompiled. This is
what I used to test where phone-kill kills a service on the device:

make -j64 android.hidl.memory@1.0{,-impl,-service} hwservicemanager hidl_test &&
adb sync && phone-kill hwservicemanager && phone-kill
android.hidl.memory@1.0-service && adb shell
./data/nativetest64/hidl_test/hidl_test64

Change-Id: I1a756a24393a7d05024b23a90bb7f5b17e3abb58
diff --git a/generateCpp.cpp b/generateCpp.cpp
index dd937de..55bbe40 100644
--- a/generateCpp.cpp
+++ b/generateCpp.cpp
@@ -325,15 +325,6 @@
         const Interface *iface = mRootScope->getInterface();
         const Interface *superType = iface->superType();
         const std::string baseName = iface->getBaseName();
-        out << "constexpr static ::android::hardware::hidl_version version = {"
-            << mPackage.getPackageMajorVersion() << ", "
-            << mPackage.getPackageMinorVersion() << "};\n";
-        out << "virtual const ::android::hardware::hidl_version &"
-            << "getInterfaceVersion() const {\n";
-        out.indent();
-        out << "return version;\n";
-        out.unindent();
-        out << "}\n\n";
         out << "virtual bool isRemote() const ";
         if (!isIBase()) {
             out << "override ";
@@ -944,9 +935,6 @@
 
     if (err == OK && isInterface) {
         const Interface *iface = mRootScope->getInterface();
-        out << "constexpr ::android::hardware::hidl_version "
-            << ifaceName
-            << "::version;\n\n";
 
         // need to be put here, generateStubSource is using this.
         out << "const char* I"
diff --git a/hidl-gen_y.yy b/hidl-gen_y.yy
index 4548b68..63c3883 100644
--- a/hidl-gen_y.yy
+++ b/hidl-gen_y.yy
@@ -52,7 +52,7 @@
     static const std::vector<std::string> reserved({
         // Injected names to interfaces by auto-generated code
         "isRemote", "descriptor", "hidlStaticBlock", "onTransact",
-        "castFrom", "version", "getInterfaceVersion", "Proxy", "Stub",
+        "castFrom", "Proxy", "Stub",
 
         // Inherited methods from IBase is detected in addMethod. Not added here
         // because we need hidl-gen to compile IBase.