Notice files for prebuilt_etc are included in APEX

This change fixes a bug that notice files for some module type (e.g.
prebuilt_etc) were not included in APEX. This happened because we relied
on WalkPayloadDeps which actually doesn't traverse module types that
don't implement ApexModule interface. prebuilt_etc is one such module
type. Fixing the problem by also iterating the filesInfo array which
has info about all modules that are included in the APEX.

Bug: 166575301
Test: m com.android.tzdata and inspect the built artifact.
NOTICE.html.gz is there.

Change-Id: Iceb055b60184aef2a3e65e44680304853eb79a53
This commit is contained in:
Jiyong Park
2020-09-09 13:18:02 +09:00
parent daf735287b
commit 41f637d653
2 changed files with 7 additions and 0 deletions

View File

@@ -286,6 +286,10 @@ func (a *apexBundle) buildNoticeFiles(ctx android.ModuleContext, apexFileName st
return true
})
for _, fi := range a.filesInfo {
noticeFiles = append(noticeFiles, fi.noticeFiles...)
}
if len(noticeFiles) == 0 {
return android.NoticeOutputs{}
}