From c3f7cd10a8171593b196772ec2fe8c1908396176 Mon Sep 17 00:00:00 2001 From: Iordan Iordanov Date: Mon, 17 Mar 2014 20:28:06 -0400 Subject: [PATCH] Workaround to permit network communication on main thread. --- eclipse_projects/bVNC/AndroidManifest.xml | 2 +- .../bVNC/src/com/iiordanov/bVNC/RemoteCanvasActivity.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/eclipse_projects/bVNC/AndroidManifest.xml b/eclipse_projects/bVNC/AndroidManifest.xml index d4fef1a33..3af146b67 100644 --- a/eclipse_projects/bVNC/AndroidManifest.xml +++ b/eclipse_projects/bVNC/AndroidManifest.xml @@ -1,7 +1,7 @@ + android:versionCode="3590" android:versionName="v3.5.9"> diff --git a/eclipse_projects/bVNC/src/com/iiordanov/bVNC/RemoteCanvasActivity.java b/eclipse_projects/bVNC/src/com/iiordanov/bVNC/RemoteCanvasActivity.java index cfd830874..4e631414d 100644 --- a/eclipse_projects/bVNC/src/com/iiordanov/bVNC/RemoteCanvasActivity.java +++ b/eclipse_projects/bVNC/src/com/iiordanov/bVNC/RemoteCanvasActivity.java @@ -55,6 +55,7 @@ import android.net.Uri; import android.os.Bundle; import android.os.Handler; +import android.os.StrictMode; import android.os.SystemClock; import android.util.Log; import android.view.InputDevice; @@ -142,6 +143,9 @@ public void onCreate(Bundle icicle) { } void initialize () { + StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build(); + StrictMode.setThreadPolicy(policy); + handler = new Handler (); requestWindowFeature(Window.FEATURE_NO_TITLE);