Merge "Notice file embededd in APEX is deterministic" am: 9980c6e111 am: bd7f948507

Change-Id: I2cf22542513eff83fefef1503954015ffd3be6a9
This commit is contained in:
Treehugger Robot 2020-05-30 08:30:11 +00:00 committed by Automerger Merge Worker
commit 94d161a3c7
2 changed files with 10 additions and 1 deletions

View File

@ -485,6 +485,15 @@ func FirstUniquePaths(list Paths) Paths {
return firstUniquePathsList(list)
}
// SortedUniquePaths returns what its name says
func SortedUniquePaths(list Paths) Paths {
unique := FirstUniquePaths(list)
sort.Slice(unique, func(i, j int) bool {
return unique[i].String() < unique[j].String()
})
return unique
}
func firstUniquePathsList(list Paths) Paths {
k := 0
outer:

View File

@ -247,7 +247,7 @@ func (a *apexBundle) buildNoticeFiles(ctx android.ModuleContext, apexFileName st
return android.NoticeOutputs{}
}
return android.BuildNoticeOutput(ctx, a.installDir, apexFileName, android.FirstUniquePaths(noticeFiles))
return android.BuildNoticeOutput(ctx, a.installDir, apexFileName, android.SortedUniquePaths(noticeFiles))
}
func (a *apexBundle) buildInstalledFilesFile(ctx android.ModuleContext, builtApex android.Path, imageDir android.Path) android.OutputPath {