Remove ModuleSrcPath
ModuleSrcPath was designed as a type that ensured that modules only
referenced sources inside the directory that contained the Android.bp
file. In practice they don't work very well, because allowing
filegroups and genrules as inputs to any module that takes a source
path means that the path might end up being to a file in another
source directory or to a generated file in the output directory.
Remove ModuleSrcPath, replacing it with SourcePath in the places
that need to explicitly refer to a path in the source tree, or
Path where it may be a source path or a generated path.
Make PathForModuleSrc return a Path instead of a SourcePath in
preparation for consolidation with ctx.ExpandSources, which will
make it possibly return paths to generated files.
Test: All soong tests
Change-Id: I973a78470ed14307eea5f6d0cc93942775a65715
diff --git a/android/config.go b/android/config.go
index 92879de..1520739 100644
--- a/android/config.go
+++ b/android/config.go
@@ -581,7 +581,7 @@
if defaultCert == "" || filepath.Dir(defaultCert) == "build/target/product/security" {
// When defaultCert is unset or is set to the testkeys path, use the APEX keys
// that is under the module dir
- return PathForModuleSrc(ctx).SourcePath
+ return pathForModuleSrc(ctx)
} else {
// If not, APEX keys are under the specified directory
return PathForSource(ctx, filepath.Dir(defaultCert))