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 --- apex/builder.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'apex/builder.go') diff --git a/apex/builder.go b/apex/builder.go index 7e6664437..597c53c36 100644 --- a/apex/builder.go +++ b/apex/builder.go @@ -275,6 +275,12 @@ func (a *apexBundle) buildAconfigFiles(ctx android.ModuleContext) []apexFile { }) 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 @@ func (a *apexBundle) buildAconfigFiles(ctx android.ModuleContext) []apexFile { "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)) -- cgit v1.2.3-59-g8ed1b