Loading tools/product_config/src/com/android/build/config/ConfigBase.java +1 −10 Original line number Diff line number Diff line Loading @@ -46,15 +46,6 @@ public class ConfigBase { */ protected final TreeMap<String, VarType> mProductVars = new TreeMap(); /** * Whether a product config variable is a list or single-value variable. */ public enum VarType { LIST, SINGLE, UNKNOWN // For non-product vars } public void setPhase(String phase) { mPhase = phase; } Loading Loading @@ -112,7 +103,7 @@ public class ConfigBase { public void copyFrom(ConfigBase that) { setPhase(that.getPhase()); setRootNodes(that.getRootNodes()); for (Map.Entry<String, ConfigBase.VarType> entry: that.getProductVars().entrySet()) { for (Map.Entry<String, VarType> entry: that.getProductVars().entrySet()) { addProductVar(entry.getKey(), entry.getValue()); } mInitialVariables = new HashMap(that.getInitialVariables()); Loading tools/product_config/src/com/android/build/config/ConvertMakeToGenericConfig.java +2 −2 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ public class ConvertMakeToGenericConfig { * Converts one variable from a MakeConfig Block into a GenericConfig Assignment. */ GenericConfig.Assign convertAssignment(MakeConfig.BlockType blockType, Str inheritedFile, ConfigBase.VarType varType, String varName, Str varVal, Str prevVal) { VarType varType, String varName, Str varVal, Str prevVal) { if (prevVal == null) { // New variable. return new GenericConfig.Assign(varName, varVal); Loading @@ -120,7 +120,7 @@ public class ConvertMakeToGenericConfig { // Product vars have the @inherit processing. Other vars we // will just ignore and put in one section at the end, based // on the difference between the BEFORE and AFTER blocks. if (varType == ConfigBase.VarType.UNKNOWN) { if (varType == VarType.UNKNOWN) { if (blockType == MakeConfig.BlockType.AFTER) { // For UNKNOWN variables, we don't worry about the // intermediate steps, just take the final value. Loading tools/product_config/src/com/android/build/config/DumpConfigParser.java +1 −2 Original line number Diff line number Diff line Loading @@ -140,8 +140,7 @@ public class DumpConfigParser { System.out.println(" " + makeConfig.getRootNodes()); } } else if (matchLineType(line, "var", 2)) { final MakeConfig.VarType type = "list".equals(fields.get(1)) ? MakeConfig.VarType.LIST : MakeConfig.VarType.SINGLE; final VarType type = "list".equals(fields.get(1)) ? VarType.LIST : VarType.SINGLE; makeConfig.addProductVar(fields.get(2), type); if (DEBUG) { Loading tools/product_config/src/com/android/build/config/VarType.java 0 → 100644 +41 −0 Original line number Diff line number Diff line /* * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.build.config; /** * Whether a product config variable is a list or single-value variable. */ public enum VarType { /** * A product config variable that is a list of space separated strings. * These are defined by _product_single_value_vars in product.mk. */ LIST, /** * A product config varaible that is a single string. * These are defined by _product_list_vars in product.mk. */ SINGLE, /** * A variable that is given the special product config handling but is * nonetheless defined by product config makefiles. */ UNKNOWN } Loading
tools/product_config/src/com/android/build/config/ConfigBase.java +1 −10 Original line number Diff line number Diff line Loading @@ -46,15 +46,6 @@ public class ConfigBase { */ protected final TreeMap<String, VarType> mProductVars = new TreeMap(); /** * Whether a product config variable is a list or single-value variable. */ public enum VarType { LIST, SINGLE, UNKNOWN // For non-product vars } public void setPhase(String phase) { mPhase = phase; } Loading Loading @@ -112,7 +103,7 @@ public class ConfigBase { public void copyFrom(ConfigBase that) { setPhase(that.getPhase()); setRootNodes(that.getRootNodes()); for (Map.Entry<String, ConfigBase.VarType> entry: that.getProductVars().entrySet()) { for (Map.Entry<String, VarType> entry: that.getProductVars().entrySet()) { addProductVar(entry.getKey(), entry.getValue()); } mInitialVariables = new HashMap(that.getInitialVariables()); Loading
tools/product_config/src/com/android/build/config/ConvertMakeToGenericConfig.java +2 −2 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ public class ConvertMakeToGenericConfig { * Converts one variable from a MakeConfig Block into a GenericConfig Assignment. */ GenericConfig.Assign convertAssignment(MakeConfig.BlockType blockType, Str inheritedFile, ConfigBase.VarType varType, String varName, Str varVal, Str prevVal) { VarType varType, String varName, Str varVal, Str prevVal) { if (prevVal == null) { // New variable. return new GenericConfig.Assign(varName, varVal); Loading @@ -120,7 +120,7 @@ public class ConvertMakeToGenericConfig { // Product vars have the @inherit processing. Other vars we // will just ignore and put in one section at the end, based // on the difference between the BEFORE and AFTER blocks. if (varType == ConfigBase.VarType.UNKNOWN) { if (varType == VarType.UNKNOWN) { if (blockType == MakeConfig.BlockType.AFTER) { // For UNKNOWN variables, we don't worry about the // intermediate steps, just take the final value. Loading
tools/product_config/src/com/android/build/config/DumpConfigParser.java +1 −2 Original line number Diff line number Diff line Loading @@ -140,8 +140,7 @@ public class DumpConfigParser { System.out.println(" " + makeConfig.getRootNodes()); } } else if (matchLineType(line, "var", 2)) { final MakeConfig.VarType type = "list".equals(fields.get(1)) ? MakeConfig.VarType.LIST : MakeConfig.VarType.SINGLE; final VarType type = "list".equals(fields.get(1)) ? VarType.LIST : VarType.SINGLE; makeConfig.addProductVar(fields.get(2), type); if (DEBUG) { Loading
tools/product_config/src/com/android/build/config/VarType.java 0 → 100644 +41 −0 Original line number Diff line number Diff line /* * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.build.config; /** * Whether a product config variable is a list or single-value variable. */ public enum VarType { /** * A product config variable that is a list of space separated strings. * These are defined by _product_single_value_vars in product.mk. */ LIST, /** * A product config varaible that is a single string. * These are defined by _product_list_vars in product.mk. */ SINGLE, /** * A variable that is given the special product config handling but is * nonetheless defined by product config makefiles. */ UNKNOWN }