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

@@ -390,16 +390,20 @@ func (a *AndroidApp) noticeBuildActions(ctx android.ModuleContext) {
return false
}
path := child.(android.Module).NoticeFile()
if path.Valid() {
noticePathSet[path.Path()] = true
paths := child.(android.Module).NoticeFiles()
if len(paths) > 0 {
for _, path := range paths {
noticePathSet[path] = true
}
}
return true
})
// If the app has one, add it too.
if a.NoticeFile().Valid() {
noticePathSet[a.NoticeFile().Path()] = true
if len(a.NoticeFiles()) > 0 {
for _, path := range a.NoticeFiles() {
noticePathSet[path] = true
}
}
if len(noticePathSet) == 0 {