summaryrefslogtreecommitdiff
path: root/java/bootclasspath_fragment.go
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-06-06 01:10:12 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-06-06 01:10:12 +0000
commit4039516f32ac9dec4831c97089f7dec26e5543d9 (patch)
tree6ac2e9f3a0f6d78093af501782913382475caf52 /java/bootclasspath_fragment.go
parentc562e50fe577c592f330ba03dfe1aea25de8511b (diff)
parent7fd531f5d1a92a473ebd6bf3c06d4351c743d569 (diff)
Merge "Identify profile providing apexes using ApexInfo" into main
Diffstat (limited to 'java/bootclasspath_fragment.go')
-rw-r--r--java/bootclasspath_fragment.go14
1 files changed, 10 insertions, 4 deletions
diff --git a/java/bootclasspath_fragment.go b/java/bootclasspath_fragment.go
index 4d3d794d8..16209b72e 100644
--- a/java/bootclasspath_fragment.go
+++ b/java/bootclasspath_fragment.go
@@ -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
+ }
}
}