Info Call to Socket API

Description

List of all calls to Server Socket API.

Recommendation

This entry is informative, no recommendations applicable.

Technical details

Method bolts.WebViewAppLinkResolver$3.call() calling method java.net.URL.<init>()


    public Void call()
    {
        java.net.URL v0_5 = new java.net.URL(this.val$url.toString());
        java.net.HttpURLConnection v2_2 = 0;
        while (v0_5 != null) {
            v2_2 = v0_5.openConnection();
            java.net.URL v0_4 = (v2_2 instanceof java.net.HttpURLConnection);
            if (v0_4 != null) {
                ((java.net.HttpURLConnection) v2_2).setInstanceFollowRedirects(1);
            }
            v2_2.setRequestProperty("Prefer-Html-Meta-Tags", "al");
            v2_2.connect();
            if (v0_4 != null) {
                java.net.URL v0_7 = ((java.net.HttpURLConnection) v2_2);
                if ((v0_7.getResponseCode() >= 300) && (v0_7.getResponseCode() < 400)) {
                    java.net.URL v3_8 = new java.net.URL(v0_7.getHeaderField("Location"));
                    v0_7.disconnect();
                    v0_5 = v3_8;
                }
            }
            v0_5 = 0;
        }
        try {
            this.val$content.set(bolts.WebViewAppLinkResolver.access$300(v2_2));
            this.val$contentType.set(v2_2.getContentType());
        } catch (java.net.URL v0_3) {
            if ((v2_2 instanceof java.net.HttpURLConnection)) {
                ((java.net.HttpURLConnection) v2_2).disconnect();
            }
            throw v0_3;
        }
        if ((v2_2 instanceof java.net.HttpURLConnection)) {
            ((java.net.HttpURLConnection) v2_2).disconnect();
        }
        return 0;
    }

Method com.facebook.GraphRequest.toHttpConnection() calling method java.net.URL.<init>()


    public static java.net.HttpURLConnection toHttpConnection(com.facebook.GraphRequestBatch p2)
    {
        com.facebook.GraphRequest.validateFieldsParamForGetRequests(p2);
        try {
            String v1_1;
            if (p2.size() != 1) {
                v1_1 = new java.net.URL(com.facebook.internal.ServerProtocol.getGraphUrlBase());
            } else {
                v1_1 = new java.net.URL(p2.get(0).getUrlForSingleRequest());
            }
            try {
                com.facebook.FacebookException v0_5 = com.facebook.GraphRequest.createConnection(v1_1);
                com.facebook.GraphRequest.serializeToUrlConnection(p2, v0_5);
                return v0_5;
            } catch (org.json.JSONException v2_2) {
                com.facebook.internal.Utility.disconnectQuietly(v0_5);
                throw new com.facebook.FacebookException("could not construct request body", v2_2);
            } catch (org.json.JSONException v2_2) {
            }
        } catch (org.json.JSONException v2_1) {
            throw new com.facebook.FacebookException("could not construct URL for request", v2_1);
        }
        v0_5 = com.facebook.GraphRequest.createConnection(v1_1);
        com.facebook.GraphRequest.serializeToUrlConnection(p2, v0_5);
        return v0_5;
    }

Method com.facebook.GraphResponse.getRequestForPagedResults() calling method java.net.URL.<init>()


    public com.facebook.GraphRequest getRequestForPagedResults(com.facebook.GraphResponse$PagingDirection p5)
    {
        String v5_2;
        com.facebook.GraphRequest v0_0 = this.graphObject;
        if (v0_0 == null) {
            v5_2 = 0;
        } else {
            com.facebook.GraphRequest v0_7 = v0_0.optJSONObject("paging");
            if (v0_7 == null) {
            } else {
                if (p5 != com.facebook.GraphResponse$PagingDirection.NEXT) {
                    v5_2 = v0_7.optString("previous");
                } else {
                    v5_2 = v0_7.optString("next");
                }
            }
        }
        if (!com.facebook.internal.Utility.isNullOrEmpty(v5_2)) {
            if ((v5_2 == null) || (!v5_2.equals(this.request.getUrlForSingleRequest()))) {
                try {
                    return new com.facebook.GraphRequest(this.request.getAccessToken(), new java.net.URL(v5_2));
                } catch (java.net.MalformedURLException) {
                    return 0;
                }
            } else {
                return 0;
            }
        } else {
            return 0;
        }
    }

Method com.facebook.internal.ImageDownloader.download() calling method java.net.URL.<init>()


    private static void download(com.facebook.internal.ImageDownloader$RequestKey p9, android.content.Context p10)
    {
        com.facebook.FacebookException v0 = 0;
        com.facebook.internal.ImageRequest v2_0 = 1;
        try {
            int v3_0 = ((java.net.HttpURLConnection) new java.net.URL(p9.uri.toString()).openConnection());
            try {
                int v10_1;
                int v4_2;
                v3_0.setInstanceFollowRedirects(0);
                int v4_1 = v3_0.getResponseCode();
                try {
                    if (v4_1 == 200) {
                        v10_1 = com.facebook.internal.ImageResponseCache.interceptAndCacheImageStream(p10, v3_0);
                        v4_2 = android.graphics.BitmapFactory.decodeStream(v10_1);
                    } else {
                        if ((v4_1 == 301) || (v4_1 == 302)) {
                            try {
                                int v10_5 = v3_0.getHeaderField("location");
                            } catch (int v4_0) {
                                v10_1 = 0;
                                v2_0 = 0;
                                com.facebook.internal.Utility.closeQuietly(v10_1);
                                com.facebook.internal.Utility.disconnectQuietly(v3_0);
                                v4_2 = 0;
                                v0 = v4_0;
                                if (v2_0 != null) {
                                    com.facebook.internal.ImageDownloader.issueResponse(p9, v0, v4_2, 0);
                                }
                                return;
                            }
                            if (!com.facebook.internal.Utility.isNullOrEmpty(v10_5)) {
                                int v10_6 = android.net.Uri.parse(v10_5);
                                com.facebook.internal.UrlRedirectCache.cacheUriRedirect(p9.uri, v10_6);
                                com.facebook.internal.ImageRequest v2_3 = com.facebook.internal.ImageDownloader.removePendingRequest(p9);
                                if ((v2_3 != null) && (!v2_3.isCancelled)) {
                                    com.facebook.internal.ImageDownloader.enqueueCacheRead(v2_3.request, new com.facebook.internal.ImageDownloader$RequestKey(v10_6, p9.tag), 0);
                                }
                            }
                            v10_1 = 0;
                            v4_2 = 0;
                            v2_0 = 0;
                        } else {
                            v10_1 = v3_0.getErrorStream();
                            int v4_9 = new StringBuilder();
                            if (v10_1 == 0) {
                                v4_9.append("Unexpected error while downloading an image.");
                            } else {
                                com.facebook.FacebookException v5_4 = new java.io.InputStreamReader(v10_1);
                                char[] v6_1 = new char[128];
                                while(true) {
                                    int v7_1 = v5_4.read(v6_1, 0, v6_1.length);
                                    if (v7_1 <= 0) {
                                        break;
                                    }
                                    v4_9.append(v6_1, 0, v7_1);
                                }
                                com.facebook.internal.Utility.closeQuietly(v5_4);
                            }
                            v4_2 = 0;
                            v0 = new com.facebook.FacebookException(v4_9.toString());
                        }
                    }
                } catch (Throwable v9_1) {
                    v0 = v10_1;
                    com.facebook.internal.Utility.closeQuietly(v0);
                    com.facebook.internal.Utility.disconnectQuietly(v3_0);
                    throw v9_1;
                } catch (int v4_0) {
                }
                com.facebook.internal.Utility.closeQuietly(v10_1);
                com.facebook.internal.Utility.disconnectQuietly(v3_0);
            } catch (Throwable v9_1) {
            } catch (int v4_0) {
                v10_1 = 0;
            }
        } catch (Throwable v9_1) {
            v3_0 = 0;
        } catch (int v4_0) {
            v10_1 = 0;
            v3_0 = 0;
        }
    }

Method com.google.android.gms.auth.api.signin.internal.zzd.run() calling method java.net.URL.<init>()


    public final void run()
    {
        com.google.android.gms.common.api.Status v0 = com.google.android.gms.common.api.Status.RESULT_INTERNAL_ERROR;
        try {
            com.google.android.gms.common.logging.Logger v3_0;
            Object[] v4_7 = String.valueOf(this.zzbe);
        } catch (String v2_10) {
            String v2_12 = String.valueOf(v2_10.toString());
            if (v2_12.length() == 0) {
                String v2_14 = new String("IOException when revoking access: ");
            } else {
                v2_14 = "IOException when revoking access: ".concat(v2_12);
            }
            com.google.android.gms.common.api.internal.StatusPendingResult v1_2 = new Object[0];
            com.google.android.gms.auth.api.signin.internal.zzd.zzbd.e(v2_14, v1_2);
            this.zzbf.setResult(v0);
            return;
        } catch (String v2_5) {
            String v2_7 = String.valueOf(v2_5.toString());
            if (v2_7.length() == 0) {
                String v2_9 = new String("Exception when revoking access: ");
            } else {
                v2_9 = "Exception when revoking access: ".concat(v2_7);
            }
            com.google.android.gms.common.api.internal.StatusPendingResult v1_1 = new Object[0];
            com.google.android.gms.auth.api.signin.internal.zzd.zzbd.e(v2_9, v1_1);
            this.zzbf.setResult(v0);
            return;
        }
        if (v4_7.length() == 0) {
            v3_0 = new String("https://accounts.google.com/o/oauth2/revoke?token=");
        } else {
            v3_0 = "https://accounts.google.com/o/oauth2/revoke?token=".concat(v4_7);
        }
        String v2_2 = ((java.net.HttpURLConnection) new java.net.URL(v3_0).openConnection());
        v2_2.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
        String v2_4 = v2_2.getResponseCode();
        if (v2_4 != 200) {
            StringBuilder v5_0 = new Object[0];
            com.google.android.gms.auth.api.signin.internal.zzd.zzbd.e("Unable to revoke access!", v5_0);
        } else {
            v0 = com.google.android.gms.common.api.Status.RESULT_SUCCESS;
        }
        StringBuilder v5_4 = new StringBuilder(26);
        v5_4.append("Response Code: ");
        v5_4.append(v2_4);
        Object[] v4_10 = new Object[0];
        com.google.android.gms.auth.api.signin.internal.zzd.zzbd.d(v5_4.toString(), v4_10);
        this.zzbf.setResult(v0);
        return;
    }

Method com.unity3d.player.UnityWebRequest.runSafe() calling method java.net.URL.<init>()


    private void runSafe()
    {
        this.g = System.currentTimeMillis();
        try {
            long v0_32 = new java.net.URL(this.b);
            boolean v1_6 = v0_32.openConnection();
            v1_6.setConnectTimeout(this.f);
            v1_6.setReadTimeout(this.f);
            java.io.InputStream v3 = 0;
        } catch (long v0_30) {
            this.malformattedUrlCallback(v0_30.toString());
            return;
        } catch (long v0_23) {
            this.errorCallback(v0_23.toString());
            return;
        }
        if ((v1_6 instanceof javax.net.ssl.HttpsURLConnection)) {
            javax.net.ssl.SSLSocketFactory v4_1;
            boolean v2_7 = ((javax.net.ssl.HttpsURLConnection) v1_6);
            if (!this.e) {
                v4_1 = 0;
            } else {
                v4_1 = new com.unity3d.player.UnityWebRequest$2(this);
                v2_7.setHostnameVerifier(com.unity3d.player.UnityWebRequest.k);
            }
            javax.net.ssl.SSLSocketFactory v4_3 = com.unity3d.player.b.a(v4_1);
            if (v4_3 != null) {
                v2_7.setSSLSocketFactory(v4_3);
            }
        }
        if ((!v0_32.getProtocol().equalsIgnoreCase("file")) || (v0_32.getHost().isEmpty())) {
            boolean v2_17 = (v1_6 instanceof java.net.HttpURLConnection);
            if (v2_17) {
                try {
                    java.nio.ByteBuffer v5_2 = ((java.net.HttpURLConnection) v1_6);
                    v5_2.setRequestMethod(this.c);
                    v5_2.setInstanceFollowRedirects(0);
                } catch (long v0_33) {
                    this.badProtocolCallback(v0_33.toString());
                    return;
                }
                if (this.h > 0) {
                    if (!this.j) {
                        v5_2.setFixedLengthStreamingMode(((int) this.h));
                    } else {
                        v5_2.setChunkedStreamingMode(0);
                    }
                    if (this.i) {
                        v5_2.addRequestProperty("Expect", "100-continue");
                    }
                }
            }
            java.nio.ByteBuffer v5_3 = this.d;
            if (v5_3 != null) {
                java.nio.ByteBuffer v5_5 = v5_3.entrySet().iterator();
                while (v5_5.hasNext()) {
                    String v6_13 = ((java.util.Map$Entry) v5_5.next());
                    v1_6.addRequestProperty(((String) v6_13.getKey()), ((String) v6_13.getValue()));
                }
            }
            java.nio.ByteBuffer v5_7 = java.nio.ByteBuffer.allocateDirect(131072);
            if (this.uploadCallback(0) > 0) {
                v1_6.setDoOutput(1);
                try {
                    String v6_25 = v1_6.getOutputStream();
                } catch (long v0_25) {
                    this.errorCallback(v0_25.toString());
                    return;
                }
                while(true) {
                    int v9_1 = this.uploadCallback(v5_7);
                    if (v9_1 <= 0) {
                        break;
                    }
                    if (!this.hasTimedOut()) {
                        v6_25.write(v5_7.array(), v5_7.arrayOffset(), v9_1);
                    } else {
                        v6_25.close();
                        com.unity3d.player.UnityWebRequest.errorCallback(this.a, 14, "WebRequest timed out.");
                        return;
                    }
                }
            }
            if (v2_17) {
                try {
                    this.responseCodeCallback(((java.net.HttpURLConnection) v1_6).getResponseCode());
                } catch (long v0_6) {
                    this.unknownHostCallback(v0_6.toString());
                    return;
                } catch (long v0_5) {
                    this.sslCannotConnectCallback(v0_5);
                    return;
                } catch (long v0_3) {
                    com.unity3d.player.UnityWebRequest.errorCallback(this.a, 14, v0_3.toString());
                    return;
                } catch (long v0_1) {
                    this.errorCallback(v0_1.toString());
                    return;
                }
            }
            boolean v2_5 = v1_6.getHeaderFields();
            this.headerCallback(v2_5);
            if (((!v2_5) || (!v2_5.containsKey("content-length"))) && (v1_6.getContentLength() != -1)) {
                this.headerCallback("content-length", String.valueOf(v1_6.getContentLength()));
            }
            if (((!v2_5) || (!v2_5.containsKey("content-type"))) && (v1_6.getContentType() != null)) {
                this.headerCallback("content-type", v1_6.getContentType());
            }
            if ((v2_5) && ((v2_5.containsKey("Set-Cookie")) && ((java.net.CookieHandler.getDefault() != null) && ((java.net.CookieHandler.getDefault() instanceof java.net.CookieManager))))) {
                java.net.CookieStore v10_13 = ((java.net.CookieManager) java.net.CookieHandler.getDefault()).getCookieStore();
                boolean v2_10 = ((java.util.List) v2_5.get("Set-Cookie")).iterator();
                while (v2_10.hasNext()) {
                    try {
                        String v6_8 = ((java.net.HttpCookie) java.net.HttpCookie.parse(((String) v2_10.next())).get(0));
                    } catch (String v6_9) {
                        String v12_3 = new StringBuilder("UnityWebRequest: error constructing URI: ");
                        v12_3.append(v6_9.getMessage());
                        com.unity3d.player.g.Log(6, v12_3.toString());
                    }
                    if ((v6_8.getPath() != null) && ((!v6_8.getPath().equals("")) && ((v6_8.getDomain() == null) || (v6_8.getDomain().equals(v0_32.getHost()))))) {
                        java.net.URI v11_8 = new java.net.URI(v0_32.getProtocol(), v0_32.getHost(), v6_8.getPath(), 0);
                        v6_8.setDomain(v0_32.getHost());
                        v10_13.add(v11_8, v6_8);
                    }
                }
            }
            this.contentLengthCallback(v1_6.getContentLength());
            try {
                if ((v1_6 instanceof java.net.HttpURLConnection)) {
                    long v0_11 = ((java.net.HttpURLConnection) v1_6);
                    this.responseCodeCallback(v0_11.getResponseCode());
                    v3 = v0_11.getErrorStream();
                }
            } catch (long v0_21) {
                this.unknownHostCallback(v0_21.toString());
                return;
            } catch (long v0_20) {
                this.sslCannotConnectCallback(v0_20);
                return;
            } catch (long v0_18) {
                com.unity3d.player.UnityWebRequest.errorCallback(this.a, 14, v0_18.toString());
                return;
            } catch (long v0_16) {
                com.unity3d.player.UnityWebRequest.errorCallback(this.a, 14, v0_16.toString());
                return;
            } catch (long v0_14) {
                this.errorCallback(v0_14.toString());
                return;
            }
            if (v3 == null) {
                v3 = v1_6.getInputStream();
            }
            long v0_12 = java.nio.channels.Channels.newChannel(v3);
            while(true) {
                boolean v1_1 = v0_12.read(v5_7);
                if (v1_1 == -1) {
                    break;
                }
                if (!this.hasTimedOut()) {
                    if (!this.downloadCallback(v5_7, v1_1)) {
                        break;
                    }
                    v5_7.clear();
                } else {
                    v0_12.close();
                    com.unity3d.player.UnityWebRequest.errorCallback(this.a, 14, "WebRequest timed out.");
                    return;
                }
            }
            v0_12.close();
            return;
        } else {
            this.malformattedUrlCallback("file:// must use an absolute path");
            return;
        }
    }