From 7a47bd3a81be5e2424ac51724df8f49a87aeecac Mon Sep 17 00:00:00 2001 From: mrziwang Date: Wed, 17 Jul 2024 11:11:05 -0700 Subject: [PATCH] Return error for unsupported context in outputFilesForModuleFromProvider Test: CI Change-Id: I42d2341ea2613a28d403615f3ebccd0067d5501f --- android/module.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/module.go b/android/module.go index dd560315c..98cd459d7 100644 --- a/android/module.go +++ b/android/module.go @@ -2504,8 +2504,9 @@ func outputFilesForModuleFromProvider(ctx PathContext, module blueprint.Module, } else if cta, isCta := ctx.(*singletonContextAdaptor); isCta { providerData, _ := cta.moduleProvider(module, OutputFilesProvider) outputFiles, _ = providerData.(OutputFilesInfo) + } else { + return nil, fmt.Errorf("unsupported context %q in method outputFilesForModuleFromProvider", reflect.TypeOf(ctx)) } - // TODO: Add a check for skipped context if outputFiles.isEmpty() { return nil, OutputFilesProviderNotSet