Merge "Support dexpreopt against the primary boot image."
diff --git a/core/config.mk b/core/config.mk
index 82545e5..844d7d6 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -238,15 +238,14 @@
 $(eval SOONG_CONFIG_$1 :=)
 endef
 
-# The add_soong_config_var function adds a soong config variable to
-# SOONG_CONFIG_*. The variable and its value are then be available to a
+# The add_soong_config_var function adds a a list of soong config variables to
+# SOONG_CONFIG_*. The variables and their values are then available to a
 # soong_config_module_type in an Android.bp file.
-# $1 is the namespace. $2 is the variable name.
-# Ex: $(call add_soong_config_var,acme,COOL_FEATURE)
-
+# $1 is the namespace. $2 is the list of variables.
+# Ex: $(call add_soong_config_var,acme,COOL_FEATURE_A COOL_FEATURE_B)
 define add_soong_config_var
 $(eval SOONG_CONFIG_$1 += $2) \
-$(eval SOONG_CONFIG_$1_$2 := $($2))
+$(foreach v,$2,$(eval SOONG_CONFIG_$1_$v := $($v)))
 endef
 
 # The add_soong_config_var_value function defines a make variable and also adds
diff --git a/core/product_config.mk b/core/product_config.mk
index 1890599..47492c2e 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -335,6 +335,12 @@
   endif
 endif
 
+ifdef PRODUCT_SHIPPING_API_LEVEL
+  ifneq (,$(call math_gt_or_eq,29,$(PRODUCT_SHIPPING_API_LEVEL)))
+    PRODUCT_PACKAGES += $(PRODUCT_PACKAGES_SHIPPING_API_LEVEL_29)
+  endif
+endif
+
 # If build command defines OVERRIDE_PRODUCT_EXTRA_VNDK_VERSIONS,
 # override PRODUCT_EXTRA_VNDK_VERSIONS with it.
 ifdef OVERRIDE_PRODUCT_EXTRA_VNDK_VERSIONS
diff --git a/target/product/base_vendor.mk b/target/product/base_vendor.mk
index 9ed2ef1..469e231 100644
--- a/target/product/base_vendor.mk
+++ b/target/product/base_vendor.mk
@@ -41,7 +41,6 @@
 # Base modules and settings for the vendor partition.
 PRODUCT_PACKAGES += \
     android.hardware.cas@1.1-service \
-    android.hardware.configstore@1.1-service \
     android.hardware.media.omx@1.0-service \
     boringssl_self_test_vendor \
     dumpsys_vendor \
@@ -70,6 +69,10 @@
     vndservice \
     vndservicemanager \
 
+# Base module when shipping api level is less than or equal to 29
+PRODUCT_PACKAGES_SHIPPING_API_LEVEL_29 += \
+    android.hardware.configstore@1.1-service \
+
 # VINTF data for vendor image
 PRODUCT_PACKAGES += \
     vendor_compatibility_matrix.xml \
diff --git a/tools/releasetools/validate_target_files.py b/tools/releasetools/validate_target_files.py
index 9c2bc51..1b918cc 100755
--- a/tools/releasetools/validate_target_files.py
+++ b/tools/releasetools/validate_target_files.py
@@ -350,7 +350,7 @@
     # vbmeta partitions (e.g. vbmeta_system).
     image = os.path.join(input_tmp, 'IMAGES', 'vbmeta.img')
     cmd = [info_dict['avb_avbtool'], 'verify_image', '--image', image,
-           '--key', key, '--follow_chain_partitions']
+           '--follow_chain_partitions']
 
     # Append the args for chained partitions if any.
     for partition in common.AVB_PARTITIONS + common.AVB_VBMETA_PARTITIONS: