Merge "Add new Asm/C++/Java/Make warning patterns"
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 5f654a6..1b7a279 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -759,6 +759,12 @@
 endif
 is_instrumentation_test :=
 
+# Currently this flag variable is true only for the `android_test_helper_app` type module
+# which should not have any .config file
+ifeq (true, $(LOCAL_DISABLE_TEST_CONFIG))
+  test_config :=
+endif
+
 # Make sure we only add the files once for multilib modules.
 ifdef $(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_compat_files
   # Sync the auto_test_config value for multilib modules.
diff --git a/core/clear_vars.mk b/core/clear_vars.mk
index e2acb67..94a027c 100644
--- a/core/clear_vars.mk
+++ b/core/clear_vars.mk
@@ -61,6 +61,7 @@
 LOCAL_DEX_PREOPT_PROFILE_CLASS_LISTING:=
 LOCAL_DEX_PREOPT:= # '',true,false
 LOCAL_DISABLE_AUTO_GENERATE_TEST_CONFIG:=
+LOCAL_DISABLE_TEST_CONFIG:=
 LOCAL_DISABLE_RESOLVE_SUPPORT_LIBRARIES:=
 LOCAL_DONT_CHECK_MODULE:=
 # Don't delete the META_INF dir when merging static Java libraries.
diff --git a/core/generate_enforce_rro.mk b/core/generate_enforce_rro.mk
index 6a23aeb..9079981 100644
--- a/core/generate_enforce_rro.mk
+++ b/core/generate_enforce_rro.mk
@@ -29,9 +29,12 @@
 
 LOCAL_PATH:= $(intermediates)
 
+# TODO(b/187404676): remove this condition when the prebuilt for packges exporting resource exists.
+ifeq (,$(TARGET_BUILD_UNBUNDLED))
 ifeq ($(enforce_rro_use_res_lib),true)
   LOCAL_RES_LIBRARIES := $(enforce_rro_source_module)
 endif
+endif
 
 LOCAL_FULL_MANIFEST_FILE := $(rro_android_manifest_file)
 
@@ -45,8 +48,9 @@
 else
   $(error Unsupported partition. Want: [vendor/product] Got: [$(enforce_rro_partition)])
 endif
-
-ifneq (,$(LOCAL_RES_LIBRARIES))
+ifneq (,$(TARGET_BUILD_UNBUNDLED))
+  LOCAL_SDK_VERSION := current
+else ifneq (,$(LOCAL_RES_LIBRARIES))
   # Technically we are linking against the app (if only to grab its resources),
   # and because it's potentially not building against the SDK, we can't either.
   LOCAL_PRIVATE_PLATFORM_APIS := true
diff --git a/target/product/updatable_apex.mk b/target/product/updatable_apex.mk
index c8dc8b0..d606e00 100644
--- a/target/product/updatable_apex.mk
+++ b/target/product/updatable_apex.mk
@@ -22,4 +22,9 @@
   PRODUCT_PACKAGES += com.android.apex.cts.shim.v1_prebuilt
   PRODUCT_VENDOR_PROPERTIES := ro.apex.updatable=true
   TARGET_FLATTEN_APEX := false
+  # Use compressed apexes in pre-installed partitions.
+  # Note: this doesn't mean that all pre-installed apexes will be compressed.
+  #  Whether an apex is compressed or not is controlled at apex Soong module
+  #  via compresible property.
+  PRODUCT_COMPRESSED_APEX := true
 endif