Index: remoting/client/jni/chromoting_jni_instance.cc |
diff --git a/remoting/client/jni/chromoting_jni_instance.cc b/remoting/client/jni/chromoting_jni_instance.cc |
index a2add66533114faedbe9f2fd9a8e4d05da5db7ed..5dd94b30b11fa6df9ba39825264bc51a535cfc6e 100644 |
--- a/remoting/client/jni/chromoting_jni_instance.cc |
+++ b/remoting/client/jni/chromoting_jni_instance.cc |
@@ -8,6 +8,7 @@ |
#include "base/bind.h" |
#include "base/logging.h" |
+#include "jingle/glue/thread_wrapper.h" |
#include "net/socket/client_socket_factory.h" |
#include "remoting/client/audio_player.h" |
#include "remoting/client/jni/android_keymap.h" |
@@ -314,6 +315,8 @@ void ChromotingJniInstance::ConnectToHostOnDisplayThread() { |
void ChromotingJniInstance::ConnectToHostOnNetworkThread() { |
DCHECK(jni_runtime_->network_task_runner()->BelongsToCurrentThread()); |
+ jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop(); |
+ |
client_context_.reset(new ClientContext( |
jni_runtime_->network_task_runner().get())); |
client_context_->Start(); |