From dcc6156dec64c41b872ebf48d28642e21372e747 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Sat, 1 Feb 2025 14:10:29 -0800 Subject: Store name of boot image profile providing module in config The logic in getProfileProviderForApex depends on having a list of all apexes that depend on the art-bootclasspath-fragment module, which will no longer be available once the apex info top down mutator is removed. Since only the art-bootclasspath-fragment module needs to generate a boot image profile, put the name of the module in the boot image config. Bug: 372543712 Test: all soong tests pass Change-Id: I920e3f1d85e8d74ff8e047310e10504bcdde06db --- java/bootclasspath_fragment.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'java/bootclasspath_fragment.go') diff --git a/java/bootclasspath_fragment.go b/java/bootclasspath_fragment.go index d6777e50e..8fb8ba9a4 100644 --- a/java/bootclasspath_fragment.go +++ b/java/bootclasspath_fragment.go @@ -527,19 +527,18 @@ func (b *BootclasspathFragmentModule) getProfileProviderApex(ctx android.BaseMod } // Bootclasspath fragment modules that are for the platform do not produce boot related files. - apexInfos, _ := android.ModuleProvider(ctx, android.AllApexInfoProvider) - if apexInfos == nil { + apexInfo, _ := android.ModuleProvider(ctx, android.ApexInfoProvider) + if apexInfo.IsForPlatform() { return "" } - for _, apexInfo := range apexInfos.ApexInfos { - for _, apex := range apexInfo.InApexVariants { - if isProfileProviderApex(ctx, apex) { - return apex + for _, config := range genBootImageConfigs(ctx) { + if config.profileProviderModule == b.BaseModuleName() { + if len(config.profileImports) > 0 { + return config.profileImports[0] } } } - return "" } -- cgit v1.2.3-59-g8ed1b