Replace ctx.ExpandSources with android.PathsForModuleSrc
Move the logic from ctx.ExpandSources into android.PathsForModuleSrc
and ctx.ExpandSource into android.PathForModuleSrc, and deprecate
them. When combined with the pathDepsMutator this will let all
properties that take source paths also take filegroups or genrule
outputs, as long as they are tagged with `android:"path"`.
Test: All soong tests
Change-Id: I01625e76b5da19240e9649bf26a014eeeafcab8f
diff --git a/android/prebuilt.go b/android/prebuilt.go
index ea4870d..5bd0e2d 100644
--- a/android/prebuilt.go
+++ b/android/prebuilt.go
@@ -61,7 +61,7 @@
// Return the singleton source after expanding any filegroup in the
// sources.
- return ctx.ExpandSource((*p.srcs)[0], "")
+ return PathForModuleSrc(ctx, (*p.srcs)[0])
}
func InitPrebuiltModule(module PrebuiltInterface, srcs *[]string) {