Notice file embededd in APEX is deterministic
Exempt-From-Owner-Approval: cherry-pick from AOSP
Bug: 157724521
Test: m
Merged-In: I25f6cd9dd0679af6acfc2594314d11fa53ae2151
(cherry picked from commit 33c7736936
)
Change-Id: I25f6cd9dd0679af6acfc2594314d11fa53ae2151
This commit is contained in:
parent
9e0264c379
commit
402ace6c25
|
@ -483,6 +483,15 @@ outer:
|
||||||
return list[:k]
|
return list[:k]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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
|
||||||
|
}
|
||||||
|
|
||||||
// LastUniquePaths returns all unique elements of a Paths, keeping the last copy of each. It
|
// LastUniquePaths returns all unique elements of a Paths, keeping the last copy of each. It
|
||||||
// modifies the Paths slice contents in place, and returns a subslice of the original slice.
|
// modifies the Paths slice contents in place, and returns a subslice of the original slice.
|
||||||
func LastUniquePaths(list Paths) Paths {
|
func LastUniquePaths(list Paths) Paths {
|
||||||
|
|
|
@ -238,7 +238,7 @@ func (a *apexBundle) buildNoticeFiles(ctx android.ModuleContext, apexFileName st
|
||||||
return android.NoticeOutputs{}
|
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 {
|
func (a *apexBundle) buildInstalledFilesFile(ctx android.ModuleContext, builtApex android.Path, imageDir android.Path) android.OutputPath {
|
||||||
|
|
Loading…
Reference in New Issue