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.google.android.gms.ads.internal.gmsg.HttpClient.zzc() calling method java.net.URL.<init>()


    private static com.google.android.gms.ads.internal.gmsg.HttpClient$zzb zzc(org.json.JSONObject p9)
    {
        String v3 = p9.optString("http_request_id");
        int v2_2 = p9.optString("url");
        String v4 = p9.optString("post_body", 0);
        try {
            int v0_2 = new java.net.URL(v2_2);
        } catch (int v0_3) {
            com.google.android.gms.internal.ads.zzakb.zzb("Error constructing http request.", v0_3);
            v0_2 = 0;
        }
        java.util.ArrayList v5_1 = new java.util.ArrayList();
        com.google.android.gms.ads.internal.gmsg.HttpClient$zzb v1_2 = p9.optJSONArray("headers");
        if (v1_2 == null) {
            v1_2 = new org.json.JSONArray();
        }
        int v2_1 = 0;
        while (v2_1 < v1_2.length()) {
            String v6_1 = v1_2.optJSONObject(v2_1);
            if (v6_1 != null) {
                v5_1.add(new com.google.android.gms.ads.internal.gmsg.HttpClient$zza(v6_1.optString("key"), v6_1.optString("value")));
            }
            v2_1++;
        }
        return new com.google.android.gms.ads.internal.gmsg.HttpClient$zzb(v3, v0_2, v5_1, v4);
    }

Method com.google.android.gms.internal.ads.zzanf.zzcz() calling method java.net.URL.<init>()


    public final void zzcz(String p5)
    {
        try {
            java.net.HttpURLConnection v0_14;
            java.net.HttpURLConnection v0_10 = String.valueOf(p5);
        } catch (java.net.HttpURLConnection v0_3) {
            java.net.HttpURLConnection v0_4 = v0_3.getMessage();
            com.google.android.gms.internal.ads.zzane.zzdk(new StringBuilder(((String.valueOf(p5).length() + 32) + String.valueOf(v0_4).length())).append("Error while parsing ping URL: ").append(p5).append(". ").append(v0_4).toString());
            return;
        } catch (java.net.HttpURLConnection v0_17) {
            java.net.HttpURLConnection v0_18 = v0_17.getMessage();
            com.google.android.gms.internal.ads.zzane.zzdk(new StringBuilder(((String.valueOf(p5).length() + 27) + String.valueOf(v0_18).length())).append("Error while pinging URL: ").append(p5).append(". ").append(v0_18).toString());
            return;
        } catch (java.net.HttpURLConnection v0_11) {
            java.net.HttpURLConnection v0_12 = v0_11.getMessage();
            com.google.android.gms.internal.ads.zzane.zzdk(new StringBuilder(((String.valueOf(p5).length() + 27) + String.valueOf(v0_12).length())).append("Error while pinging URL: ").append(p5).append(". ").append(v0_12).toString());
            return;
        }
        if (v0_10.length() == 0) {
            v0_14 = new String("Pinging URL: ");
        } else {
            v0_14 = "Pinging URL: ".concat(v0_10);
        }
        com.google.android.gms.internal.ads.zzane.zzck(v0_14);
        java.net.HttpURLConnection v0_9 = ((java.net.HttpURLConnection) new java.net.URL(p5).openConnection());
        try {
            com.google.android.gms.internal.ads.zzkb.zzif();
            com.google.android.gms.internal.ads.zzamu.zza(1, v0_9, this.zzcpq);
            String v1_14 = new com.google.android.gms.internal.ads.zzamy();
            v1_14.zza(v0_9, 0);
            String v2_8 = v0_9.getResponseCode();
            v1_14.zza(v0_9, v2_8);
        } catch (String v1_26) {
            v0_9.disconnect();
            throw v1_26;
        }
        if ((v2_8 < 200) || (v2_8 >= 300)) {
            com.google.android.gms.internal.ads.zzane.zzdk(new StringBuilder((String.valueOf(p5).length() + 65)).append("Received non-success response code ").append(v2_8).append(" from pinging URL: ").append(p5).toString());
        }
        v0_9.disconnect();
        return;
    }

Method com.google.android.gms.ads.identifier.zza.run() calling method java.net.URL.<init>()


    public final void run()
    {
        new com.google.android.gms.ads.identifier.zzc();
        String v2_4 = this.zzl;
        String v3_4 = android.net.Uri.parse("https://pagead2.googlesyndication.com/pagead/gen_204?id=gmob-apps").buildUpon();
        String v4_3 = v2_4.keySet().iterator();
        while (v4_3.hasNext()) {
            RuntimeException v0_2 = ((String) v4_3.next());
            v3_4.appendQueryParameter(v0_2, ((String) v2_4.get(v0_2)));
        }
        String v2_3 = v3_4.build().toString();
        try {
            RuntimeException v0_8 = ((java.net.HttpURLConnection) new java.net.URL(v2_3).openConnection());
        } catch (RuntimeException v0_12) {
            String v3_5 = v0_12.getMessage();
            v2_3 = new StringBuilder(((String.valueOf(v2_3).length() + 32) + String.valueOf(v3_5).length())).append("Error while parsing ping URL: ").append(v2_3).append(". ").append(v3_5).toString();
            android.util.Log.w("HttpUrlPinger", v2_3, v0_12);
            return;
        } catch (RuntimeException v0_11) {
            String v3_3 = v0_11.getMessage();
            v2_3 = new StringBuilder(((String.valueOf(v2_3).length() + 27) + String.valueOf(v3_3).length())).append("Error while pinging URL: ").append(v2_3).append(". ").append(v3_3).toString();
            android.util.Log.w("HttpUrlPinger", v2_3, v0_11);
            return;
        } catch (RuntimeException v0_11) {
        }
        String v1_2 = v0_8.getResponseCode();
        if ((v1_2 < 200) || (v1_2 >= 300)) {
            android.util.Log.w("HttpUrlPinger", new StringBuilder((String.valueOf(v2_3).length() + 65)).append("Received non-success response code ").append(v1_2).append(" from pinging URL: ").append(v2_3).toString());
        }
        v0_8.disconnect();
        return;
    }

Method com.bumptech.glide.load.model.GlideUrl.getSafeUrl() calling method java.net.URL.<init>()


    private java.net.URL getSafeUrl()
    {
        if (this.safeUrl == null) {
            this.safeUrl = new java.net.URL(this.getSafeStringUrl());
        }
        return this.safeUrl;
    }

Method com.bumptech.glide.load.data.HttpUrlFetcher.loadDataWithRedirects() calling method java.net.URL.<init>()


    private java.io.InputStream loadDataWithRedirects(java.net.URL p10, int p11, java.net.URL p12, java.util.Map p13)
    {
        if (p11 < 5) {
            try {
                if ((p12 != null) && (p10.toURI().equals(p12.toURI()))) {
                    throw new com.bumptech.glide.load.HttpException("In re-direct loop");
                }
            } catch (com.bumptech.glide.load.HttpException v4) {
            }
            this.urlConnection = this.connectionFactory.build(p10);
            java.util.Iterator v6 = p13.entrySet().iterator();
            while (v6.hasNext()) {
                java.util.Map$Entry v0_1 = ((java.util.Map$Entry) v6.next());
                this.urlConnection.addRequestProperty(((String) v0_1.getKey()), ((String) v0_1.getValue()));
            }
            com.bumptech.glide.load.HttpException v4_30;
            this.urlConnection.setConnectTimeout(this.timeout);
            this.urlConnection.setReadTimeout(this.timeout);
            this.urlConnection.setUseCaches(0);
            this.urlConnection.setDoInput(1);
            this.urlConnection.setInstanceFollowRedirects(0);
            this.urlConnection.connect();
            this.stream = this.urlConnection.getInputStream();
            if (!this.isCancelled) {
                int v3 = this.urlConnection.getResponseCode();
                if (!com.bumptech.glide.load.data.HttpUrlFetcher.isHttpOk(v3)) {
                    if (!com.bumptech.glide.load.data.HttpUrlFetcher.isHttpRedirect(v3)) {
                        if (v3 != -1) {
                            throw new com.bumptech.glide.load.HttpException(this.urlConnection.getResponseMessage(), v3);
                        } else {
                            throw new com.bumptech.glide.load.HttpException(v3);
                        }
                    } else {
                        String v2 = this.urlConnection.getHeaderField("Location");
                        if (!android.text.TextUtils.isEmpty(v2)) {
                            java.net.URL v1_1 = new java.net.URL(p10, v2);
                            this.cleanup();
                            v4_30 = this.loadDataWithRedirects(v1_1, (p11 + 1), p10, p13);
                        } else {
                            throw new com.bumptech.glide.load.HttpException("Received empty or null redirect url");
                        }
                    }
                } else {
                    v4_30 = this.getStreamForSuccessfulRequest(this.urlConnection);
                }
            } else {
                v4_30 = 0;
            }
            return v4_30;
        } else {
            throw new com.bumptech.glide.load.HttpException("Too many (> 5) redirects!");
        }
    }

Method com.google.android.gms.internal.ads.zzasj.zze() calling method java.net.URL.<init>()


    private final android.webkit.WebResourceResponse zze(com.google.android.gms.internal.ads.zzasu p10)
    {
        int v6_0 = new java.net.URL(p10.url);
        int v0_21 = 0;
        while(true) {
            int v5 = (v0_21 + 1);
            if (v5 > 20) {
                break;
            }
            int v2_2 = v6_0.openConnection();
            v2_2.setConnectTimeout(10000);
            v2_2.setReadTimeout(10000);
            int v7_0 = p10.zzab.entrySet().iterator();
            while (v7_0.hasNext()) {
                int v0_9 = ((java.util.Map$Entry) v7_0.next());
                v2_2.addRequestProperty(((String) v0_9.getKey()), ((String) v0_9.getValue()));
            }
            if ((v2_2 instanceof java.net.HttpURLConnection)) {
                int v0_1;
                int v0_19 = ((java.net.HttpURLConnection) v2_2);
                com.google.android.gms.ads.internal.zzbv.zzek().zza(this.zzbnd.getContext(), this.zzbnd.zztq().zzcw, 0, v0_19);
                String v1_11 = new com.google.android.gms.internal.ads.zzamy();
                v1_11.zza(v0_19, 0);
                int v2_5 = v0_19.getResponseCode();
                v1_11.zza(v0_19, v2_5);
                if ((v2_5 < 300) || (v2_5 >= 400)) {
                    com.google.android.gms.ads.internal.zzbv.zzek();
                    v0_1 = com.google.android.gms.internal.ads.zzakk.zzb(v0_19);
                } else {
                    String v1_15 = v0_19.getHeaderField("Location");
                    if (v1_15 != null) {
                        int v2_7 = new java.net.URL(v6_0, v1_15);
                        int v6_1 = v2_7.getProtocol();
                        if (v6_1 != 0) {
                            if ((v6_1.equals("http")) || (v6_1.equals("https"))) {
                                String v1_18;
                                String v1_16 = String.valueOf(v1_15);
                                if (v1_16.length() == 0) {
                                    v1_18 = new String("Redirecting to ");
                                } else {
                                    v1_18 = "Redirecting to ".concat(v1_16);
                                }
                                com.google.android.gms.internal.ads.zzakb.zzck(v1_18);
                                v0_19.disconnect();
                                v0_21 = v5;
                                v6_0 = v2_7;
                            } else {
                                int v0_0;
                                int v0_23 = String.valueOf(v6_1);
                                if (v0_23.length() == 0) {
                                    v0_0 = new String("Unsupported scheme: ");
                                } else {
                                    v0_0 = "Unsupported scheme: ".concat(v0_23);
                                }
                                com.google.android.gms.internal.ads.zzakb.zzdk(v0_0);
                                v0_1 = 0;
                            }
                        } else {
                            com.google.android.gms.internal.ads.zzakb.zzdk("Protocol is null");
                            v0_1 = 0;
                        }
                    } else {
                        throw new java.io.IOException("Missing Location header in redirect");
                    }
                }
                return v0_1;
            } else {
                throw new java.io.IOException("Invalid protocol.");
            }
        }
        throw new java.io.IOException(new StringBuilder(32).append("Too many redirects (20)").toString());
    }

Method com.google.android.gms.internal.ads.zzas.zza() calling method java.net.URL.<init>()


    public final com.google.android.gms.internal.ads.zzaq zza(com.google.android.gms.internal.ads.zzr p8, java.util.Map p9)
    {
        com.google.android.gms.internal.ads.zzaq v0_6;
        java.util.List v1_7 = p8.getUrl();
        int v5_1 = new java.util.HashMap();
        v5_1.putAll(p8.getHeaders());
        v5_1.putAll(p9);
        if (this.zzci == null) {
            v0_6 = v1_7;
        } else {
            v0_6 = this.zzci.zzg(v1_7);
            if (v0_6 == null) {
                com.google.android.gms.internal.ads.zzaq v0_9;
                com.google.android.gms.internal.ads.zzaq v0_7 = String.valueOf(v1_7);
                if (v0_7.length() == 0) {
                    v0_9 = new String("URL blocked by rewriter: ");
                } else {
                    v0_9 = "URL blocked by rewriter: ".concat(v0_7);
                }
                throw new java.io.IOException(v0_9);
            }
        }
        java.util.List v1_6 = new java.net.URL(v0_6);
        com.google.android.gms.internal.ads.zzaq v0_12 = ((java.net.HttpURLConnection) v1_6.openConnection());
        v0_12.setInstanceFollowRedirects(java.net.HttpURLConnection.getFollowRedirects());
        int v2_5 = p8.zzi();
        v0_12.setConnectTimeout(v2_5);
        v0_12.setReadTimeout(v2_5);
        v0_12.setUseCaches(0);
        v0_12.setDoInput(1);
        "https".equals(v1_6.getProtocol());
        java.util.Iterator v6 = v5_1.keySet().iterator();
        while (v6.hasNext()) {
            java.util.List v1_3 = ((String) v6.next());
            v0_12.addRequestProperty(v1_3, ((String) v5_1.get(v1_3)));
        }
        switch (p8.getMethod()) {
            case -1:
                break;
            case 0:
                v0_12.setRequestMethod("GET");
                break;
            case 1:
                v0_12.setRequestMethod("POST");
                com.google.android.gms.internal.ads.zzas.zza(v0_12, p8);
                break;
            case 2:
                v0_12.setRequestMethod("PUT");
                com.google.android.gms.internal.ads.zzas.zza(v0_12, p8);
                break;
            case 3:
                v0_12.setRequestMethod("DELETE");
                break;
            case 4:
                v0_12.setRequestMethod("HEAD");
                break;
            case 5:
                v0_12.setRequestMethod("OPTIONS");
                break;
            case 6:
                v0_12.setRequestMethod("TRACE");
                break;
            case 7:
                v0_12.setRequestMethod("PATCH");
                com.google.android.gms.internal.ads.zzas.zza(v0_12, p8);
                break;
            default:
                throw new IllegalStateException("Unknown method type.");
        }
        int v2_7 = v0_12.getResponseCode();
        if (v2_7 != -1) {
            if (((p8.getMethod() == 4) || ((100 <= v2_7) && (v2_7 < 200))) || ((v2_7 == 204) || (v2_7 == 304))) {
                java.util.List v1_26 = 0;
            } else {
                v1_26 = 1;
            }
            com.google.android.gms.internal.ads.zzaq v0_1;
            if (v1_26 != null) {
                v0_1 = new com.google.android.gms.internal.ads.zzaq(v2_7, com.google.android.gms.internal.ads.zzas.zza(v0_12.getHeaderFields()), v0_12.getContentLength(), com.google.android.gms.internal.ads.zzas.zza(v0_12));
            } else {
                v0_1 = new com.google.android.gms.internal.ads.zzaq(v2_7, com.google.android.gms.internal.ads.zzas.zza(v0_12.getHeaderFields()));
            }
            return v0_1;
        } else {
            throw new java.io.IOException("Could not retrieve response code from HttpUrlConnection.");
        }
    }

Method com.google.android.gms.internal.ads.zzaqx.zze() calling method java.net.URL.<init>()


    private final android.webkit.WebResourceResponse zze(String p10, java.util.Map p11)
    {
        int v6_0 = new java.net.URL(p10);
        int v0_19 = 0;
        while(true) {
            int v5 = (v0_19 + 1);
            if (v5 > 20) {
                break;
            }
            int v2_2 = v6_0.openConnection();
            v2_2.setConnectTimeout(10000);
            v2_2.setReadTimeout(10000);
            int v7_0 = p11.entrySet().iterator();
            while (v7_0.hasNext()) {
                int v0_8 = ((java.util.Map$Entry) v7_0.next());
                v2_2.addRequestProperty(((String) v0_8.getKey()), ((String) v0_8.getValue()));
            }
            if ((v2_2 instanceof java.net.HttpURLConnection)) {
                int v0_1;
                int v0_17 = ((java.net.HttpURLConnection) v2_2);
                com.google.android.gms.ads.internal.zzbv.zzek().zza(this.zzbnd.getContext(), this.zzbnd.zztq().zzcw, 0, v0_17);
                String v1_10 = new com.google.android.gms.internal.ads.zzamy();
                v1_10.zza(v0_17, 0);
                int v2_5 = v0_17.getResponseCode();
                v1_10.zza(v0_17, v2_5);
                if ((v2_5 < 300) || (v2_5 >= 400)) {
                    com.google.android.gms.ads.internal.zzbv.zzek();
                    v0_1 = com.google.android.gms.internal.ads.zzakk.zzb(v0_17);
                } else {
                    String v1_14 = v0_17.getHeaderField("Location");
                    if (v1_14 != null) {
                        int v2_7 = new java.net.URL(v6_0, v1_14);
                        int v6_1 = v2_7.getProtocol();
                        if (v6_1 != 0) {
                            if ((v6_1.equals("http")) || (v6_1.equals("https"))) {
                                String v1_17;
                                String v1_15 = String.valueOf(v1_14);
                                if (v1_15.length() == 0) {
                                    v1_17 = new String("Redirecting to ");
                                } else {
                                    v1_17 = "Redirecting to ".concat(v1_15);
                                }
                                com.google.android.gms.internal.ads.zzakb.zzck(v1_17);
                                v0_17.disconnect();
                                v0_19 = v5;
                                v6_0 = v2_7;
                            } else {
                                int v0_23;
                                int v0_21 = String.valueOf(v6_1);
                                if (v0_21.length() == 0) {
                                    v0_23 = new String("Unsupported scheme: ");
                                } else {
                                    v0_23 = "Unsupported scheme: ".concat(v0_21);
                                }
                                com.google.android.gms.internal.ads.zzakb.zzdk(v0_23);
                                v0_1 = 0;
                            }
                        } else {
                            com.google.android.gms.internal.ads.zzakb.zzdk("Protocol is null");
                            v0_1 = 0;
                        }
                    } else {
                        throw new java.io.IOException("Missing Location header in redirect");
                    }
                }
                return v0_1;
            } else {
                throw new java.io.IOException("Invalid protocol.");
            }
        }
        throw new java.io.IOException(new StringBuilder(32).append("Too many redirects (20)").toString());
    }

Method com.google.android.gms.internal.ads.zzaqn.zzdp() calling method java.net.URL.<init>()


    public final boolean zzdp(String p28)
    {
        com.google.android.gms.internal.ads.zzaqi v2_28;
        if (this.zzdbi != null) {
            while(true) {
                com.google.android.gms.internal.ads.zzaqn v3_17;
                if (this.zzdbi != null) {
                    String v4_0 = this.zzdbi.listFiles();
                    com.google.android.gms.internal.ads.zzaqi v2_4 = 0;
                    com.google.android.gms.internal.ads.zzaqn v3_8 = 0;
                    while (v3_8 < v4_0.length) {
                        if (!v4_0[v3_8].getName().endsWith(".done")) {
                            v2_4++;
                        }
                        v3_8++;
                    }
                    v3_17 = v2_4;
                } else {
                    v3_17 = 0;
                }
                if (v3_17 <= ((Integer) com.google.android.gms.internal.ads.zzkb.zzik().zzd(com.google.android.gms.internal.ads.zznk.zzaux)).intValue()) {
                    break;
                }
                com.google.android.gms.internal.ads.zzaqi v2_123;
                if (this.zzdbi != null) {
                    String v7_10 = 0;
                    String v4_23 = nan;
                    String v9_0 = this.zzdbi.listFiles();
                    int v10_0 = v9_0.length;
                    int v8_9 = 0;
                    while (v8_9 < v10_0) {
                        com.google.android.gms.internal.ads.zzaqi v2_126;
                        String v4_25;
                        int v6_28 = v9_0[v8_9];
                        if (v6_28.getName().endsWith(".done")) {
                            v2_126 = v4_23;
                            v4_25 = v7_10;
                        } else {
                            v2_126 = v6_28.lastModified();
                            if (v2_126 >= v4_23) {
                            } else {
                                v4_25 = v6_28;
                            }
                        }
                        v8_9++;
                        v7_10 = v4_25;
                        v4_23 = v2_126;
                    }
                    v2_123 = 0;
                    if (v7_10 != null) {
                        v2_123 = v7_10.delete();
                        com.google.android.gms.internal.ads.zzaqn v3_66 = this.zzc(v7_10);
                        if (v3_66.isFile()) {
                            v2_123 &= v3_66.delete();
                        }
                    }
                } else {
                    v2_123 = 0;
                }
                if (v2_123 == null) {
                    com.google.android.gms.internal.ads.zzakb.zzdk("Unable to expire stream cache");
                    this.zza(p28, 0, "expireFailed", 0);
                    v2_28 = 0;
                }
            }
            com.google.android.gms.internal.ads.zzkb.zzif();
            java.io.File v13_1 = new java.io.File(this.zzdbi, com.google.android.gms.internal.ads.zzamu.zzde(p28));
            java.io.File v14 = this.zzc(v13_1);
            if ((!v13_1.isFile()) || (!v14.isFile())) {
                String v9_1;
                com.google.android.gms.internal.ads.zzaqn v3_63 = String.valueOf(this.zzdbi.getAbsolutePath());
                com.google.android.gms.internal.ads.zzaqi v2_107 = String.valueOf(p28);
                if (v2_107.length() == 0) {
                    v9_1 = new String(v3_63);
                } else {
                    v9_1 = v3_63.concat(v2_107);
                }
                try {
                    if (!com.google.android.gms.internal.ads.zzaqn.zzdbg.contains(v9_1)) {
                        com.google.android.gms.internal.ads.zzaqn.zzdbg.add(v9_1);
                        String v5_5 = 0;
                        try {
                            com.google.android.gms.ads.internal.zzbv.zzew();
                            String v7_11 = ((Integer) com.google.android.gms.internal.ads.zzkb.zzik().zzd(com.google.android.gms.internal.ads.zznk.zzavc)).intValue();
                            com.google.android.gms.internal.ads.zzaqn v3_58 = new java.net.URL(p28);
                            com.google.android.gms.internal.ads.zzaqi v2_78 = 0;
                        } catch (com.google.android.gms.internal.ads.zzaqi v2_46) {
                            com.google.android.gms.internal.ads.zzaqn v3_37 = 0;
                            String v4_11 = "error";
                            if ((v2_46 instanceof RuntimeException)) {
                                com.google.android.gms.ads.internal.zzbv.zzeo().zza(v2_46, "VideoStreamFullFileCache.preload");
                            }
                            try {
                                v5_5.close();
                            } catch (String v5) {
                            } catch (String v5) {
                            }
                            if (!this.zzdbj) {
                                com.google.android.gms.internal.ads.zzakb.zzc(new StringBuilder((String.valueOf(p28).length() + 25)).append("Preload failed for URL \"").append(p28).append("\"").toString(), v2_46);
                            } else {
                                com.google.android.gms.internal.ads.zzakb.zzdj(new StringBuilder((String.valueOf(p28).length() + 26)).append("Preload aborted for URL \"").append(p28).append("\"").toString());
                            }
                            if (v13_1.exists()) {
                                if (!v13_1.delete()) {
                                    com.google.android.gms.internal.ads.zzaqi v2_102 = String.valueOf(v13_1.getAbsolutePath());
                                    if (v2_102.length() == 0) {
                                        com.google.android.gms.internal.ads.zzaqi v2_104 = new String("Could not delete partial cache file at ");
                                    } else {
                                        v2_104 = "Could not delete partial cache file at ".concat(v2_102);
                                    }
                                    com.google.android.gms.internal.ads.zzakb.zzdk(v2_104);
                                }
                            }
                            this.zza(p28, v13_1.getAbsolutePath(), v4_11, v3_37);
                            com.google.android.gms.internal.ads.zzaqn.zzdbg.remove(v9_1);
                            v2_28 = 0;
                        }
                        while(true) {
                            String v4_28 = (v2_78 + 1);
                            if (v4_28 > 20) {
                                throw new java.io.IOException("Too many redirects (20)");
                            } else {
                                com.google.android.gms.internal.ads.zzaqi v2_1 = v3_58.openConnection();
                                v2_1.setConnectTimeout(v7_11);
                                v2_1.setReadTimeout(v7_11);
                                if ((v2_1 instanceof java.net.HttpURLConnection)) {
                                    com.google.android.gms.internal.ads.zzaqi v2_2 = ((java.net.HttpURLConnection) v2_1);
                                    int v6_2 = new com.google.android.gms.internal.ads.zzamy();
                                    v6_2.zza(v2_2, 0);
                                    v2_2.setInstanceFollowRedirects(0);
                                    int v8_2 = v2_2.getResponseCode();
                                    v6_2.zza(v2_2, v8_2);
                                    if ((v8_2 / 100) != 3) {
                                        if ((v2_2 instanceof java.net.HttpURLConnection)) {
                                            int v6_4 = ((java.net.HttpURLConnection) v2_2).getResponseCode();
                                            if (v6_4 >= 400) {
                                                v4_11 = "badUrl";
                                                try {
                                                    com.google.android.gms.internal.ads.zzaqn v3_52 = String.valueOf(Integer.toString(v6_4));
                                                } catch (com.google.android.gms.internal.ads.zzaqi v2_46) {
                                                    v3_37 = 0;
                                                } catch (com.google.android.gms.internal.ads.zzaqi v2_46) {
                                                    v3_37 = 0;
                                                }
                                                if (v3_52.length() == 0) {
                                                    v3_37 = new String("HTTP request failed. Code: ");
                                                } else {
                                                    v3_37 = "HTTP request failed. Code: ".concat(v3_52);
                                                }
                                                try {
                                                    throw new java.io.IOException(new StringBuilder((String.valueOf(p28).length() + 32)).append("HTTP status code ").append(v6_4).append(" at ").append(p28).toString());
                                                } catch (com.google.android.gms.internal.ads.zzaqi v2_46) {
                                                } catch (com.google.android.gms.internal.ads.zzaqi v2_46) {
                                                }
                                            }
                                        }
                                        String v7_0 = v2_2.getContentLength();
                                        if (v7_0 >= null) {
                                            String v4_1 = com.google.android.gms.internal.ads.zzaqn.zzdbh.format(((long) v7_0));
                                            int v15 = ((Integer) com.google.android.gms.internal.ads.zzkb.zzik().zzd(com.google.android.gms.internal.ads.zznk.zzauy)).intValue();
                                            if (v7_0 <= v15) {
                                                com.google.android.gms.internal.ads.zzakb.zzck(new StringBuilder(((String.valueOf(v4_1).length() + 20) + String.valueOf(p28).length())).append("Caching ").append(v4_1).append(" bytes from ").append(p28).toString());
                                                java.nio.channels.ReadableByteChannel v16_1 = java.nio.channels.Channels.newChannel(v2_2.getInputStream());
                                                java.io.FileOutputStream v12_1 = new java.io.FileOutputStream(v13_1);
                                                try {
                                                    java.nio.channels.FileChannel v17 = v12_1.getChannel();
                                                    java.nio.ByteBuffer v18 = java.nio.ByteBuffer.allocate(1048576);
                                                    com.google.android.gms.common.util.Clock v19 = com.google.android.gms.ads.internal.zzbv.zzer();
                                                    int v6_11 = 0;
                                                    long v20 = v19.currentTimeMillis();
                                                    com.google.android.gms.internal.ads.zzamj v22 = new com.google.android.gms.internal.ads.zzamj;
                                                    v22(((Long) com.google.android.gms.internal.ads.zzkb.zzik().zzd(com.google.android.gms.internal.ads.zznk.zzavb)).longValue());
                                                    long v24 = ((Long) com.google.android.gms.internal.ads.zzkb.zzik().zzd(com.google.android.gms.internal.ads.zznk.zzava)).longValue();
                                                } catch (com.google.android.gms.internal.ads.zzaqi v2_46) {
                                                    v3_37 = 0;
                                                    v4_11 = "error";
                                                    v5_5 = v12_1;
                                                }
                                                while(true) {
                                                    com.google.android.gms.internal.ads.zzaqi v2_14 = v16_1.read(v18);
                                                    if (v2_14 < null) {
                                                        break;
                                                    }
                                                    v6_11 += v2_14;
                                                    try {
                                                        if (v6_11 <= v15) {
                                                            v18.flip();
                                                            while (v17.write(v18) > 0) {
                                                            }
                                                            v18.clear();
                                                            if ((v19.currentTimeMillis() - v20) <= (1000 * v24)) {
                                                                if (!this.zzdbj) {
                                                                    if (v22.tryAcquire()) {
                                                                        com.google.android.gms.internal.ads.zzamu.zzsy.post(new com.google.android.gms.internal.ads.zzaqi(this, p28, v13_1.getAbsolutePath(), v6_11, v7_0, 0));
                                                                    }
                                                                } else {
                                                                    v4_11 = "externalAbort";
                                                                    throw new java.io.IOException("abort requested");
                                                                }
                                                            } else {
                                                                v4_11 = "downloadTimeout";
                                                                com.google.android.gms.internal.ads.zzaqi v2_41 = Long.toString(v24);
                                                                v3_37 = new StringBuilder((String.valueOf(v2_41).length() + 29)).append("Timeout exceeded. Limit: ").append(v2_41).append(" sec").toString();
                                                                throw new java.io.IOException("stream cache time limit exceeded");
                                                            }
                                                        } else {
                                                            v4_11 = "sizeExceeded";
                                                            com.google.android.gms.internal.ads.zzaqn v3_39 = String.valueOf(Integer.toString(v6_11));
                                                            if (v3_39.length() == 0) {
                                                                v3_37 = new String("File too big for full file cache. Size: ");
                                                            } else {
                                                                v3_37 = "File too big for full file cache. Size: ".concat(v3_39);
                                                            }
                                                            throw new java.io.IOException("stream cache file size limit exceeded");
                                                        }
                                                    } catch (com.google.android.gms.internal.ads.zzaqi v2_46) {
                                                        v3_37 = 0;
                                                        v5_5 = v12_1;
                                                    } catch (com.google.android.gms.internal.ads.zzaqi v2_46) {
                                                        v3_37 = 0;
                                                        v5_5 = v12_1;
                                                    } catch (com.google.android.gms.internal.ads.zzaqi v2_46) {
                                                        v5_5 = v12_1;
                                                    } catch (com.google.android.gms.internal.ads.zzaqi v2_46) {
                                                        v5_5 = v12_1;
                                                    }
                                                }
                                                v12_1.close();
                                                if (com.google.android.gms.internal.ads.zzakb.isLoggable(3)) {
                                                    com.google.android.gms.internal.ads.zzaqi v2_18 = com.google.android.gms.internal.ads.zzaqn.zzdbh.format(((long) v6_11));
                                                    com.google.android.gms.internal.ads.zzakb.zzck(new StringBuilder(((String.valueOf(v2_18).length() + 22) + String.valueOf(p28).length())).append("Preloaded ").append(v2_18).append(" bytes from ").append(p28).toString());
                                                }
                                                v13_1.setReadable(1, 0);
                                                if (!v14.isFile()) {
                                                    try {
                                                        v14.createNewFile();
                                                    } catch (com.google.android.gms.internal.ads.zzaqi v2) {
                                                    }
                                                } else {
                                                    v14.setLastModified(System.currentTimeMillis());
                                                }
                                                this.zza(p28, v13_1.getAbsolutePath(), v6_11);
                                                com.google.android.gms.internal.ads.zzaqn.zzdbg.remove(v9_1);
                                                v2_28 = 1;
                                            } else {
                                                com.google.android.gms.internal.ads.zzaqi v2_65;
                                                com.google.android.gms.internal.ads.zzakb.zzdk(new StringBuilder(((String.valueOf(v4_1).length() + 33) + String.valueOf(p28).length())).append("Content length ").append(v4_1).append(" exceeds limit at ").append(p28).toString());
                                                com.google.android.gms.internal.ads.zzaqi v2_63 = String.valueOf(v4_1);
                                                if (v2_63.length() == 0) {
                                                    v2_65 = new String("File too big for full file cache. Size: ");
                                                } else {
                                                    v2_65 = "File too big for full file cache. Size: ".concat(v2_63);
                                                }
                                                this.zza(p28, v13_1.getAbsolutePath(), "sizeExceeded", v2_65);
                                                com.google.android.gms.internal.ads.zzaqn.zzdbg.remove(v9_1);
                                                v2_28 = 0;
                                            }
                                        } else {
                                            com.google.android.gms.internal.ads.zzaqi v2_71;
                                            com.google.android.gms.internal.ads.zzaqi v2_69 = String.valueOf(p28);
                                            if (v2_69.length() == 0) {
                                                v2_71 = new String("Stream cache aborted, missing content-length header at ");
                                            } else {
                                                v2_71 = "Stream cache aborted, missing content-length header at ".concat(v2_69);
                                            }
                                            com.google.android.gms.internal.ads.zzakb.zzdk(v2_71);
                                            this.zza(p28, v13_1.getAbsolutePath(), "contentLengthMissing", 0);
                                            com.google.android.gms.internal.ads.zzaqn.zzdbg.remove(v9_1);
                                            v2_28 = 0;
                                        }
                                    } else {
                                        int v8_7 = v2_2.getHeaderField("Location");
                                        if (v8_7 != 0) {
                                            int v6_20 = new java.net.URL(v3_58, v8_7);
                                            com.google.android.gms.internal.ads.zzaqn v3_54 = v6_20.getProtocol();
                                            if (v3_54 != null) {
                                                if ((!v3_54.equals("http")) && (!v3_54.equals("https"))) {
                                                    break;
                                                }
                                                com.google.android.gms.internal.ads.zzaqn v3_57;
                                                com.google.android.gms.internal.ads.zzaqn v3_55 = String.valueOf(v8_7);
                                                if (v3_55.length() == 0) {
                                                    v3_57 = new String("Redirecting to ");
                                                } else {
                                                    v3_57 = "Redirecting to ".concat(v3_55);
                                                }
                                                com.google.android.gms.internal.ads.zzakb.zzck(v3_57);
                                                v2_2.disconnect();
                                                v2_78 = v4_28;
                                                v3_58 = v6_20;
                                            } else {
                                                throw new java.io.IOException("Protocol is null");
                                            }
                                        } else {
                                            throw new java.io.IOException("Missing Location header in redirect");
                                        }
                                    }
                                } else {
                                    throw new java.io.IOException("Invalid protocol.");
                                }
                            }
                        }
                        com.google.android.gms.internal.ads.zzaqi v2_81;
                        com.google.android.gms.internal.ads.zzaqi v2_79 = String.valueOf(v3_54);
                        if (v2_79.length() == 0) {
                            v2_81 = new String("Unsupported scheme: ");
                        } else {
                            v2_81 = "Unsupported scheme: ".concat(v2_79);
                        }
                        throw new java.io.IOException(v2_81);
                    } else {
                        com.google.android.gms.internal.ads.zzaqi v2_110;
                        com.google.android.gms.internal.ads.zzaqi v2_108 = String.valueOf(p28);
                        if (v2_108.length() == 0) {
                            v2_110 = new String("Stream cache already in progress at ");
                        } else {
                            v2_110 = "Stream cache already in progress at ".concat(v2_108);
                        }
                        com.google.android.gms.internal.ads.zzakb.zzdk(v2_110);
                        this.zza(p28, v13_1.getAbsolutePath(), "inProgress", 0);
                        v2_28 = 0;
                    }
                } catch (com.google.android.gms.internal.ads.zzaqi v2_112) {
                    throw v2_112;
                }
            } else {
                com.google.android.gms.internal.ads.zzaqi v2_116;
                com.google.android.gms.internal.ads.zzaqn v3_65 = ((int) v13_1.length());
                com.google.android.gms.internal.ads.zzaqi v2_114 = String.valueOf(p28);
                if (v2_114.length() == 0) {
                    v2_116 = new String("Stream cache hit at ");
                } else {
                    v2_116 = "Stream cache hit at ".concat(v2_114);
                }
                com.google.android.gms.internal.ads.zzakb.zzck(v2_116);
                this.zza(p28, v13_1.getAbsolutePath(), v3_65);
                v2_28 = 1;
            }
        } else {
            this.zza(p28, 0, "noCacheDir", 0);
            v2_28 = 0;
        }
        return v2_28;
    }

Method com.google.android.gms.internal.ads.zzafn.zza() calling method java.net.URL.<init>()


    public static com.google.android.gms.internal.ads.zzaej zza(com.google.android.gms.internal.ads.zzaef p14, android.content.Context p15, String p16, String p17, String p18, String p19, com.google.android.gms.internal.ads.zzafz p20, com.google.android.gms.internal.ads.zznx p21, com.google.android.gms.internal.ads.zzafm p22)
    {
        try {
            int v4_7;
            if (p21 == null) {
                v4_7 = 0;
                com.google.android.gms.internal.ads.zzaej v2_6;
                com.google.android.gms.internal.ads.zzafx v9_1 = new com.google.android.gms.internal.ads.zzafx(p14, p20.zzoi());
                com.google.android.gms.internal.ads.zzaej v2_1 = String.valueOf(p17);
                if (v2_1.length() == 0) {
                    v2_6 = new String("AdRequestServiceImpl: Sending request: ");
                } else {
                    v2_6 = "AdRequestServiceImpl: Sending request: ".concat(v2_1);
                }
                com.google.android.gms.internal.ads.zzakb.zzck(v2_6);
                com.google.android.gms.internal.ads.zzaej v3_24 = new java.net.URL(p17);
                long v10 = com.google.android.gms.ads.internal.zzbv.zzer().elapsedRealtime();
                int v7_1 = 0;
                String v8_0 = v3_24;
                while(true) {
                    if (p22 != null) {
                        p22.zzchc.zzoq();
                    }
                    com.google.android.gms.internal.ads.zzaej v2_20 = ((java.net.HttpURLConnection) v8_0.openConnection());
                    try {
                        com.google.android.gms.ads.internal.zzbv.zzek().zza(p15, p16, 0, v2_20);
                    } catch (com.google.android.gms.internal.ads.zzaej v3_21) {
                        v2_20.disconnect();
                        if (p22 != null) {
                            p22.zzchc.zzor();
                        }
                        throw v3_21;
                    }
                    if (p20.zzok()) {
                        if (!android.text.TextUtils.isEmpty(p18)) {
                            v2_20.addRequestProperty("x-afma-drt-cookie", p18);
                        }
                        if (!android.text.TextUtils.isEmpty(p19)) {
                            v2_20.addRequestProperty("x-afma-drt-v2-cookie", p19);
                        }
                    }
                    com.google.android.gms.internal.ads.zzaej v3_33 = p14.zzcds;
                    if (!android.text.TextUtils.isEmpty(v3_33)) {
                        com.google.android.gms.internal.ads.zzakb.zzck("Sending webview cookie in ad request header.");
                        v2_20.addRequestProperty("Cookie", v3_33);
                    }
                    com.google.android.gms.internal.ads.zzaej v3_34 = 0;
                    if ((p20 != null) && (!android.text.TextUtils.isEmpty(p20.zzoj()))) {
                        v2_20.setDoOutput(1);
                        v3_34 = p20.zzoj().getBytes();
                        v2_20.setFixedLengthStreamingMode(v3_34.length);
                        try {
                            int v5_22 = new java.io.BufferedOutputStream(v2_20.getOutputStream());
                            try {
                                v5_22.write(v3_34);
                            } catch (com.google.android.gms.internal.ads.zzaej v3_37) {
                                int v4_9 = v5_22;
                                com.google.android.gms.common.util.IOUtils.closeQuietly(v4_9);
                                throw v3_37;
                            }
                            com.google.android.gms.common.util.IOUtils.closeQuietly(v5_22);
                        } catch (com.google.android.gms.internal.ads.zzaej v3_37) {
                            v4_9 = 0;
                        }
                    }
                    com.google.android.gms.internal.ads.zzaej v2_3;
                    java.io.OutputStream v12_2 = new com.google.android.gms.internal.ads.zzamy(p14.zzcdi);
                    v12_2.zza(v2_20, v3_34);
                    com.google.android.gms.internal.ads.zzaej v3_38 = v2_20.getResponseCode();
                    java.util.Map v13 = v2_20.getHeaderFields();
                    v12_2.zza(v2_20, v3_38);
                    if ((v3_38 < 200) || (v3_38 >= 300)) {
                        com.google.android.gms.internal.ads.zzafn.zza(v8_0.toString(), v13, 0, v3_38);
                        if ((v3_38 < 300) || (v3_38 >= 400)) {
                            break;
                        }
                        com.google.android.gms.internal.ads.zzaej v3_6 = v2_20.getHeaderField("Location");
                        if (!android.text.TextUtils.isEmpty(v3_6)) {
                            String v6_2 = new java.net.URL(v3_6);
                            int v5_9 = (v7_1 + 1);
                            if (v5_9 <= ((Integer) com.google.android.gms.internal.ads.zzkb.zzik().zzd(com.google.android.gms.internal.ads.zznk.zzbes)).intValue()) {
                                v9_1.zzl(v13);
                                v2_20.disconnect();
                                if (p22 == null) {
                                    v7_1 = v5_9;
                                    v8_0 = v6_2;
                                } else {
                                    p22.zzchc.zzor();
                                    v7_1 = v5_9;
                                    v8_0 = v6_2;
                                }
                            } else {
                                com.google.android.gms.internal.ads.zzakb.zzdk("Too many redirects.");
                                com.google.android.gms.internal.ads.zzaej v3_13 = new com.google.android.gms.internal.ads.zzaej(0);
                                v2_20.disconnect();
                                if (p22 != null) {
                                    p22.zzchc.zzor();
                                }
                                v2_3 = v3_13;
                            }
                        } else {
                            com.google.android.gms.internal.ads.zzakb.zzdk("No location header to follow redirect.");
                            com.google.android.gms.internal.ads.zzaej v3_16 = new com.google.android.gms.internal.ads.zzaej(0);
                            v2_20.disconnect();
                            if (p22 != null) {
                                p22.zzchc.zzor();
                            }
                            v2_3 = v3_16;
                        }
                    } else {
                        int v7_2 = v8_0.toString();
                        try {
                            int v5_11 = new java.io.InputStreamReader(v2_20.getInputStream());
                            try {
                                com.google.android.gms.ads.internal.zzbv.zzek();
                                String v6_4 = com.google.android.gms.internal.ads.zzakk.zza(v5_11);
                            } catch (com.google.android.gms.internal.ads.zzaej v3_17) {
                                int v4_6 = v5_11;
                                com.google.android.gms.common.util.IOUtils.closeQuietly(v4_6);
                                throw v3_17;
                            }
                            com.google.android.gms.common.util.IOUtils.closeQuietly(v5_11);
                            v12_2.zzdg(v6_4);
                            com.google.android.gms.internal.ads.zzafn.zza(v7_2, v13, v6_4, v3_38);
                            v9_1.zza(v7_2, v13, v6_4);
                            if (p21 != null) {
                                com.google.android.gms.internal.ads.zzaej v3_19 = new String[1];
                                v3_19[0] = "ufe";
                                p21.zza(v4_7, v3_19);
                            }
                            com.google.android.gms.internal.ads.zzaej v3_23 = v9_1.zza(v10, p20.zzon());
                            v2_20.disconnect();
                            if (p22 != null) {
                                p22.zzchc.zzor();
                            }
                            v2_3 = v3_23;
                        } catch (com.google.android.gms.internal.ads.zzaej v3_17) {
                            v4_6 = 0;
                        }
                    }
                }
                com.google.android.gms.internal.ads.zzakb.zzdk(new StringBuilder(46).append("Received error HTTP response code: ").append(v3_38).toString());
                com.google.android.gms.internal.ads.zzaej v3_4 = new com.google.android.gms.internal.ads.zzaej(0);
                v2_20.disconnect();
                if (p22 != null) {
                    p22.zzchc.zzor();
                }
                v2_3 = v3_4;
            } else {
                v4_7 = p21.zzjj();
            }
        } catch (com.google.android.gms.internal.ads.zzaej v2_11) {
            com.google.android.gms.internal.ads.zzaej v2_13 = String.valueOf(v2_11.getMessage());
            if (v2_13.length() == 0) {
                com.google.android.gms.internal.ads.zzaej v2_16 = new String("Error while connecting to ad server: ");
            } else {
                v2_16 = "Error while connecting to ad server: ".concat(v2_13);
            }
            com.google.android.gms.internal.ads.zzakb.zzdk(v2_16);
            v2_3 = new com.google.android.gms.internal.ads.zzaej(2);
        }
        return v2_3;
    }