diff options
Diffstat (limited to 'runtime/native/java_lang_Thread.cc')
-rw-r--r-- | runtime/native/java_lang_Thread.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/native/java_lang_Thread.cc b/runtime/native/java_lang_Thread.cc index e85ef09a13..a9de086785 100644 --- a/runtime/native/java_lang_Thread.cc +++ b/runtime/native/java_lang_Thread.cc @@ -122,13 +122,13 @@ static void Thread_nativeSetName(JNIEnv* env, jobject peer, jstring java_name) { // thread list lock to avoid this, as setting the thread name causes mutator to lock/unlock // in the DDMS send code. bool timed_out; - Thread* thread = Thread::SuspendForDebugger(peer, true, &timed_out); + Thread* thread = ThreadList::SuspendThreadByPeer(peer, true, false, &timed_out); if (thread != NULL) { { ScopedObjectAccess soa(env); thread->SetThreadName(name.c_str()); } - Runtime::Current()->GetThreadList()->Resume(thread, true); + Runtime::Current()->GetThreadList()->Resume(thread, false); } else if (timed_out) { LOG(ERROR) << "Trying to set thread name to '" << name.c_str() << "' failed as the thread " "failed to suspend within a generous timeout."; |