Skip to content

Commit

Permalink
Workaround to permit network communication on main thread.
Browse files Browse the repository at this point in the history
  • Loading branch information
iiordanov committed Mar 18, 2014
1 parent 5332814 commit c3f7cd1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion eclipse_projects/bVNC/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.iiordanov.bVNC" android:installLocation="auto"
android:versionCode="3580" android:versionName="v3.5.8">
android:versionCode="3590" android:versionName="v3.5.9">

<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="10"></uses-sdk>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit c3f7cd1

Please sign in to comment.