crunch_flags: handle non-string ACONFIG_VALUE_SETS

If the default value for RELEASE_ACONFIG_VALUE_SETS is not a string,
the resulting value is the empty string.

Bug: 328495189
Test: manual
Change-Id: Ie8f262d6408b1564ec7a3918f8654ccfa9bc5940
This commit is contained in:
LaMont Jones
2024-05-08 17:24:51 -07:00
parent 992011ea77
commit 6f3ca9eea1

View File

@@ -137,7 +137,9 @@ func ProcessBuildFlags(dir string, namespaceMap map[string]string) error {
workflow := rc_proto.Workflow(rc_proto.Workflow_PREBUILT)
switch {
case declName == "RELEASE_ACONFIG_VALUE_SETS":
rootAconfigModule = declValue[1 : len(declValue)-1]
if strings.HasPrefix(declValue, "\"") {
rootAconfigModule = declValue[1 : len(declValue)-1]
}
continue
case strings.HasPrefix(declValue, "\""):
// String values mean that the flag workflow is (most likely) either MANUAL or PREBUILT.