Make htmlGzNotice an internal variable instead of apexBundle field.

It's not read outside of the function / action generation logic, so keep
it inside the function.

Test: presubmits
Fixes: 190817312
Change-Id: I0626e6c86adc584abb2a251cbc7ffb1bec2c7f59
This commit is contained in:
Jingwen Chen
2022-11-16 19:12:35 +00:00
parent bf29be8f19
commit 4a9630b4ad
2 changed files with 3 additions and 9 deletions

View File

@@ -650,9 +650,9 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext) {
}
// Create a NOTICE file, and embed it as an asset file in the APEX.
a.htmlGzNotice = android.PathForModuleOut(ctx, "NOTICE.html.gz")
htmlGzNotice := android.PathForModuleOut(ctx, "NOTICE.html.gz")
android.BuildNoticeHtmlOutputFromLicenseMetadata(
ctx, a.htmlGzNotice, "", "",
ctx, htmlGzNotice, "", "",
[]string{
android.PathForModuleInstall(ctx).String() + "/",
android.PathForModuleInPartitionInstall(ctx, "apex").String() + "/",
@@ -660,7 +660,7 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext) {
noticeAssetPath := android.PathForModuleOut(ctx, "NOTICE", "NOTICE.html.gz")
builder := android.NewRuleBuilder(pctx, ctx)
builder.Command().Text("cp").
Input(a.htmlGzNotice).
Input(htmlGzNotice).
Output(noticeAssetPath)
builder.Build("notice_dir", "Building notice dir")
implicitInputs = append(implicitInputs, noticeAssetPath)