Update package path for Java.

We used to put IFoo.java with package android.hardware.foo.V1_0
under android/hardware/foo/1.0; the last element is fixed to
V1_0.

Test: compiles
Test: hidl_test_java

Bug: 33554192
Change-Id: I6a6a7d6c0a4c95e7c0797643bc98bec5c12889ca
diff --git a/Coordinator.cpp b/Coordinator.cpp
index 284bbce..11e24f8 100644
--- a/Coordinator.cpp
+++ b/Coordinator.cpp
@@ -194,7 +194,7 @@
 }
 
 std::string Coordinator::getPackagePath(
-        const FQName &fqName, bool relative) const {
+        const FQName &fqName, bool relative, bool sanitized) const {
 
     auto it = findPackageRoot(fqName);
     auto prefix = *it;
@@ -230,7 +230,7 @@
     packagePath.append(packageSuffix.substr(startPos));
     packagePath.append("/");
 
-    packagePath.append(fqName.version());
+    packagePath.append(sanitized ? fqName.sanitizedVersion() : fqName.version());
     packagePath.append("/");
 
     return packagePath;