Remove error from AndroidMkData.Custom
It's never anything except nil, and it unnecessarily complicates
the implementations.
Test: m -j checkbuild
Change-Id: I021c7971ede3e11bbe08cf1601f4690ed4d1a036
diff --git a/android/androidmk.go b/android/androidmk.go
index d5ee045..fd74507 100644
--- a/android/androidmk.go
+++ b/android/androidmk.go
@@ -43,7 +43,7 @@
OutputFile OptionalPath
Disabled bool
- Custom func(w io.Writer, name, prefix, moduleDir string) error
+ Custom func(w io.Writer, name, prefix, moduleDir string)
Extra []AndroidMkExtraFunc
}
@@ -159,10 +159,7 @@
return nil
}
- data, err := provider.AndroidMk()
- if err != nil {
- return err
- }
+ data := provider.AndroidMk()
// Make does not understand LinuxBionic
if amod.Os() == LinuxBionic {
@@ -192,7 +189,9 @@
}
}
- return data.Custom(w, name, prefix, filepath.Dir(ctx.BlueprintFile(mod)))
+ data.Custom(w, name, prefix, filepath.Dir(ctx.BlueprintFile(mod)))
+
+ return nil
}
if data.Disabled {
@@ -200,7 +199,7 @@
}
if !data.OutputFile.Valid() {
- return err
+ return nil
}
fmt.Fprintln(w, "\ninclude $(CLEAR_VARS)")
@@ -262,5 +261,5 @@
fmt.Fprintln(w, "include $(BUILD_PREBUILT)")
- return err
+ return nil
}