Stop using deprecated functionality for managing path deps

This change stops using deprecated functionality and migrates this
repository's custom Soong code to support current practices to manage
path property related dependencies. i.e. when a property includes
something that looks like ":module".

ExtractSourcesDeps has been deprecated in favor of tagging properties
with `android:"path"` which will cause the pathDepsMutator to add the
dependencies automatically.

ModuleContext.ExpandSources has been deprecated in favor of
android.PathsForModuleSrc and android.PathsForModuleSrcExcludes as the
latter can be used with other context types and the former does not
require passing a nil list of excludes if there are not needed.

android.SourceDepTag has been deprecated as the underlying type needs
to be changed and this will no longer work for its current uses.

* depTag == android.SourceDepTag can no longer be used to check to
  see if depTag was used to add a module dependency for a module
  reference in a path property without any output tag.
  IsSourceDepTagWithOutputTag(depTag, "") must be used instead.

Bug: 193228441
Test: m nothing
Change-Id: I9a359bb025d11b85d3a6a53bab1d2405b48f8eb3
diff --git a/wayland_protocol_codegen.go b/wayland_protocol_codegen.go
index 762c6c5..f9171af 100644
--- a/wayland_protocol_codegen.go
+++ b/wayland_protocol_codegen.go
@@ -86,7 +86,7 @@
 	Suffix *string
 
 	// The list of protocol files to process.
-	Srcs []string
+	Srcs []string `android:"path"`
 
 	// The names of any built host executables to use for code generation. Can
 	// be left empty if a local script is used instead (specified in
@@ -156,9 +156,8 @@
 // DepsMutator implements the android.Module DepsMutator method to apply a
 // mutator context to the build graph.
 func (g *waylandGenModule) DepsMutator(ctx android.BottomUpMutatorContext) {
-	// This implementatoin duplicates the one from genrule.go, where gensrcs is
+	// This implementation duplicates the one from genrule.go, where gensrcs is
 	// defined.
-	android.ExtractSourcesDeps(ctx, g.properties.Srcs)
 	if g, ok := ctx.Module().(*waylandGenModule); ok {
 		if len(g.properties.Tools) > 0 {
 			ctx.AddFarVariationDependencies(ctx.Config().BuildOSTarget.Variations(),
@@ -192,7 +191,7 @@
 
 	generatedFilenamePrefix := proptools.String(g.properties.Prefix)
 	generatedFilenameSuffix := proptools.String(g.properties.Suffix)
-	for _, src := range ctx.ExpandSources(g.properties.Srcs, nil) {
+	for _, src := range android.PathsForModuleSrc(ctx, g.properties.Srcs) {
 		out := g.generateOutputPath(ctx, src, generatedFilenamePrefix, generatedFilenameSuffix)
 		if out == nil {
 			continue
@@ -254,9 +253,12 @@
 	// information about it.
 	if len(g.properties.Tools) > 0 {
 		ctx.VisitDirectDepsBlueprint(func(module blueprint.Module) {
-			switch ctx.OtherModuleDependencyTag(module) {
-			case android.SourceDepTag:
+			tag := ctx.OtherModuleDependencyTag(module)
+			if android.IsSourceDepTagWithOutputTag(tag, "") {
 				// Nothing to do
+				return
+			}
+			switch tag {
 			case hostToolDepTag:
 				tool := ctx.OtherModuleName(module)
 				var path android.OptionalPath