From ca775941f3b7981aabf3a6a3b84d6c94f4f76aff Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Tue, 18 Nov 2014 11:48:22 -0800 Subject: [PATCH] Frameworks/base: Compiled-classes support Let AndroidRuntime check for /system/etc/compiled-classes and push it to the runtime for boot image creation. Bug: 18410571 Change-Id: I2510316381f2661166af24d7e14b013f4e045556 --- core/jni/AndroidRuntime.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp index c5f1d88f535d0..1fbd4a1137208 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -787,6 +787,12 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv) addOption("-Ximage-compiler-option"); addOption("--image-classes=/system/etc/preloaded-classes"); + // If there is a compiled-classes file, push it. + if (hasFile("/system/etc/compiled-classes")) { + addOption("-Ximage-compiler-option"); + addOption("--compiled-classes=/system/etc/compiled-classes"); + } + property_get("dalvik.vm.image-dex2oat-flags", dex2oatImageFlagsBuf, ""); parseExtraOpts(dex2oatImageFlagsBuf, "-Ximage-compiler-option");