From 7fd521e62ea3a68ac50a64cda0927a7a33b5afe6 Mon Sep 17 00:00:00 2001 From: Bob Badour Date: Fri, 29 Jul 2022 11:18:12 -0700 Subject: [PATCH] Filter defaults from license metadata dependencies. Bug: 239638693 Test: m droid dist Change-Id: Ic094aa706145ddd1cb8a1b134117c83ad41061b7 --- android/license_metadata.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/android/license_metadata.go b/android/license_metadata.go index f2ab0a44c..18f1ac563 100644 --- a/android/license_metadata.go +++ b/android/license_metadata.go @@ -67,6 +67,11 @@ func buildLicenseMetadata(ctx ModuleContext, licenseMetadataFile WritablePath) { 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)