Convert Provider to generic providers API
Convert all of the callers of Provider/HasProvider to use the type-safe android.ModuleProvider API. Bug: 316410648 Test: builds Change-Id: I73479de1625fa2865b6c73444cd477e50d56dc5a
This commit is contained in:
@@ -167,7 +167,7 @@ func FindDeapexerProviderForModule(ctx ModuleContext) *DeapexerInfo {
|
||||
if di != nil {
|
||||
return di
|
||||
}
|
||||
ai := ctx.Provider(ApexInfoProvider).(ApexInfo)
|
||||
ai, _ := ModuleProvider(ctx, ApexInfoProvider)
|
||||
ctx.ModuleErrorf("No prebuilt APEX provides a deapexer module for APEX variant %s", ai.ApexVariationName)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -1648,7 +1648,7 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext)
|
||||
if !ctx.PrimaryArch() {
|
||||
suffix = append(suffix, ctx.Arch().ArchType.String())
|
||||
}
|
||||
if apexInfo := ctx.Provider(ApexInfoProvider).(ApexInfo); !apexInfo.IsForPlatform() {
|
||||
if apexInfo, _ := ModuleProvider(ctx, ApexInfoProvider); !apexInfo.IsForPlatform() {
|
||||
suffix = append(suffix, apexInfo.ApexVariationName)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user