Filter defaults from license metadata dependencies.
Bug: 239638693
Test: m droid dist
Change-Id: Ic094aa706145ddd1cb8a1b134117c83ad41061b7
diff --git a/android/license_metadata.go b/android/license_metadata.go
index f2ab0a4..18f1ac5 100644
--- a/android/license_metadata.go
+++ b/android/license_metadata.go
@@ -67,6 +67,11 @@
return
}
+ // Defaults add properties and dependencies that get processed on their own.
+ if ctx.OtherModuleDependencyTag(dep) == DefaultsDepTag {
+ return
+ }
+
if ctx.OtherModuleHasProvider(dep, LicenseMetadataProvider) {
info := ctx.OtherModuleProvider(dep, LicenseMetadataProvider).(*LicenseMetadataInfo)
allDepMetadataFiles = append(allDepMetadataFiles, info.LicenseMetadataPath)