Merge "Identify profile providing apexes using ApexInfo" into main am: 4039516f32 am: b9bc2f388a

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3114508

Change-Id: Ife75c0ad174a23f3c7ef593161ac85cd39d37369
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2024-06-06 01:41:27 +00:00
committed by Automerger Merge Worker
2 changed files with 36 additions and 4 deletions

View File

@@ -524,10 +524,16 @@ func (b *BootclasspathFragmentModule) getProfileProviderApex(ctx android.BaseMod
}
// Bootclasspath fragment modules that are for the platform do not produce boot related files.
apexInfo, _ := android.ModuleProvider(ctx, android.ApexInfoProvider)
for _, apex := range apexInfo.InApexVariants {
if isProfileProviderApex(ctx, apex) {
return apex
apexInfos, _ := android.ModuleProvider(ctx, android.AllApexInfoProvider)
if apexInfos == nil {
return ""
}
for _, apexInfo := range apexInfos.ApexInfos {
for _, apex := range apexInfo.InApexVariants {
if isProfileProviderApex(ctx, apex) {
return apex
}
}
}