File tree 1 file changed +9
-1
lines changed
WirelessIno/src/se/sics/sse/fresta/wirelessino
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 14
14
import android .widget .Button ;
15
15
import android .widget .EditText ;
16
16
17
+ import android .os .StrictMode ;
18
+
17
19
public class SocketConnector extends Activity {
18
20
private final static int CONNECTION_TIMEOUT = 3000 ;
19
21
@@ -23,7 +25,13 @@ public class SocketConnector extends Activity {
23
25
private Socket socket = null ;
24
26
25
27
protected void onCreate (Bundle savedInstanceState ) {
28
+
26
29
super .onCreate (savedInstanceState );
30
+
31
+
32
+ StrictMode .ThreadPolicy policy = new StrictMode .ThreadPolicy .Builder ().permitAll ().build ();
33
+ StrictMode .setThreadPolicy (policy );
34
+
27
35
setContentView (R .layout .socket_connection_build );
28
36
ed_host = (EditText ) findViewById (R .id .ed_host );
29
37
ed_port = (EditText ) findViewById (R .id .ed_port );
@@ -114,7 +122,7 @@ protected void onPostExecute(String result) {
114
122
else {
115
123
new AlertDialog .Builder (SocketConnector .this )
116
124
.setTitle ("notification" )
117
- .setMessage (msg )
125
+ .setMessage (msg + " " + result )
118
126
.setPositiveButton ("ok" , new DialogInterface .OnClickListener () {
119
127
public void onClick (DialogInterface dialog , int which ) {
120
128
}
You can’t perform that action at this time.
0 commit comments