summaryrefslogtreecommitdiff
path: root/java/hiddenapi_modular.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2023-12-18 22:43:45 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-12-18 22:43:45 +0000
commit51428c451a73d9d246ccecd045b0b8c76a417df1 (patch)
tree5113d87ec33b1e96150a9ad5df463e579facdb18 /java/hiddenapi_modular.go
parent8070c4b457d890455bd7c8437ab84d02d9e7f3bc (diff)
parent5a37718c956b1bfbda5e236c0fe50f08661a81de (diff)
Merge changes I6f116385,Id77f514d,I73479de1,If58f4b53 into main
* changes: Convert ModuleProvder to generic providers API Convert OtherModuleProvider to generic providers API Convert Provider to generic providers API Convert SetProvider to generic providers API
Diffstat (limited to 'java/hiddenapi_modular.go')
-rw-r--r--java/hiddenapi_modular.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/java/hiddenapi_modular.go b/java/hiddenapi_modular.go
index 3fc0883ce..8011f343b 100644
--- a/java/hiddenapi_modular.go
+++ b/java/hiddenapi_modular.go
@@ -579,8 +579,7 @@ func (i *HiddenAPIInfo) mergeFromFragmentDeps(ctx android.ModuleContext, fragmen
// Merge all the information from the fragments. The fragments form a DAG so it is possible that
// this will introduce duplicates so they will be resolved after processing all the fragments.
for _, fragment := range fragments {
- if ctx.OtherModuleHasProvider(fragment, HiddenAPIInfoProvider) {
- info := ctx.OtherModuleProvider(fragment, HiddenAPIInfoProvider).(HiddenAPIInfo)
+ if info, ok := android.OtherModuleProvider(ctx, fragment, HiddenAPIInfoProvider); ok {
i.TransitiveStubDexJarsByScope.addStubDexJarsByModule(info.TransitiveStubDexJarsByScope)
}
}
@@ -777,8 +776,7 @@ func (i *HiddenAPIPropertyInfo) extractPackageRulesFromProperties(p *HiddenAPIPa
func (i *HiddenAPIPropertyInfo) gatherPropertyInfo(ctx android.ModuleContext, contents []android.Module) {
for _, module := range contents {
- if ctx.OtherModuleHasProvider(module, hiddenAPIPropertyInfoProvider) {
- info := ctx.OtherModuleProvider(module, hiddenAPIPropertyInfoProvider).(HiddenAPIPropertyInfo)
+ if info, ok := android.OtherModuleProvider(ctx, module, hiddenAPIPropertyInfoProvider); ok {
i.FlagFilesByCategory.append(info.FlagFilesByCategory)
i.PackagePrefixes = append(i.PackagePrefixes, info.PackagePrefixes...)
i.SinglePackages = append(i.SinglePackages, info.SinglePackages...)
@@ -1404,7 +1402,7 @@ func deferReportingMissingBootDexJar(ctx android.ModuleContext, module android.M
}
if am, ok := module.(android.ApexModule); ok && am.InAnyApex() {
- apexInfo := ctx.OtherModuleProvider(module, android.ApexInfoProvider).(android.ApexInfo)
+ apexInfo, _ := android.OtherModuleProvider(ctx, module, android.ApexInfoProvider)
if apexInfo.IsForPlatform() {
return true
}