Revert "Always run package check"

This reverts commit 91206d9ed1a1e3cb81d1ace021580c4be8362f1f.

Reason for revert: package-check.sh doesn't work on mac
Bug: 158081251
Bug: 157649935
Change-Id: I50af71d54d5f1f8b516bfcf1efbcf6217e89c83a
diff --git a/java/builder.go b/java/builder.go
index 640dba9..a27e5c3 100644
--- a/java/builder.go
+++ b/java/builder.go
@@ -206,7 +206,7 @@
 		blueprint.RuleParams{
 			Command: "rm -f $out && " +
 				"${config.PackageCheckCmd} $in $packages && " +
-				"cp $in $out",
+				"touch $out",
 			CommandDeps: []string{"${config.PackageCheckCmd}"},
 		},
 		"packages")
@@ -547,9 +547,8 @@
 	})
 }
 
-func CheckJarPackages(ctx android.ModuleContext, classesJar android.Path, permittedPackages []string) android.ModuleOutPath {
-	outputFile := android.PathForModuleOut(ctx, "package-check", classesJar.Base())
-
+func CheckJarPackages(ctx android.ModuleContext, outputFile android.WritablePath,
+	classesJar android.Path, permittedPackages []string) {
 	ctx.Build(pctx, android.BuildParams{
 		Rule:        packageCheck,
 		Description: "packageCheck",
@@ -559,8 +558,6 @@
 			"packages": strings.Join(permittedPackages, " "),
 		},
 	})
-
-	return outputFile
 }
 
 func TransformJetifier(ctx android.ModuleContext, outputFile android.WritablePath,