Merge "Unless overridden include LICENSE files in notices."

This commit is contained in:
Bob Badour
2020-02-26 20:37:22 +00:00
committed by Gerrit Code Review
8 changed files with 56 additions and 28 deletions

View File

@@ -215,15 +215,15 @@ func (a *apexBundle) buildNoticeFiles(ctx android.ModuleContext, apexFileName st
noticeFiles := []android.Path{}
for _, f := range a.filesInfo {
if f.module != nil {
notice := f.module.NoticeFile()
if notice.Valid() {
noticeFiles = append(noticeFiles, notice.Path())
notices := f.module.NoticeFiles()
if len(notices) > 0 {
noticeFiles = append(noticeFiles, notices...)
}
}
}
// append the notice file specified in the apex module itself
if a.NoticeFile().Valid() {
noticeFiles = append(noticeFiles, a.NoticeFile().Path())
if len(a.NoticeFiles()) > 0 {
noticeFiles = append(noticeFiles, a.NoticeFiles()...)
}
if len(noticeFiles) == 0 {