Convert ModuleProvder to generic providers API
Convert all of the callers of ModuleProvider/ModuleHasProvider to use the type-safe android.SingletonModuleProvider API. Bug: 316410648 Test: builds Change-Id: I6f11638546b64749e451cebbf33140248dc1d193
This commit is contained in:
@@ -85,10 +85,10 @@ func fileSizesSingleton() android.Singleton {
|
||||
func (singleton *sizesSingleton) GenerateBuildActions(ctx android.SingletonContext) {
|
||||
var deps android.Paths
|
||||
ctx.VisitAllModules(func(m android.Module) {
|
||||
if !ctx.ModuleHasProvider(m, fileSizeMeasurerKey) {
|
||||
filePaths, ok := android.SingletonModuleProvider(ctx, m, fileSizeMeasurerKey)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
filePaths := ctx.ModuleProvider(m, fileSizeMeasurerKey).(measuredFiles)
|
||||
for _, path := range filePaths.paths {
|
||||
filePath := path.(android.ModuleOutPath)
|
||||
sizeFile := filePath.InSameDir(ctx, filePath.Base()+bloatyDescriptorExt)
|
||||
|
Reference in New Issue
Block a user