Unless overridden include LICENSE files in notices.
As a second step to removing the go/android3p instructions to copy or
to link NOTICE to LICENSE, include LICENSE files in the notices, which
will allow deleting all of the copied/linked NOTICE files.
The change causes a few additions to the system image notice files.
Test: manually built and compared before and after notices
Change-Id: Ia7bc58e2eba7bed5e63934881b5298201a93bc3e
diff --git a/apex/builder.go b/apex/builder.go
index 88c7098..b9736d3 100644
--- a/apex/builder.go
+++ b/apex/builder.go
@@ -215,15 +215,15 @@
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 {