Disable Dex preopting and use interpret-only on ryu.

This CL is meant to be cherry-picked to create a letter build for
an A/B testing experiment, where the device runs interpreter-only
mode (i.e., interpreter + JIT). It is not meant to be merged into
the Android tree eventually, and thus will be reverted after the
letter build.

Test: Build ryu-userdebug.
Bug: 35661819
Change-Id: Ia76028c69ffc5d241f9f62e3a9d684eb7411167b
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 0e6be20..301b552 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -92,14 +92,8 @@
 WIFI_DRIVER_FW_PATH_STA     := "/vendor/firmware/fw_bcmdhd.bin"
 WIFI_DRIVER_FW_PATH_AP      := "/vendor/firmware/fw_bcmdhd_apsta.bin"
 
-# Enable dex-preoptimization to speed up first boot sequence
-ifeq ($(HOST_OS),linux)
-  ifeq ($(TARGET_BUILD_VARIANT),user)
-    ifeq ($(WITH_DEXPREOPT),)
-      WITH_DEXPREOPT := true
-    endif
-  endif
-endif
+# Disable Dex preopting altogether.
+WITH_DEXPREOPT := false
 
 ART_USE_HSPACE_COMPACT=true
 
diff --git a/device.mk b/device.mk
index 168a08e..c34bc64 100644
--- a/device.mk
+++ b/device.mk
@@ -297,4 +297,8 @@
 PRODUCT_COPY_FILES += \
     device/google/dragon/seccomp_policy/mediacodec.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy
 
+# Run with interpreter + JIT (no AOT) for both the boot image and apps.
+PRODUCT_DEX_PREOPT_BOOT_FLAGS := --compiler-filter=interpret-only
+PRODUCT_DEX_PREOPT_DEFAULT_FLAGS := --compiler-filter=interpret-only
+
 $(call inherit-product-if-exists, vendor/nvidia/dragon/dragon-vendor.mk)