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.nokia.maps.e.e() calling method java.net.URL.<init>()


    private String e(String p6)
    {
        String v0 = 0;
        try {
            Exception v1_3 = new java.net.URL(p6);
            try {
                v0 = new java.net.URL(v1_3.getProtocol(), v1_3.getHost(), v1_3.getFile().replace("categories", "categories/symbols").replace(".icon", ".svg")).toString();
            } catch (Exception v1_4) {
                v1_4.printStackTrace();
            }
            return v0;
        } catch (Exception v1_1) {
            v1_1.printStackTrace();
            return v0;
        }
    }

Method com.nokia.maps.e.d() calling method java.net.URL.<init>()


    private static declared_synchronized byte[] d(String p4)
    {
        try {
            int v0_1 = com.nokia.maps.e.a(new java.net.URL(p4).openStream());
        } catch (int v0_2) {
            throw v0_2;
        } catch (int v0_5) {
            android.util.Log.d(com.nokia.maps.j.a, v0_5.toString());
            v0_5.printStackTrace();
            v0_1 = 0;
        }
        return v0_1;
    }

Method com.nokia.maps.da.b() calling method java.net.URL.<init>()


    private static com.here.android.mpa.streetlevel.StreetLevelCoverage$ResultCode b(String p8, String p9)
    {
        String v4_0 = 0;
        int v3_4 = com.nokia.maps.da.d.iterator();
        while (v3_4.hasNext()) {
            if (((String) v3_4.next()).equals(p8)) {
                com.here.android.mpa.streetlevel.StreetLevelCoverage$ResultCode v1_1 = com.here.android.mpa.streetlevel.StreetLevelCoverage$ResultCode.HAS_NO_COVERAGE;
            }
            return v1_1;
        }
        try {
            java.net.HttpURLConnection v2_1 = new java.net.URL(p8).openConnection();
            try {
                com.here.android.mpa.streetlevel.StreetLevelCoverage$ResultCode v1_15 = ((java.net.HttpURLConnection) v2_1).getResponseCode();
            } catch (com.here.android.mpa.streetlevel.StreetLevelCoverage$ResultCode v1_6) {
                com.here.android.mpa.streetlevel.StreetLevelCoverage$ResultCode v1_3 = v2_1;
                java.net.HttpURLConnection v2_4 = v1_6;
                if (v1_3 != null) {
                    ((java.net.HttpURLConnection) v1_3).disconnect();
                }
                throw v2_4;
            } catch (com.here.android.mpa.streetlevel.StreetLevelCoverage$ResultCode v1_2) {
                v1_3 = v2_1;
                java.net.HttpURLConnection v2_0 = v1_2;
                try {
                    String v4_5 = new StringBuilder().append("Error while retrieving bitmap from ").append(p8).toString();
                    java.io.InputStream v5_2 = new Object[1];
                    v5_2[0] = v2_0.toString();
                    com.nokia.maps.bp.c(com.nokia.maps.da.a, v4_5, v5_2);
                } catch (java.net.HttpURLConnection v2_4) {
                }
                if (v1_3 != null) {
                    ((java.net.HttpURLConnection) v1_3).disconnect();
                }
                v1_1 = com.here.android.mpa.streetlevel.StreetLevelCoverage$ResultCode.NETWORK_ERROR;
                return v1_1;
            }
            if (v1_15 == 200) {
                try {
                    java.io.InputStream v5_3 = v2_1.getInputStream();
                    try {
                        int v3_2 = new java.io.FileOutputStream(new java.io.File(p9));
                        try {
                            com.here.android.mpa.streetlevel.StreetLevelCoverage$ResultCode v1_20 = new byte[1024];
                        } catch (com.here.android.mpa.streetlevel.StreetLevelCoverage$ResultCode v1_16) {
                            v4_0 = v5_3;
                            if (v3_2 != 0) {
                                v3_2.close();
                            }
                            if (v4_0 != null) {
                                v4_0.close();
                            }
                            throw v1_16;
                        }
                        while(true) {
                            String v4_6 = v5_3.read(v1_20);
                            if (v4_6 <= null) {
                                break;
                            }
                            v3_2.write(v1_20, 0, v4_6);
                        }
                        v3_2.flush();
                        Object[] v6_3 = new Object[0];
                        com.nokia.maps.bp.e(com.nokia.maps.da.a, new StringBuilder().append("Success while retrieving bitmap from :").append(p8).toString(), v6_3);
                        v1_1 = com.here.android.mpa.streetlevel.StreetLevelCoverage$ResultCode.UNKNOWN_COVERAGE;
                        if (v3_2 != 0) {
                            v3_2.close();
                        }
                        if (v5_3 != null) {
                            v5_3.close();
                        }
                        if (v2_1 != null) {
                            ((java.net.HttpURLConnection) v2_1).disconnect();
                        }
                    } catch (com.here.android.mpa.streetlevel.StreetLevelCoverage$ResultCode v1_16) {
                        v3_2 = 0;
                        v4_0 = v5_3;
                    }
                } catch (com.here.android.mpa.streetlevel.StreetLevelCoverage$ResultCode v1_16) {
                    v3_2 = 0;
                }
            } else {
                String v4_17 = new Object[0];
                com.nokia.maps.bp.c(com.nokia.maps.da.a, new StringBuilder().append("Error ").append(v1_15).append(" while retrieving bitmap from ").append(p8).toString(), v4_17);
                com.nokia.maps.da.d.add(p8);
                if (com.nokia.maps.da.d.size() > 128) {
                    com.nokia.maps.da.d.remove(0);
                }
                v1_1 = com.here.android.mpa.streetlevel.StreetLevelCoverage$ResultCode.HAS_NO_COVERAGE;
                if (v2_1 != null) {
                    ((java.net.HttpURLConnection) v2_1).disconnect();
                }
            }
            return v1_1;
        } catch (com.here.android.mpa.streetlevel.StreetLevelCoverage$ResultCode v1_11) {
            v2_4 = v1_11;
            v1_3 = 0;
        } catch (com.here.android.mpa.streetlevel.StreetLevelCoverage$ResultCode v1_4) {
            v2_0 = v1_4;
            v1_3 = 0;
        }
    }

Method com.here.sdk.analytics.internal.d.postString() calling method java.net.URL.<init>()


    public declared_synchronized boolean postString(String p7)
    {
        String v0_0 = 0;
        try {
            String v2_2 = new java.net.URL(this.b);
        } catch (String v0_3) {
            throw v0_3;
        } catch (String v1_2) {
            v1_2.printStackTrace();
            return v0_0;
        }
        if (this.g.compareAndSet(0, 1)) {
            new Thread(new com.here.sdk.analytics.internal.d$1(this, v2_2, p7)).start();
            v0_0 = 1;
            return v0_0;
        } else {
            com.here.sdk.analytics.internal.g.c(com.here.sdk.analytics.internal.d.a, "HTTP request is already pending");
            return v0_0;
        }
    }

Method com.here.network.NetworkProtocol$GetTask.doInBackground() calling method java.net.URL.<init>()


    protected varargs Void doInBackground(com.here.network.NetworkProtocol$Request[] p21)
    {
        int v11 = 0;
        while (v11 < p21.length) {
            try {
                int v10_0;
                com.here.network.NetworkProtocol$Request v18 = p21[v11];
                com.here.network.NetworkProtocol v2_8 = new java.net.URL(v18.url());
            } catch (com.here.network.NetworkProtocol v2_56) {
                int v12 = 0;
                this.cleanup(v12);
                throw v2_56;
            } catch (com.here.network.NetworkProtocol v2_62) {
                int v6_8 = v2_62;
                int v10_1 = 0;
                try {
                    android.util.Log.e("NetworkProtocol", new StringBuilder().append("NetworkProtocol::GetTask::run exception: ").append(v6_8).toString());
                    v6_8.printStackTrace();
                    com.here.network.NetworkProtocol.access$000(this.this$0, p21[v11].clientId(), p21[v11].requestId(), -1, v6_8.toString(), 0, "", "");
                    this.cleanup(v10_1);
                } catch (com.here.network.NetworkProtocol v2_56) {
                    v12 = v10_1;
                }
                v11++;
            }
            if (!v18.hasProxy()) {
                v10_0 = v2_8.openConnection();
            } else {
                if (!v18.noProxy()) {
                    v10_0 = v2_8.openConnection(new java.net.Proxy(java.net.Proxy$Type.HTTP, new java.net.InetSocketAddress(v18.proxyServer(), v18.proxyPort())));
                } else {
                    v10_0 = v2_8.openConnection(java.net.Proxy.NO_PROXY);
                }
            }
            if ((v10_0 instanceof javax.net.ssl.HttpsURLConnection)) {
                com.here.network.NetworkProtocol v2_54 = ((javax.net.ssl.HttpsURLConnection) v10_0);
                int v4_28 = 0;
                if (!v18.certificatePath().isEmpty()) {
                    v4_28 = com.here.network.NetworkSSLContextFactory.getInstance().getSSLContext(v18.certificatePath());
                    if (v4_28 == 0) {
                        android.util.Log.e("NetworkProtocol", new StringBuilder().append("NetworkProtocol::GetTask::run failed to create ssl context, certificate path is set to ? ").append(v18.certificatePath()).toString());
                    }
                }
                if (v4_28 == 0) {
                    if (v18.ignoreCertificate()) {
                        v2_54.setSSLSocketFactory(android.net.SSLCertificateSocketFactory.getInsecure(0, 0));
                        v2_54.setHostnameVerifier(new org.apache.http.conn.ssl.AllowAllHostnameVerifier());
                    }
                } else {
                    v2_54.setSSLSocketFactory(v4_28.getSocketFactory());
                }
            }
            if (!(v10_0 instanceof java.net.HttpURLConnection)) {
                v12 = 0;
            } else {
                v12 = ((java.net.HttpURLConnection) v10_0);
            }
            try {
                if (v12 != 0) {
                    if (v18.verb() != com.here.network.NetworkProtocol$HttpVerb.HEAD) {
                        if (v18.verb() != com.here.network.NetworkProtocol$HttpVerb.PUT) {
                            if (v18.verb() != com.here.network.NetworkProtocol$HttpVerb.DELETE) {
                                if (v18.verb() != com.here.network.NetworkProtocol$HttpVerb.POST) {
                                    v12.setRequestMethod("GET");
                                } else {
                                    v12.setRequestMethod("POST");
                                }
                            } else {
                                v12.setRequestMethod("DELETE");
                            }
                        } else {
                            v12.setRequestMethod("PUT");
                        }
                    } else {
                        v12.setRequestMethod("HEAD");
                    }
                }
                int v4_1 = v18.headers();
                com.here.network.NetworkProtocol v2_9 = 0;
                if (v4_1 != 0) {
                    int v3_3 = 0;
                    while ((v3_3 + 1) < v4_1.length) {
                        v10_0.addRequestProperty(v4_1[v3_3], v4_1[(v3_3 + 1)]);
                        if (v4_1[v3_3].compareToIgnoreCase("If-None-Match") == 0) {
                            v2_9 = 1;
                        }
                        v3_3 += 2;
                    }
                }
                v10_0.setUseCaches(0);
                v10_0.setConnectTimeout((v18.connectTimeout() * 1000));
                v10_0.setReadTimeout((v18.requestTimeout() * 1000));
                if ((v18.verb() != com.here.network.NetworkProtocol$HttpVerb.HEAD) && (v12 != 0)) {
                    if (v18.postData() == null) {
                        v12.setChunkedStreamingMode(8192);
                    } else {
                        v12.setFixedLengthStreamingMode(v18.postData().length);
                    }
                }
                if ((android.os.Build$VERSION.SDK_INT < 21) && ((v18.verb() == com.here.network.NetworkProtocol$HttpVerb.HEAD) || (v2_9 != null))) {
                    v10_0.setRequestProperty("Accept-Encoding", "");
                }
                v10_0.setRequestProperty("Connection", "Close");
                v10_0.setDoInput(1);
                if (v18.postData() == null) {
                    v10_0.setDoOutput(0);
                } else {
                    v10_0.setDoOutput(1);
                    v10_0.getOutputStream().write(v18.postData());
                }
                int v17;
                String v16;
                if (v12 == 0) {
                    v16 = "";
                    v17 = 0;
                } else {
                    v16 = v12.getResponseMessage();
                    v17 = v12.getResponseCode();
                }
                if (!this.isCancelled()) {
                    String v15;
                    com.here.network.NetworkProtocol v2_21 = v10_0.getHeaderField("ETag");
                    if (v2_21 != null) {
                        v15 = v2_21;
                    } else {
                        v15 = "";
                    }
                    String v14;
                    com.here.network.NetworkProtocol v2_24 = v10_0.getHeaderField("Content-Type");
                    if (v2_24 != null) {
                        v14 = v2_24;
                    } else {
                        v14 = "";
                    }
                    int v13;
                    int v6_1 = v10_0.getHeaderFieldDate("Date", 0);
                    int v3_22 = v10_0.getHeaderField("Cache-Control");
                    if (v3_22 == 0) {
                        v13 = 0;
                    } else {
                        int v4_10 = v3_22.indexOf("max-age=");
                        if (v4_10 < 0) {
                        } else {
                            int v3_23;
                            int v4_11 = (v4_10 + 8);
                            com.here.network.NetworkProtocol v5_3 = v3_22.indexOf(44, v4_11);
                            try {
                                if (v5_3 <= v4_11) {
                                    v3_23 = v3_22.substring(v4_11);
                                } else {
                                    v3_23 = v3_22.substring(v4_11, v5_3);
                                }
                                v13 = Integer.parseInt(v3_23);
                            } catch (int v3) {
                                v13 = 0;
                            }
                        }
                    }
                    String v8_0 = 0;
                    com.here.network.NetworkProtocol v2_30 = v10_0.getHeaderField("Content-Range");
                    if (v2_30 != null) {
                        int v3_25 = v2_30.indexOf("bytes ");
                        if (v3_25 >= 0) {
                            com.here.network.NetworkProtocol v2_31;
                            int v3_26 = (v3_25 + 6);
                            int v4_13 = v2_30.indexOf(45, v3_26);
                            try {
                                if (v4_13 <= v3_26) {
                                    v2_31 = v2_30.substring(v3_26);
                                } else {
                                    v2_31 = v2_30.substring(v3_26, v4_13);
                                }
                                v8_0 = Long.parseLong(v2_31);
                            } catch (com.here.network.NetworkProtocol v2_32) {
                                android.util.Log.d("NetworkProtocol", new StringBuilder().append("parseInt: ").append(v2_32).toString());
                            }
                        }
                    }
                    int v3_28 = 0;
                    while (v10_0.getHeaderFieldKey(v3_28) != null) {
                        v3_28++;
                    }
                    int v4_17 = new String[(v3_28 * 2)];
                    com.here.network.NetworkProtocol v2_38 = 0;
                    while (v2_38 < v3_28) {
                        v4_17[(v2_38 * 2)] = v10_0.getHeaderFieldKey(v2_38);
                        v4_17[((v2_38 * 2) + 1)] = v10_0.getHeaderField(v2_38);
                        v2_38++;
                    }
                    if (!this.isCancelled()) {
                        com.here.network.NetworkProtocol.access$100(this.this$0, v18.clientId(), v18.requestId(), v4_17);
                        com.here.network.NetworkProtocol.access$200(this.this$0, v18.clientId(), v18.requestId(), v6_1, v8_0);
                        try {
                            com.here.network.NetworkProtocol v2_42 = new java.io.BufferedInputStream(v10_0.getInputStream());
                        } catch (com.here.network.NetworkProtocol v2_43) {
                            if (v12 == 0) {
                                throw v2_43;
                            } else {
                                v2_42 = new java.io.BufferedInputStream(v12.getErrorStream());
                            }
                        } catch (com.here.network.NetworkProtocol v2_46) {
                            if (v17 != 0) {
                                if (!this.isCancelled()) {
                                    com.here.network.NetworkProtocol.access$000(this.this$0, v18.clientId(), v18.requestId(), v17, v16, v13, v15, v14);
                                } else {
                                    com.here.network.NetworkProtocol.access$000(this.this$0, v18.clientId(), v18.requestId(), -5, "Cancelled", 0, "", "");
                                }
                                this.cleanup(v12);
                            } else {
                                throw v2_46;
                            }
                        }
                        int v3_34 = new byte[8192];
                        while (!this.isCancelled()) {
                            int v4_21 = v2_42.read(v3_34);
                            if (v4_21 < 0) {
                                break;
                            }
                            com.here.network.NetworkProtocol.access$300(this.this$0, v18.clientId(), v18.requestId(), v3_34, v4_21);
                        }
                    } else {
                        this.cleanup(v12);
                        com.here.network.NetworkProtocol.access$000(this.this$0, v18.clientId(), v18.requestId(), -5, "Cancelled", 0, "", "");
                        this.cleanup(v12);
                    }
                } else {
                    this.cleanup(v12);
                    com.here.network.NetworkProtocol.access$000(this.this$0, v18.clientId(), v18.requestId(), -5, "Cancelled", 0, "", "");
                    this.cleanup(v12);
                }
            } catch (com.here.network.NetworkProtocol v2_56) {
            }
        }
        return 0;
    }

Method com.nokia.maps.cv.a() calling method java.net.URL.<init>()


    private void a(com.nokia.maps.cw p8, String p9, java.util.HashMap p10, String p11, String p12)
    {
        String v1_3 = 0;
        try {
            String v0_8 = ((java.net.HttpURLConnection) new java.net.URL(p9).openConnection());
            try {
                v0_8.setRequestMethod("POST");
                v0_8.setDoOutput(1);
                this.a(v0_8, p10);
                v0_8.setRequestProperty(ark>com.nokia.maps.cvark>.f, p12);
                this.b();
                this.b(v0_8);
            } catch (String v1_5) {
                v1_3 = v0_8;
                String v0_1 = v1_5;
                if (v1_3 != null) {
                    try {
                        v1_3.disconnect();
                    } catch (String v1_6) {
                        Object[] v4_1 = new Object[1];
                        v4_1[0] = v1_6.getLocalizedMessage();
                        com.nokia.maps.bp.c(ark>com.nokia.maps.cvark>.a, "error disconnecting: %s", v4_1);
                    }
                }
                throw v0_1;
            }
            if (!this.isCancelled()) {
                if (p11 == null) {
                    v0_8.connect();
                } else {
                    String v1_4 = v0_8.getOutputStream();
                    v1_4.write(p11.getBytes(java.nio.charset.Charset.forName("UTF-8")));
                    v1_4.close();
                }
                this.b(v0_8);
                this.a(v0_8, p8);
                if (v0_8 != null) {
                    try {
                        v0_8.disconnect();
                    } catch (String v0_3) {
                        Object[] v3_1 = new Object[1];
                        v3_1[0] = v0_3.getLocalizedMessage();
                        com.nokia.maps.bp.c(ark>com.nokia.maps.cvark>.a, "error disconnecting: %s", v3_1);
                    }
                }
            } else {
                p8.a = com.nokia.maps.cx.c;
                v0_8.disconnect();
                if (v0_8 != null) {
                    try {
                        v0_8.disconnect();
                    } catch (String v0_6) {
                        Object[] v3_2 = new Object[1];
                        v3_2[0] = v0_6.getLocalizedMessage();
                        com.nokia.maps.bp.c(ark>com.nokia.maps.cvark>.a, "error disconnecting: %s", v3_2);
                    }
                }
            }
            return;
        } catch (String v0_1) {
        }
    }

Method com.nokia.maps.cv.a() calling method java.net.URL.<init>()


    private void a(com.nokia.maps.cw p8, String p9, java.util.HashMap p10)
    {
        String v1_1 = 0;
        try {
            String v0_8 = ((java.net.HttpURLConnection) new java.net.URL(p9).openConnection());
            try {
                v0_8.setRequestMethod("GET");
                this.a(v0_8, p10);
                this.b();
                this.b(v0_8);
            } catch (String v1_2) {
                v1_1 = v0_8;
                String v0_0 = v1_2;
                if (v1_1 != null) {
                    try {
                        v1_1.disconnect();
                    } catch (String v1_3) {
                        Object[] v4_1 = new Object[1];
                        v4_1[0] = v1_3.getLocalizedMessage();
                        com.nokia.maps.bp.c(ark>com.nokia.maps.cvark>.a, "error disconnecting: %s", v4_1);
                    }
                }
                throw v0_0;
            }
            if (!this.isCancelled()) {
                v0_8.connect();
                this.b(v0_8);
                this.a(v0_8, p8);
                if (v0_8 != null) {
                    try {
                        v0_8.disconnect();
                    } catch (String v0_2) {
                        Object[] v3_1 = new Object[1];
                        v3_1[0] = v0_2.getLocalizedMessage();
                        com.nokia.maps.bp.c(ark>com.nokia.maps.cvark>.a, "error disconnecting: %s", v3_1);
                    }
                }
            } else {
                p8.a = com.nokia.maps.cx.c;
                v0_8.disconnect();
                if (v0_8 != null) {
                    try {
                        v0_8.disconnect();
                    } catch (String v0_5) {
                        Object[] v3_2 = new Object[1];
                        v3_2[0] = v0_5.getLocalizedMessage();
                        com.nokia.maps.bp.c(ark>com.nokia.maps.cvark>.a, "error disconnecting: %s", v3_2);
                    }
                }
            }
            return;
        } catch (String v0_0) {
        }
    }

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;
    }