Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9eab2ef9 authored by Usta Shrestha's avatar Usta Shrestha Committed by Gerrit Code Review
Browse files

Merge "Remove customizableProperties from `android.ModuleBase`"

parents 9b3b15c3 dca02199
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -1036,9 +1036,7 @@ func initArchModule(m Module) {
		m.AddProperties(archProperties...)
	}

	// Update the list of properties that can be set by a defaults module or a call to
	// AppendMatchingProperties or PrependMatchingProperties.
	base.customizableProperties = m.GetProperties()
	base.generalProperties = m.GetProperties()
}

func maybeBlueprintEmbed(src reflect.Value) reflect.Value {
@@ -1111,7 +1109,7 @@ func getChildPropertyStruct(ctx ArchVariantContext,
func (m *ModuleBase) setOSProperties(ctx BottomUpMutatorContext) {
	os := m.commonProperties.CompileOS

	for i := range m.generalProperties {
	for i := range m.archProperties {
		genProps := m.generalProperties[i]
		if m.archProperties[i] == nil {
			continue
@@ -1439,7 +1437,7 @@ func (m *ModuleBase) setArchProperties(ctx BottomUpMutatorContext) {
	arch := m.Arch()
	os := m.Os()

	for i := range m.generalProperties {
	for i := range m.archProperties {
		genProps := m.generalProperties[i]
		if m.archProperties[i] == nil {
			continue
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ func InitDefaultableModule(module DefaultableModule) {

	module.AddProperties(module.defaults())

	module.base().customizableProperties = module.GetProperties()
	module.base().generalProperties = module.GetProperties()
}

// A restricted subset of context methods, similar to LoadHookContext.
+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ func (l *loadHookContext) moduleFactories() map[string]blueprint.ModuleFactory {
func (l *loadHookContext) appendPrependHelper(props []interface{},
	extendFn func([]interface{}, interface{}, proptools.ExtendPropertyFilterFunc) error) {
	for _, p := range props {
		err := extendFn(l.Module().base().customizableProperties, p, nil)
		err := extendFn(l.Module().base().generalProperties, p, nil)
		if err != nil {
			if propertyErr, ok := err.(*proptools.ExtendPropertyError); ok {
				l.PropertyErrorf(propertyErr.Property, "%s", propertyErr.Err.Error())
+0 −1
Original line number Diff line number Diff line
@@ -81,7 +81,6 @@ func LicenseFactory() Module {
	module.AddProperties(&base.nameProperties, &module.properties)

	base.generalProperties = module.GetProperties()
	base.customizableProperties = module.GetProperties()

	// The visibility property needs to be checked and parsed by the visibility module.
	setPrimaryVisibilityProperty(module, "visibility", &module.properties.Visibility)
+0 −1
Original line number Diff line number Diff line
@@ -54,7 +54,6 @@ func LicenseKindFactory() Module {
	module.AddProperties(&base.nameProperties, &module.properties)

	base.generalProperties = module.GetProperties()
	base.customizableProperties = module.GetProperties()

	// The visibility property needs to be checked and parsed by the visibility module.
	setPrimaryVisibilityProperty(module, "visibility", &module.properties.Visibility)
Loading