Merge "Use JNI to start the daemon threads." into dalvik-dev
diff --git a/src/runtime.cc b/src/runtime.cc
index e1950f3..424b6f7 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -373,11 +373,13 @@
 void Runtime::StartDaemonThreads() {
   signal_catcher_ = new SignalCatcher;
 
-  Class* c = class_linker_->FindSystemClass("Ljava/lang/Daemons;");
+  Thread* self = Thread::Current();
+  JNIEnv* env = self->GetJniEnv();
+  jclass c = env->FindClass("java/lang/Daemons");
   CHECK(c != NULL);
-  Method* m = c->FindDirectMethod("start", "()V");
-  CHECK(m != NULL);
-  m->Invoke(Thread::Current(), NULL, NULL, NULL);
+  jmethodID mid = env->GetStaticMethodID(c, "start", "()V");
+  CHECK(mid != NULL);
+  env->CallStaticVoidMethod(c, mid);
 }
 
 bool Runtime::IsStarted() {