summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-10-29 19:17:53 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-10-29 19:17:53 +0000
commitcc723c5a2727e5c111d0f4cad7bd9e042371b066 (patch)
tree2d9423cfcba219fa6e23c14873a05695772ef50e
parent0040f01debd624db7f2fcb7fc78569d6a7f912d5 (diff)
parent6ec8d4ac774da5ea2c99c9bd0a95fcb3f16fcbdc (diff)
Merge "Add comment for imageMutatorBeginMutator" into main
-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)