Convert collectDirectDepsProviders, collectTransitiveSrcFiles and
r8Flags to use ModuleProxy.

Bug: 377723687
Test: Unit tests and compare the ninja and mk files generated.
Change-Id: Ib3d45c317e1f2669808d0c785454fb8d8fb9cd3b
diff --git a/rust/rust.go b/rust/rust.go
index c7aabcd..6428859 100644
--- a/rust/rust.go
+++ b/rust/rust.go
@@ -1690,7 +1690,7 @@
 			}
 		}
 
-		if srcDep, ok := android.OtherModuleProvider(ctx, dep, android.SourceFilesInfoKey); ok {
+		if srcDep, ok := android.OtherModuleProvider(ctx, dep, android.SourceFilesInfoProvider); ok {
 			if android.IsSourceDepTagWithOutputTag(depTag, "") {
 				// These are usually genrules which don't have per-target variants.
 				directSrcDeps = append(directSrcDeps, srcDep)