From c8c74d67c5b62b611e0bf32442bccfad479ba9f5 Mon Sep 17 00:00:00 2001 From: Marybeth Fair Date: Wed, 4 Dec 2024 14:22:40 -0500 Subject: 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 --- filesystem/aconfig_files.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'filesystem/aconfig_files.go') diff --git a/filesystem/aconfig_files.go b/filesystem/aconfig_files.go index c80ae03d7..c1cbecd32 100644 --- a/filesystem/aconfig_files.go +++ b/filesystem/aconfig_files.go @@ -16,6 +16,7 @@ package filesystem import ( "android/soong/android" + "strconv" "github.com/google/blueprint/proptools" ) @@ -45,6 +46,12 @@ func (f *filesystem) buildAconfigFlagsFiles(ctx android.ModuleContext, builder * installAconfigStorageDir := dir.Join(ctx, "etc", "aconfig") builder.Command().Text("mkdir -p").Text(installAconfigStorageDir.String()) + // To enable fingerprint, we need to have v2 storage files. The default version is 1. + storageFilesVersion := 1 + if ctx.Config().ReleaseFingerprintAconfigPackages() { + storageFilesVersion = 2 + } + generatePartitionAconfigStorageFile := func(fileType, fileName string) { outputPath := installAconfigStorageDir.Join(ctx, fileName) builder.Command(). @@ -52,7 +59,8 @@ func (f *filesystem) buildAconfigFlagsFiles(ctx android.ModuleContext, builder * FlagWithArg("create-storage --container ", f.PartitionType()). FlagWithArg("--file ", fileType). FlagWithOutput("--out ", outputPath). - FlagWithArg("--cache ", installAconfigFlagsPath.String()) + FlagWithArg("--cache ", installAconfigFlagsPath.String()). + FlagWithArg("--version ", strconv.Itoa(storageFilesVersion)) f.appendToEntry(ctx, outputPath) } -- cgit v1.2.3-59-g8ed1b