Merge "Use the correct prof file when multiple prebuilt apexes exist" into main

This commit is contained in:
Spandan Das
2023-12-20 00:02:20 +00:00
committed by Gerrit Code Review
10 changed files with 297 additions and 22 deletions

View File

@@ -954,3 +954,15 @@ type ApexTestInterface interface {
// Return true if the apex bundle is an apex_test
IsTestApex() bool
}
var ApexExportsInfoProvider = blueprint.NewProvider[ApexExportsInfo]()
// ApexExportsInfo contains information about the artifacts provided by apexes to dexpreopt and hiddenapi
type ApexExportsInfo struct {
// Canonical name of this APEX. Used to determine the path to the activated APEX on
// device (/apex/<apex_name>)
ApexName string
// Path to the image profile file on host (or empty, if profile is not generated).
ProfilePathOnHost Path
}

View File

@@ -164,6 +164,18 @@ func (p *PrebuiltSelectionInfoMap) IsSelected(baseModuleName, name string) bool
}
}
// Return the list of soong modules selected for this api domain
// In the case of apexes, it is the canonical name of the apex on device (/apex/<apex_name>)
func (p *PrebuiltSelectionInfoMap) GetSelectedModulesForApiDomain(apiDomain string) []string {
selected := []string{}
for _, entry := range *p {
if entry.apiDomain == apiDomain {
selected = append(selected, entry.selectedModuleName)
}
}
return selected
}
// This module type does not have any build actions.
func (a *allApexContributions) GenerateAndroidBuildActions(ctx ModuleContext) {
}