pass read new storage parameter to java codegen

When RELEASE_READ_FROM_NEW_STORAGE is true, enable reading from new
storage. So that we can ensure nextfood is not impacted.

Test: m and check cf
Bug: 349874828
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:c98032785339de11e34ee3d4f94b3ec3ed70d324)
Merged-In: Id12816206a16b17c23e3a53832d268f1600107b3
Change-Id: I95ad9457e6d9c07a5a5b3074045a383f004113a9
diff --git a/aconfig/codegen/java_aconfig_library.go b/aconfig/codegen/java_aconfig_library.go
index 673ac2a..ebca413 100644
--- a/aconfig/codegen/java_aconfig_library.go
+++ b/aconfig/codegen/java_aconfig_library.go
@@ -20,6 +20,7 @@
 
 	"github.com/google/blueprint"
 	"github.com/google/blueprint/proptools"
+	"strconv"
 )
 
 type declarationsTagType struct {
@@ -71,6 +72,7 @@
 		module.AddSharedLibrary("aconfig-annotations-lib")
 		// TODO(b/303773055): Remove the annotation after access issue is resolved.
 		module.AddSharedLibrary("unsupportedappusage")
+		module.AddSharedLibrary("aconfig_storage_reader_java")
 	}
 }
 
@@ -102,7 +104,8 @@
 		Output:      srcJarPath,
 		Description: "aconfig.srcjar",
 		Args: map[string]string{
-			"mode": mode,
+			"mode":  mode,
+			"debug": strconv.FormatBool(ctx.Config().ReleaseReadFromNewStorage()),
 		},
 	})