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

@@ -24,9 +24,8 @@ import (
func (library *Library) AndroidMk() (ret android.AndroidMkData, err error) {
ret.Class = "JAVA_LIBRARIES"
ret.OutputFile = android.OptionalPathForPath(library.outputFile)
ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) error {
ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) {
fmt.Fprintln(w, "LOCAL_MODULE_SUFFIX := .jar")
return nil
})
return
}
@@ -34,9 +33,8 @@ func (library *Library) AndroidMk() (ret android.AndroidMkData, err error) {
func (prebuilt *Import) AndroidMk() (ret android.AndroidMkData, err error) {
ret.Class = "JAVA_LIBRARIES"
ret.OutputFile = android.OptionalPathForPath(prebuilt.combinedClasspathFile)
ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) error {
ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) {
fmt.Fprintln(w, "LOCAL_MODULE_SUFFIX := .jar")
return nil
})
return
}