diff options
author | 2024-09-11 13:26:20 -0700 | |
---|---|---|
committer | 2024-09-11 14:48:50 -0700 | |
commit | 4e2bf9fb2d3ede98da38a6574a17a6ec2d6bb84e (patch) | |
tree | fa8d381aefa64c98631867ccb1374da6c30221ca /android/singleton.go | |
parent | e8a8783154dc31f3e09e3bb98a8b11233358097d (diff) |
Add HasMutatorFinished
To enforce that selects are only evaluated after a certain point
in a followup cl.
Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: Ib215fedb904aa2e5f4d65cfd26a23f527eb4983e
Diffstat (limited to 'android/singleton.go')
-rw-r--r-- | android/singleton.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/android/singleton.go b/android/singleton.go index 8542bd9e6..913bf6a56 100644 --- a/android/singleton.go +++ b/android/singleton.go @@ -90,6 +90,10 @@ type SingletonContext interface { // OtherModulePropertyErrorf reports an error on the line number of the given property of the given module OtherModulePropertyErrorf(module Module, property string, format string, args ...interface{}) + + // HasMutatorFinished returns true if the given mutator has finished running. + // It will panic if given an invalid mutator name. + HasMutatorFinished(mutatorName string) bool } type singletonAdaptor struct { @@ -286,3 +290,7 @@ func (s *singletonContextAdaptor) otherModuleProvider(module blueprint.Module, p func (s *singletonContextAdaptor) OtherModulePropertyErrorf(module Module, property string, format string, args ...interface{}) { s.blueprintSingletonContext().OtherModulePropertyErrorf(module, property, format, args...) } + +func (s *singletonContextAdaptor) HasMutatorFinished(mutatorName string) bool { + return s.blueprintSingletonContext().HasMutatorFinished(mutatorName) +} |