From 11ad4e940b342fb0bdf700276f9a7b513c3656b0 Mon Sep 17 00:00:00 2001 From: Kiyoung Kim Date: Wed, 4 Sep 2024 14:16:47 +0900 Subject: Install VINTF fragment modules in the APEX Currently APEX ignores vintf_fragments modules within the APEX, and all VINTF fragments are installed with prebuilt_etc modules. This change installs vintf_fragment modules in the APEX, so any additional prebuilt_etc modules are not required as long as binaries define vintf_fragment_modules references. Bug: 363105686 Test: AOSP CF x86_64 build succeeded Change-Id: I33b58178cd51dc2c4bb9226fdd68e7990dccd6a2 Merged-In: I33b58178cd51dc2c4bb9226fdd68e7990dccd6a2 --- apex/builder.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'apex/builder.go') diff --git a/apex/builder.go b/apex/builder.go index b40fd0991..63efa6332 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) -- cgit v1.2.3-59-g8ed1b