OUYA setup connection check

revision 97438b1a190591babdc799b32481d8dbe14d6e46

raw

ConnectivityChecker.java

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
        public Void doInBackground(Void... params) {
            Socket socket = null;
            boolean reachable = false;
            try {
                Socket socket2 = new Socket("devs.ouya.tv", 80);
                reachable = true;
                if (socket2 != null) {
                    try {
                        socket2.close();
                        Socket socket3 = socket2;
                    } catch (IOException e) {
                        Socket socket4 = socket2;
                    }
                }
            } catch (UnknownHostException e2) {
                if (socket != null) {
                    try {
                        socket.close();
                    } catch (IOException e3) {
                    }
                }
            } catch (IOException e4) {
                if (socket != null) {
                    try {
                        socket.close();
                    } catch (IOException e5) {
                    }
                }
            } catch (Throwable th) {
                if (socket != null) {
                    try {
                        socket.close();
                    } catch (IOException e6) {
                    }
                }
                throw th;
            }
            setResult(reachable);
            return null;
        }
 

History