Build updatable-bcp-packages.txt from prebuilts in sdk snapshot

Previously, the java_import and java_sdk_library_import modules did not
make their permitted_packages available to the rule that generates the
updatable-bcp-packages.txt file. This change corrects that.

Bug: 193763688
Test: m nothing
      - Added unit tests, which all failed and then fixed the tests.
Change-Id: If0706e4551a331b48d383123088e63924dded48b
diff --git a/java/java.go b/java/java.go
index ef2f510..bd059b5 100644
--- a/java/java.go
+++ b/java/java.go
@@ -1192,6 +1192,12 @@
 	minSdkVersion android.SdkSpec
 }
 
+var _ PermittedPackagesForUpdatableBootJars = (*Import)(nil)
+
+func (j *Import) PermittedPackagesForUpdatableBootJars() []string {
+	return j.properties.Permitted_packages
+}
+
 func (j *Import) SdkVersion(ctx android.EarlyModuleContext) android.SdkSpec {
 	return android.SdkSpecFrom(ctx, String(j.properties.Sdk_version))
 }