Connect fingerprint build flag to soong.

When RELEASE_FINGERPRINT_ACONFIG_PACKAGE is true, the storage file
version will be v2 for aconfig create-storage.

Test: manual
Change-Id: I6861ac1bfe8680ff7311e26efb627e0ac7c58f05
diff --git a/apex/builder.go b/apex/builder.go
index 7e66644..597c53c 100644
--- a/apex/builder.go
+++ b/apex/builder.go
@@ -275,6 +275,12 @@
 		})
 		files = append(files, newApexFile(ctx, apexAconfigFile, "aconfig_flags", "etc", etc, nil))
 
+		// To enable fingerprint, we need to have v2 storage files. The default version is 1.
+		storageFilesVersion := 1
+		if ctx.Config().ReleaseFingerprintAconfigPackages() {
+			storageFilesVersion = 2
+		}
+
 		for _, info := range createStorageInfo {
 			outputFile := android.PathForModuleOut(ctx, info.Output_file)
 			ctx.Build(pctx, android.BuildParams{
@@ -286,6 +292,7 @@
 					"container":   ctx.ModuleName(),
 					"file_type":   info.File_type,
 					"cache_files": android.JoinPathsWithPrefix(aconfigFiles, "--cache "),
+					"version":     strconv.Itoa(storageFilesVersion),
 				},
 			})
 			files = append(files, newApexFile(ctx, outputFile, info.File_type, "etc", etc, nil))