fix import paths when compiling snapshots

When compiling snapshots we should import
- snapshot dir (e.g <foo-iface>/aidl_api/foo-iface/1)
- "current" of imported interfaces
  (e.g <bar-iface>/aidl_api/bar-iface/current)

Previously, the snapshot of generated sources(e.g. hidl2aidl_test_gen)
caused the build error due to the wrong import path.

Bug: 189288369
Test: aidl_unitttests
Test: m hidl2aidl_test_gen-freeze-api
      m
Change-Id: I92f8e290b89c737f4b16fc064e763bd47cd1a9da
diff --git a/build/aidl_interface_backends.go b/build/aidl_interface_backends.go
index b085d67..bff809b 100644
--- a/build/aidl_interface_backends.go
+++ b/build/aidl_interface_backends.go
@@ -75,7 +75,8 @@
 	}, &aidlGenProperties{
 		Srcs:                  srcs,
 		AidlRoot:              aidlRoot,
-		ImportsWithoutVersion: concat(i.properties.ImportsWithoutVersion, []string{i.ModuleBase.Name()}),
+		IsToT:                 version == i.nextVersion(),
+		ImportsWithoutVersion: i.properties.ImportsWithoutVersion,
 		Stability:             i.properties.Stability,
 		Lang:                  lang,
 		BaseName:              i.ModuleBase.Name(),
@@ -232,7 +233,8 @@
 	}, &aidlGenProperties{
 		Srcs:                  srcs,
 		AidlRoot:              aidlRoot,
-		ImportsWithoutVersion: concat(i.properties.ImportsWithoutVersion, []string{i.ModuleBase.Name()}),
+		IsToT:                 version == i.nextVersion(),
+		ImportsWithoutVersion: i.properties.ImportsWithoutVersion,
 		Stability:             i.properties.Stability,
 		Lang:                  langJava,
 		BaseName:              i.ModuleBase.Name(),
@@ -280,7 +282,8 @@
 	}, &aidlGenProperties{
 		Srcs:                  srcs,
 		AidlRoot:              aidlRoot,
-		ImportsWithoutVersion: concat(i.properties.ImportsWithoutVersion, []string{i.ModuleBase.Name()}),
+		ImportsWithoutVersion: i.properties.ImportsWithoutVersion,
+		IsToT:                 version == i.nextVersion(),
 		Stability:             i.properties.Stability,
 		Lang:                  langRust,
 		BaseName:              i.ModuleBase.Name(),