diff options
author | 2024-12-04 14:22:40 -0500 | |
---|---|---|
committer | 2024-12-12 16:57:16 -0500 | |
commit | c8c74d67c5b62b611e0bf32442bccfad479ba9f5 (patch) | |
tree | cdf55f850ceba126c3e5971d5bc66e351893d940 /apex/builder.go | |
parent | e451ed647f0ee3565f994ea4ad16fff0c3992db2 (diff) |
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
Diffstat (limited to 'apex/builder.go')
-rw-r--r-- | apex/builder.go | 7 |
1 files changed, 7 insertions, 0 deletions
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)) |