diff options
Diffstat (limited to 'java/platform_bootclasspath.go')
-rw-r--r-- | java/platform_bootclasspath.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/java/platform_bootclasspath.go b/java/platform_bootclasspath.go index 0d52614ea..88d1ae8c0 100644 --- a/java/platform_bootclasspath.go +++ b/java/platform_bootclasspath.go @@ -180,7 +180,7 @@ func (b *platformBootclasspathModule) GenerateAndroidBuildActions(ctx android.Mo var transitiveSrcFiles android.Paths for _, module := range allModules { - depInfo := ctx.OtherModuleProvider(module, JavaInfoProvider).(JavaInfo) + depInfo, _ := android.OtherModuleProvider(ctx, module, JavaInfoProvider) if depInfo.TransitiveSrcFiles != nil { transitiveSrcFiles = append(transitiveSrcFiles, depInfo.TransitiveSrcFiles.ToList()...) } @@ -219,7 +219,7 @@ func (b *platformBootclasspathModule) configuredJars(ctx android.ModuleContext) // Include jars from APEXes that don't populate their classpath proto config. remainingJars := dexpreopt.GetGlobalConfig(ctx).ApexBootJars for _, fragment := range b.fragments { - info := ctx.OtherModuleProvider(fragment, ClasspathFragmentProtoContentInfoProvider).(ClasspathFragmentProtoContentInfo) + info, _ := android.OtherModuleProvider(ctx, fragment, ClasspathFragmentProtoContentInfoProvider) if info.ClasspathFragmentProtoGenerated { remainingJars = remainingJars.RemoveList(info.ClasspathFragmentProtoContents) } @@ -241,7 +241,7 @@ func (b *platformBootclasspathModule) platformJars(ctx android.PathContext) andr func (b *platformBootclasspathModule) checkPlatformModules(ctx android.ModuleContext, modules []android.Module) { // TODO(satayev): change this check to only allow core-icu4j, all apex jars should not be here. for _, m := range modules { - apexInfo := ctx.OtherModuleProvider(m, android.ApexInfoProvider).(android.ApexInfo) + apexInfo, _ := android.OtherModuleProvider(ctx, m, android.ApexInfoProvider) fromUpdatableApex := apexInfo.Updatable if fromUpdatableApex { // error: this jar is part of an updatable apex @@ -255,7 +255,7 @@ func (b *platformBootclasspathModule) checkPlatformModules(ctx android.ModuleCon // checkApexModules ensures that the apex modules supplied are not from the platform. func (b *platformBootclasspathModule) checkApexModules(ctx android.ModuleContext, modules []android.Module) { for _, m := range modules { - apexInfo := ctx.OtherModuleProvider(m, android.ApexInfoProvider).(android.ApexInfo) + apexInfo, _ := android.OtherModuleProvider(ctx, m, android.ApexInfoProvider) fromUpdatableApex := apexInfo.Updatable if fromUpdatableApex { // ok: this jar is part of an updatable apex @@ -389,7 +389,7 @@ func (b *platformBootclasspathModule) createAndProvideMonolithicHiddenAPIInfo(ct monolithicInfo := newMonolithicHiddenAPIInfo(ctx, temporaryInput.FlagFilesByCategory, classpathElements) // Store the information for testing. - ctx.SetProvider(MonolithicHiddenAPIInfoProvider, monolithicInfo) + android.SetProvider(ctx, MonolithicHiddenAPIInfoProvider, monolithicInfo) return monolithicInfo } |