Remove error from AndroidMkData.Extra

It's never anything except nil, and it unnecessarily complicates
the implementations.

Test: m -j checkbuild
Change-Id: I8a117a86aa39aeb07d9d8d0686ef869c52784f19
This commit is contained in:
Colin Cross
2017-08-10 16:32:23 -07:00
parent 6416271a1f
commit 27a4b05441
5 changed files with 20 additions and 42 deletions

View File

@@ -45,9 +45,11 @@ type AndroidMkData struct {
Custom func(w io.Writer, name, prefix, moduleDir string) error
Extra []func(w io.Writer, outputFile Path) error
Extra []AndroidMkExtraFunc
}
type AndroidMkExtraFunc func(w io.Writer, outputFile Path)
func AndroidMkSingleton() blueprint.Singleton {
return &androidMkSingleton{}
}
@@ -255,10 +257,7 @@ func translateAndroidMkModule(ctx blueprint.SingletonContext, w io.Writer, mod b
}
for _, extra := range data.Extra {
err = extra(w, data.OutputFile.Path())
if err != nil {
return err
}
extra(w, data.OutputFile.Path())
}
fmt.Fprintln(w, "include $(BUILD_PREBUILT)")