summaryrefslogtreecommitdiff
path: root/apex/builder.go
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2025-02-12 06:37:16 -0800
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2025-02-12 06:37:16 -0800
commit1a49813031ed2829f70d0de92454ff53f4c3da84 (patch)
treea2fcd3d9f9aa5bc0fb5b489f199395bc86a17932 /apex/builder.go
parent719a8807c9d47b192d9f15e0eaa7a4a248d4e17a (diff)
parent11ad4e940b342fb0bdf700276f9a7b513c3656b0 (diff)
Merge "Install VINTF fragment modules in the APEX" into main
Diffstat (limited to 'apex/builder.go')
-rw-r--r--apex/builder.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/apex/builder.go b/apex/builder.go
index b34dc84a6..03a0bb902 100644
--- a/apex/builder.go
+++ b/apex/builder.go
@@ -528,9 +528,10 @@ func markManifestTestOnly(ctx android.ModuleContext, androidManifestFile android
})
}
-func isVintfFragment(fi apexFile) bool {
+func shouldApplyAssembleVintf(fi apexFile) bool {
isVintfFragment, _ := path.Match("etc/vintf/*", fi.path())
- return isVintfFragment
+ _, fromVintfFragmentModule := fi.module.(*android.VintfFragmentModule)
+ return isVintfFragment && !fromVintfFragmentModule
}
func runAssembleVintf(ctx android.ModuleContext, vintfFragment android.Path) android.Path {
@@ -639,7 +640,7 @@ func (a *apexBundle) buildApex(ctx android.ModuleContext) {
copyCommands = append(copyCommands, "ln -sfn "+pathOnDevice+" "+destPath)
} else {
// Copy the file into APEX
- if !a.testApex && isVintfFragment(fi) {
+ if !a.testApex && shouldApplyAssembleVintf(fi) {
// copy the output of assemble_vintf instead of the original
vintfFragment := runAssembleVintf(ctx, fi.builtFile)
copyCommands = append(copyCommands, "cp -f "+vintfFragment.String()+" "+destPath)