Do not enforce minor version uprev on imports.

For example, if A imports B and we run hidl-gen on A, we should
not check minor version uprev requirement on B; this is an overkill.
Eventually, hidl-gen needs to be run on B to generate the required
sources, then we can enforce the restrictions there.

This CL is needed because enforceRestrictionsOnPackage internally
calls parse, and the recursion should not go on forever. Stopping
at imports are a good base case for the recursion.

Test: pass
Test: hardware/interfaces/update-makefiles.sh
Test: ./system/tools/hidl/test/test.sh
Test: hidl-gen -o /tmp -Ljava -randroid.hardware:hardware/interfaces
-rtests:system/tools/hidl/test -randroid.hidl:system/libhidl/transport
android.hardware.usb@1.1::IUsbCallback

Bug: 36787547
Change-Id: Id4363a42d6ba8c9b747c7430c79348552cc8139d
Merged-In: Id4363a42d6ba8c9b747c7430c79348552cc8139d
diff --git a/Coordinator.h b/Coordinator.h
index 0aefb40..ddf5dfa 100644
--- a/Coordinator.h
+++ b/Coordinator.h
@@ -44,7 +44,9 @@
     // file if it exists.
     // If "parsedASTs" is non-NULL, successfully parsed ASTs are inserted
     // into the set.
-    AST *parse(const FQName &fqName, std::set<AST *> *parsedASTs = nullptr);
+    // If !enforce, enforceRestrictionsOnPackage won't be run.
+    AST *parse(const FQName &fqName, std::set<AST *> *parsedASTs = nullptr,
+            bool enforce = true);
 
     // Given package-root paths of ["hardware/interfaces",
     // "vendor/<something>/interfaces"], package roots of