Use a provider for systems modules

Replace the SystemModulesProvider interface with Provider

Test: all soong tests
Flag: EXEMPT refactor
Change-Id: If313580b28094d55b71f1635259bafa850ef7af5
This commit is contained in:
Colin Cross
2024-08-08 14:04:42 -07:00
parent a66b4630f6
commit b61c226943
4 changed files with 38 additions and 34 deletions

View File

@@ -2261,8 +2261,9 @@ func (al *ApiLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) {
staticLibs = append(staticLibs, provider.HeaderJars...)
}
case systemModulesTag:
module := dep.(SystemModulesProvider)
systemModulesPaths = append(systemModulesPaths, module.HeaderJars()...)
if sm, ok := android.OtherModuleProvider(ctx, dep, SystemModulesProvider); ok {
systemModulesPaths = append(systemModulesPaths, sm.HeaderJars...)
}
case metalavaCurrentApiTimestampTag:
if currentApiTimestampProvider, ok := dep.(currentApiTimestampProvider); ok {
al.validationPaths = append(al.validationPaths, currentApiTimestampProvider.CurrentApiTimestamp())