summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Cole Faust <colefaust@google.com> 2024-10-29 11:01:19 -0700
committer Cole Faust <colefaust@google.com> 2024-10-29 11:01:19 -0700
commit6ec8d4ac774da5ea2c99c9bd0a95fcb3f16fcbdc (patch)
treebdea33371df0fd5640a479503a0be05a478d6fed
parentc96e3698d493be5fac8fe80f9c6d60f83124b107 (diff)
Add comment for imageMutatorBeginMutator
Bug: 372091092 Test: m nothing Change-Id: I4446b66da02728e968c6a8656fe477d4432f0ab6
-rw-r--r--android/image.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/android/image.go b/android/image.go
index e8b6352fd..78343db90 100644
--- a/android/image.go
+++ b/android/image.go
@@ -125,6 +125,12 @@ func (e *imageInterfaceContextAdapter) SystemExtSpecific() bool {
return e.kind == systemExtSpecificModule
}
+// imageMutatorBeginMutator calls ImageMutatorBegin on all modules that may have image variants.
+// This happens right before the imageTransitionMutator runs. It's needed to initialize these
+// modules so that they return the correct results for all the other ImageInterface methods,
+// which the imageTransitionMutator will call. Transition mutators should also not mutate modules
+// (except in their Mutate() function), which this method does, so we run it in a separate mutator
+// first.
func imageMutatorBeginMutator(ctx BottomUpMutatorContext) {
if m, ok := ctx.Module().(ImageInterface); ok && ctx.Os() == Android {
m.ImageMutatorBegin(ctx)