diff options
Diffstat (limited to 'android/module.go')
| -rw-r--r-- | android/module.go | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/android/module.go b/android/module.go index 891babc32..2ae296197 100644 --- a/android/module.go +++ b/android/module.go @@ -431,6 +431,9 @@ type commonProperties struct { DebugName string `blueprint:"mutated"` DebugMutators []string `blueprint:"mutated"` DebugVariations []string `blueprint:"mutated"` + + // set by ImageMutator + ImageVariation string `blueprint:"mutated"` } type hostAndDeviceProperties struct { @@ -865,6 +868,21 @@ func (m *ModuleBase) NoticeFile() OptionalPath { return m.noticeFile } +func (m *ModuleBase) setImageVariation(variant string) { + m.commonProperties.ImageVariation = variant +} + +func (m *ModuleBase) ImageVariation() blueprint.Variation { + return blueprint.Variation{ + Mutator: "image", + Variation: m.base().commonProperties.ImageVariation, + } +} + +func (m *ModuleBase) InRecovery() bool { + return m.base().commonProperties.ImageVariation == RecoveryVariation +} + func (m *ModuleBase) generateModuleTarget(ctx ModuleContext) { allInstalledFiles := Paths{} allCheckbuildFiles := Paths{} @@ -1515,9 +1533,11 @@ func (m *ModuleBase) EnableNativeBridgeSupportByDefault() { } func (m *ModuleBase) MakeAsSystemExt() { - if !Bool(m.commonProperties.Vendor) && !Bool(m.commonProperties.Product_specific) { - m.commonProperties.System_ext_specific = boolPtr(true) - } + m.commonProperties.Vendor = boolPtr(false) + m.commonProperties.Proprietary = boolPtr(false) + m.commonProperties.Soc_specific = boolPtr(false) + m.commonProperties.Product_specific = boolPtr(false) + m.commonProperties.System_ext_specific = boolPtr(true) } // IsNativeBridgeSupported returns true if "native_bridge_supported" is explicitly set as "true" |