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 com.squareup.picasso.UrlConnectionDownloader.openConnection() calling method java.net.URL.<init>()


    protected java.net.HttpURLConnection openConnection(android.net.Uri p4)
    {
        java.net.HttpURLConnection v0_1 = ((java.net.HttpURLConnection) new java.net.URL(p4.toString()).openConnection());
        v0_1.setConnectTimeout(15000);
        v0_1.setReadTimeout(20000);
        return v0_1;
    }

Method com.squareup.okhttp.HttpUrl.url() calling method java.net.URL.<init>()


    public java.net.URL url()
    {
        try {
            return new java.net.URL(this.url);
        } catch (java.net.MalformedURLException v0) {
            throw new RuntimeException(v0);
        }
    }

Method com.microsoft.appcenter.http.DefaultHttpClient.doHttpCall() calling method java.net.URL.<init>()


    private static String doHttpCall(String p21, String p22, java.util.Map p23, com.microsoft.appcenter.http.HttpClient$CallTemplate p24)
    {
        java.net.URL v16 = new java.net.URL;
        v16(p21);
        javax.net.ssl.HttpsURLConnection v17_1 = ((javax.net.ssl.HttpsURLConnection) v16.openConnection());
        try {
            int v3 = android.os.Build$VERSION.SDK_INT;
        } catch (com.microsoft.appcenter.http.HttpException v18_21) {
            v17_1.disconnect();
            throw v18_21;
        }
        if ((v3 >= 16) && (v3 < 20)) {
            v17_1.setSSLSocketFactory(new com.microsoft.appcenter.http.TLS1_2SocketFactory());
        }
        v17_1.setConnectTimeout(60000);
        v17_1.setReadTimeout(20000);
        v17_1.setRequestMethod(p22);
        String v12_1 = 0;
        byte[] v4 = 0;
        int v14 = 0;
        if ((p22.equals("POST")) && (p24 != null)) {
            v12_1 = p24.buildRequestBody();
            v4 = v12_1.getBytes("UTF-8");
            if (v4.length < 1400) {
                v14 = 0;
            } else {
                v14 = 1;
            }
            if (!p23.containsKey("Content-Type")) {
                p23.put("Content-Type", "application/json");
            }
        }
        if (v14 != 0) {
            p23.put("Content-Encoding", "gzip");
        }
        String v20_2 = p23.entrySet().iterator();
        while (v20_2.hasNext()) {
            java.util.Map$Entry v8_1 = ((java.util.Map$Entry) v20_2.next());
            v17_1.setRequestProperty(((String) v8_1.getKey()), ((String) v8_1.getValue()));
        }
        if (p24 != null) {
            p24.onBeforeCalling(v16, p23);
        }
        if (v4 != null) {
            if (com.microsoft.appcenter.utils.AppCenterLog.getLogLevel() <= 2) {
                String v12_0 = com.microsoft.appcenter.http.DefaultHttpClient.TOKEN_REGEX_URL_ENCODED.matcher(v12_1).replaceAll("token=***");
                if ("application/json".equals(p23.get("Content-Type"))) {
                    com.microsoft.appcenter.http.HttpException v18_1 = new org.json.JSONObject;
                    v18_1(v12_0);
                    v12_0 = v18_1.toString(2);
                }
                com.microsoft.appcenter.utils.AppCenterLog.verbose("AppCenter", v12_0);
            }
            if (v14 != 0) {
                java.io.ByteArrayOutputStream v6_1 = new java.io.ByteArrayOutputStream(v4.length);
                java.util.zip.GZIPOutputStream v7_1 = new java.util.zip.GZIPOutputStream(v6_1);
                v7_1.write(v4);
                v7_1.close();
                v4 = v6_1.toByteArray();
            }
            v17_1.setDoOutput(1);
            v17_1.setFixedLengthStreamingMode(v4.length);
            java.io.OutputStream v11 = v17_1.getOutputStream();
            v11.write(v4);
            v11.close();
        }
        String v10;
        int v15 = v17_1.getResponseCode();
        String v13 = com.microsoft.appcenter.http.DefaultHttpClient.dump(v17_1);
        String v5 = v17_1.getHeaderField("Content-Type");
        if ((v5 != null) && ((!v5.startsWith("text/")) && (!v5.startsWith("application/")))) {
            v10 = "<binary>";
        } else {
            v10 = com.microsoft.appcenter.http.DefaultHttpClient.TOKEN_REGEX_JSON.matcher(v13).replaceAll("token\":\"***\"");
        }
        com.microsoft.appcenter.utils.AppCenterLog.verbose("AppCenter", new StringBuilder().append("HTTP response status=").append(v15).append(" payload=").append(v10).toString());
        if ((v15 < 200) || (v15 >= 300)) {
            com.microsoft.appcenter.http.HttpException v18_20 = new com.microsoft.appcenter.http.HttpException;
            v18_20(v15, v13);
            throw v18_20;
        } else {
            v17_1.disconnect();
            return v13;
        }
    }

Method com.google.gson.internal.bind.TypeAdapters$21.read() calling method java.net.URL.<init>()


    public java.net.URL read(com.google.gson.stream.JsonReader p5)
    {
        java.net.URL v1_0 = 0;
        if (p5.peek() != com.google.gson.stream.JsonToken.NULL) {
            String v0 = p5.nextString();
            if (!"null".equals(v0)) {
                v1_0 = new java.net.URL(v0);
            }
        } else {
            p5.nextNull();
        }
        return v1_0;
    }

Method android.support.v7.app.MediaRouteControllerDialog$FetchArtTask.openInputStreamByScheme() calling method java.net.URL.<init>()


    private java.io.InputStream openInputStreamByScheme(android.net.Uri p6)
    {
        java.io.InputStream v2;
        String v1 = p6.getScheme().toLowerCase();
        if ((!"android.resource".equals(v1)) && ((!"content".equals(v1)) && (!"file".equals(v1)))) {
            java.net.URLConnection v0 = new java.net.URL(p6.toString()).openConnection();
            v0.setConnectTimeout(android.support.v7.app.MediaRouteControllerDialog.CONNECTION_TIMEOUT_MILLIS);
            v0.setReadTimeout(android.support.v7.app.MediaRouteControllerDialog.CONNECTION_TIMEOUT_MILLIS);
            v2 = v0.getInputStream();
        } else {
            v2 = this.this$0.mContext.getContentResolver().openInputStream(p6);
        }
        java.io.BufferedInputStream v4_11;
        if (v2 != null) {
            v4_11 = new java.io.BufferedInputStream(v2);
        } else {
            v4_11 = 0;
        }
        return v4_11;
    }

Method android.support.v7.app.MediaRouteCastDialog$FetchArtTask.openInputStreamByScheme() calling method java.net.URL.<init>()


    private java.io.InputStream openInputStreamByScheme(android.net.Uri p6)
    {
        java.io.InputStream v2;
        String v1 = p6.getScheme().toLowerCase();
        if ((!"android.resource".equals(v1)) && ((!"content".equals(v1)) && (!"file".equals(v1)))) {
            java.net.URLConnection v0 = new java.net.URL(p6.toString()).openConnection();
            v0.setConnectTimeout(android.support.v7.app.MediaRouteCastDialog.CONNECTION_TIMEOUT_MILLIS);
            v0.setReadTimeout(android.support.v7.app.MediaRouteCastDialog.CONNECTION_TIMEOUT_MILLIS);
            v2 = v0.getInputStream();
        } else {
            v2 = this.this$0.mContext.getContentResolver().openInputStream(p6);
        }
        java.io.BufferedInputStream v4_11;
        if (v2 != null) {
            v4_11 = new java.io.BufferedInputStream(v2);
        } else {
            v4_11 = 0;
        }
        return v4_11;
    }