Add a callback for the framework to explicitly enable the JIT compiler.

Dalvik_dalvik_system_VMRuntime_startJITCompilation ()V it is.
diff --git a/libcore/dalvik/src/main/java/dalvik/system/VMRuntime.java b/libcore/dalvik/src/main/java/dalvik/system/VMRuntime.java
index 7ac0849..96e43d8 100644
--- a/libcore/dalvik/src/main/java/dalvik/system/VMRuntime.java
+++ b/libcore/dalvik/src/main/java/dalvik/system/VMRuntime.java
@@ -186,4 +186,13 @@
      * @return the number of bytes
      */
     public native long getExternalBytesAllocated();
+
+    /**
+     * Tells the VM to enable the JIT compiler. If the VM does not have a JIT
+     * implementation, calling this method should have no effect.
+     *
+     * {@hide}
+     */
+    public native void startJITCompilation();
+
 }
diff --git a/vm/native/dalvik_system_VMRuntime.c b/vm/native/dalvik_system_VMRuntime.c
index 0ec3ced..be276f4 100644
--- a/vm/native/dalvik_system_VMRuntime.c
+++ b/vm/native/dalvik_system_VMRuntime.c
@@ -178,6 +178,25 @@
     RETURN_LONG((s8)dvmGetExternalBytesAllocated());
 }
 
+/*
+ * public native void startJITCompilation()
+ *
+ * Callback function from the framework to indicate that an app has gone
+ * through the startup phase and it is time to enable the JIT compiler.
+ */
+static void Dalvik_dalvik_system_VMRuntime_startJITCompilation(const u4* args,
+    JValue* pResult)
+{
+#if defined(WITH_JIT)
+    /*
+     * TODO - experiment the timing and put code here to start JIT'ing
+     * The tentative plan is onResume() will invoke the callback.
+     */
+#endif
+
+    RETURN_VOID();
+}
+
 const DalvikNativeMethod dvm_dalvik_system_VMRuntime[] = {
     { "getTargetHeapUtilization", "()F",
         Dalvik_dalvik_system_VMRuntime_getTargetHeapUtilization },
@@ -195,6 +214,7 @@
         Dalvik_dalvik_system_VMRuntime_trackExternalFree },
     { "getExternalBytesAllocated", "()J",
         Dalvik_dalvik_system_VMRuntime_getExternalBytesAllocated },
+    { "startJITCompilation", "()V",
+        Dalvik_dalvik_system_VMRuntime_startJITCompilation },
     { NULL, NULL, NULL },
 };
-