Merge "Use OutputFilesProvider on gen_notice" into main am: 7daabf71ef am: 4f974b408d

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3118356

Change-Id: I1c8c2bee83bc7d2443abcc7a3e25325a8e89a4bb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/android/gen_notice.go b/android/gen_notice.go
index 6815f64..9adde9e 100644
--- a/android/gen_notice.go
+++ b/android/gen_notice.go
@@ -176,6 +176,7 @@
 	}
 	out := m.getStem() + m.getSuffix()
 	m.output = PathForModuleOut(ctx, out).OutputPath
+	ctx.SetOutputFiles(Paths{m.output}, "")
 }
 
 func GenNoticeFactory() Module {
@@ -193,16 +194,6 @@
 	return module
 }
 
-var _ OutputFileProducer = (*genNoticeModule)(nil)
-
-// Implements OutputFileProducer
-func (m *genNoticeModule) OutputFiles(tag string) (Paths, error) {
-	if tag == "" {
-		return Paths{m.output}, nil
-	}
-	return nil, fmt.Errorf("unrecognized tag %q", tag)
-}
-
 var _ AndroidMkEntriesProvider = (*genNoticeModule)(nil)
 
 // Implements AndroidMkEntriesProvider