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

Commit 65287d5d authored by Yu Liu's avatar Yu Liu Committed by Gerrit Code Review
Browse files

Merge "Remove the code for bazel when reading ReleaseAconfigValueSets." into main

parents e51c6e41 95572ff2
Loading
Loading
Loading
Loading
+1 −16
Original line number Diff line number Diff line
@@ -210,22 +210,7 @@ func (c Config) ReleaseVersion() string {

// The aconfig value set passed to aconfig, derived from RELEASE_VERSION
func (c Config) ReleaseAconfigValueSets() []string {
	// This logic to handle both Soong module name and bazel target is temporary in order to
	// provide backward compatibility where aosp and internal both have the release
	// aconfig value set but can't be updated at the same time to use bazel target
	var valueSets []string
	for _, valueSet := range c.config.productVariables.ReleaseAconfigValueSets {
		value := strings.Split(valueSet, ":")
		valueLen := len(value)
		if valueLen > 2 {
			// This shouldn't happen as this should be either a module name or a bazel target path.
			panic(fmt.Errorf("config file: invalid value for release aconfig value sets: %s", valueSet))
		}
		if valueLen > 0 {
			valueSets = append(valueSets, value[valueLen-1])
		}
	}
	return valueSets
	return c.config.productVariables.ReleaseAconfigValueSets
}

// The flag default permission value passed to aconfig