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.rnfs.RNFSManager.downloadFile() calling method java.net.URL.<init>()


    public void downloadFile(com.facebook.react.bridge.ReadableMap p12, com.facebook.react.bridge.Callback p13)
    {
        try {
            java.io.File v2_1 = new java.io.File(p12.getString("toFile"));
            java.net.URL v6_0 = new java.net.URL(p12.getString("fromUrl"));
            int v4 = p12.getInt("jobId");
            com.facebook.react.bridge.ReadableMap v3 = p12.getMap("headers");
            com.rnfs.DownloadParams v5_1 = new com.rnfs.DownloadParams();
            v5_1.src = v6_0;
            v5_1.dest = v2_1;
            v5_1.headers = v3;
            v5_1.onTaskCompleted = new com.rnfs.RNFSManager$1(this, v4, p13);
            v5_1.onDownloadBegin = new com.rnfs.RNFSManager$2(this, v4);
            v5_1.onDownloadProgress = new com.rnfs.RNFSManager$3(this, v4);
            com.rnfs.Downloader v0_1 = new com.rnfs.Downloader();
            Object[] v7_11 = new com.rnfs.DownloadParams[1];
            v7_11[0] = v5_1;
            v0_1.execute(v7_11);
            this.downloaders.put(v4, v0_1);
        } catch (Exception v1) {
            v1.printStackTrace();
            Object[] v7_13 = new Object[1];
            v7_13[0] = this.makeErrorPayload(v1);
            p13.invoke(v7_13);
        }
        return;
    }

Method com.imagepicker.ImagePickerModule.onActivityResult() calling method java.net.URL.<init>()


    public void onActivityResult(int p31, int p32, android.content.Intent p33)
    {
        if (((this.mCallback != null) && ((this.mCameraCaptureURI != null) || (p31 != 13001))) && ((p31 == 13001) || ((p31 == 13002) || ((p31 == 13003) || (p31 == 13004))))) {
            this.response = com.facebook.react.bridge.Arguments.createMap();
            if (p32 == -1) {
                android.net.Uri v23;
                switch (p31) {
                    case 13001:
                        v23 = this.mCameraCaptureURI;
                        this.fileScan(v23.getPath());
                        break;
                    case 13002:
                        v23 = p33.getData();
                        break;
                    case 13003:
                        this.response.putString("uri", p33.getData().toString());
                        this.response.putString("path", this.getRealPathFromURI(p33.getData()));
                        com.facebook.react.bridge.WritableMap v25_0 = this.mCallback;
                        com.facebook.react.bridge.WritableMap v0_5 = new Object[1];
                        String v26_1 = v0_5;
                        v26_1[0] = this.response;
                        v25_0.invoke(v26_1);
                        this.mCallback = 0;
                        break;
                    case 13004:
                        this.response.putString("uri", p33.getData().toString());
                        this.response.putString("path", this.getRealPathFromURI(p33.getData()));
                        this.fileScan(this.response.getString("path"));
                        com.facebook.react.bridge.WritableMap v25_70 = this.mCallback;
                        com.facebook.react.bridge.WritableMap v0_156 = new Object[1];
                        String v26_36 = v0_156;
                        v26_36[0] = this.response;
                        v25_70.invoke(v26_36);
                        this.mCallback = 0;
                        break;
                    default:
                        v23 = 0;
                }
                String v20 = this.getRealPathFromURI(v23);
                int v11 = 0;
                if (v20 != null) {
                    try {
                        new java.net.URL(v20);
                        v11 = 1;
                    } catch (com.facebook.react.bridge.WritableMap v25) {
                    }
                }
                if ((v20 == null) || (v11 != 0)) {
                    try {
                        java.io.File v8 = this.createFileFromURI(v23);
                        v20 = v8.getAbsolutePath();
                        v23 = android.net.Uri.fromFile(v8);
                    } catch (java.io.IOException v5) {
                        this.response.putString("error", "Could not read photo");
                        this.response.putString("uri", v23.toString());
                        com.facebook.react.bridge.WritableMap v25_7 = this.mCallback;
                        com.facebook.react.bridge.WritableMap v0_24 = new Object[1];
                        String v26_5 = v0_24;
                        v26_5[0] = this.response;
                        v25_7.invoke(v26_5);
                        this.mCallback = 0;
                        return;
                    }
                }
                int v4 = 0;
                try {
                    android.media.ExifInterface v6_1 = new android.media.ExifInterface(v20);
                    com.facebook.react.bridge.WritableMap v0_30 = new float[2];
                    float[] v16 = v0_30;
                    v6_1.getLatLong(v16);
                    float v15 = v16[0];
                    float v17 = v16[1];
                } catch (java.io.IOException v5) {
                    v5.printStackTrace();
                    this.response.putString("error", v5.getMessage());
                    com.facebook.react.bridge.WritableMap v25_33 = this.mCallback;
                    com.facebook.react.bridge.WritableMap v0_58 = new Object[1];
                    String v26_15 = v0_58;
                    v26_15[0] = this.response;
                    v25_33.invoke(v26_15);
                    this.mCallback = 0;
                }
                if ((v15 != 0) || (v17 != 0)) {
                    this.response.putDouble("latitude", ((double) v15));
                    this.response.putDouble("longitude", ((double) v17));
                }
                String v22 = v6_1.getAttribute("DateTime");
                java.text.SimpleDateFormat v7_1 = new java.text.SimpleDateFormat("yyyy:MM:dd HH:mm:ss");
                java.text.SimpleDateFormat v13_1 = new java.text.SimpleDateFormat("yyyy-MM-dd\'T\'HH:mm:ss");
                v13_1.setTimeZone(java.util.TimeZone.getTimeZone("UTC"));
                try {
                    this.response.putString("timestamp", new StringBuilder().append(v13_1.format(v7_1.parse(v22))).append("Z").toString());
                } catch (com.facebook.react.bridge.WritableMap v25) {
                }
                int v12 = 1;
                switch (v6_1.getAttributeInt("Orientation", 1)) {
                    case 3:
                        v4 = 180;
                    case 4:
                    case 5:
                    case 7:
                    default:
                        break;
                    case 4:
                    case 5:
                    case 7:
                        break;
                    case 6:
                        v12 = 0;
                        v4 = 90;
                    case 4:
                    case 5:
                    case 7:
                        break;
                    case 8:
                        v12 = 0;
                        v4 = 270;
                        break;
                }
                this.response.putInt("originalRotation", v4);
                this.response.putBoolean("isVertical", v12);
                android.graphics.BitmapFactory$Options v18_1 = new android.graphics.BitmapFactory$Options();
                v18_1.inJustDecodeBounds = 1;
                android.graphics.BitmapFactory.decodeFile(v20, v18_1);
                int v10 = v18_1.outWidth;
                int v9 = v18_1.outHeight;
                if ((((v10 >= this.maxWidth) || (this.maxWidth <= 0)) && (this.maxWidth != 0)) || ((((v9 >= this.maxHeight) || (this.maxHeight <= 0)) && (this.maxHeight != 0)) || ((this.quality != 100) || ((this.rotation != 0) && (v4 != this.rotation))))) {
                    java.io.File v21 = this.getResizedImage(v20, v10, v9);
                    if (v21 != null) {
                        v20 = v21.getAbsolutePath();
                        v23 = android.net.Uri.fromFile(v21);
                        android.graphics.BitmapFactory.decodeFile(v20, v18_1);
                        this.response.putInt("width", v18_1.outWidth);
                        this.response.putInt("height", v18_1.outHeight);
                    } else {
                        this.response.putString("error", "Can\'t resize the image");
                    }
                } else {
                    this.response.putInt("width", v10);
                    this.response.putInt("height", v9);
                }
                this.response.putString("uri", v23.toString());
                this.response.putString("path", v20);
                if (!this.noData.booleanValue()) {
                    this.response.putString("data", this.getBase64StringFromFile(v20));
                }
                this.putExtraFileInfo(v20, this.response);
                com.facebook.react.bridge.WritableMap v25_61 = this.mCallback;
                com.facebook.react.bridge.WritableMap v0_133 = new Object[1];
                String v26_29 = v0_133;
                v26_29[0] = this.response;
                v25_61.invoke(v26_29);
                this.mCallback = 0;
            } else {
                this.response.putBoolean("didCancel", 1);
                com.facebook.react.bridge.WritableMap v25_64 = this.mCallback;
                com.facebook.react.bridge.WritableMap v0_144 = new Object[1];
                String v26_32 = v0_144;
                v26_32[0] = this.response;
                v25_64.invoke(v26_32);
                this.mCallback = 0;
            }
        }
        return;
    }

Method com.facebook.react.devsupport.DevSupportManagerImpl.resetCurrentContext() calling method java.net.URL.<init>()


    private void resetCurrentContext(com.facebook.react.bridge.ReactContext p8)
    {
        if (this.mCurrentContext != p8) {
            this.mCurrentContext = p8;
            if (this.mDebugOverlayController != null) {
                this.mDebugOverlayController.setFpsDebugViewVisible(0);
            }
            if (p8 != null) {
                this.mDebugOverlayController = new com.facebook.react.devsupport.DebugOverlayController(p8);
            }
            if ((this.mDevSettings.isHotModuleReplacementEnabled()) && (this.mCurrentContext != null)) {
                try {
                    java.net.URL v4_1 = new java.net.URL(this.getSourceUrl());
                    ((com.facebook.react.devsupport.HMRClient) this.mCurrentContext.getJSModule(com.facebook.react.devsupport.HMRClient)).enable("android", v4_1.getPath().substring(1), v4_1.getHost(), v4_1.getPort());
                } catch (java.net.MalformedURLException v0) {
                    this.showNewJavaError(v0.getMessage(), v0);
                }
            }
            this.reloadSettings();
        }
        return;
    }

Method com.facebook.imagepipeline.producers.HttpUrlConnectionNetworkFetcher.openConnectionTo() calling method java.net.URL.<init>()


    static java.net.HttpURLConnection openConnectionTo(android.net.Uri p2)
    {
        return ((java.net.HttpURLConnection) new java.net.URL(p2.toString()).openConnection());
    }

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


    public org.apache.http.HttpResponse zza(com.google.android.gms.internal.zzk p7, java.util.Map p8)
    {
        String v0_0;
        String v1_2 = p7.getUrl();
        org.apache.http.message.BasicHttpResponse v2_3 = new java.util.HashMap();
        v2_3.putAll(p7.getHeaders());
        v2_3.putAll(p8);
        if (this.zzce == null) {
            v0_0 = v1_2;
        } else {
            v0_0 = this.zzce.zzh(v1_2);
            if (v0_0 == null) {
                String v0_24;
                String v0_21 = String.valueOf(v1_2);
                if (v0_21.length() == 0) {
                    v0_24 = new String("URL blocked by rewriter: ");
                } else {
                    v0_24 = "URL blocked by rewriter: ".concat(v0_21);
                }
                throw new java.io.IOException(v0_24);
            }
        }
        java.util.Iterator v3_0 = this.zza(new java.net.URL(v0_0), p7);
        org.apache.http.message.BasicHeader v4_0 = v2_3.keySet().iterator();
        while (v4_0.hasNext()) {
            String v0_20 = ((String) v4_0.next());
            v3_0.addRequestProperty(v0_20, ((String) v2_3.get(v0_20)));
        }
        com.google.android.gms.internal.zzz.zza(v3_0, p7);
        String v0_5 = new org.apache.http.ProtocolVersion("HTTP", 1, 1);
        if (v3_0.getResponseCode() != -1) {
            org.apache.http.message.BasicHttpResponse v2_5 = new org.apache.http.message.BasicHttpResponse(new org.apache.http.message.BasicStatusLine(v0_5, v3_0.getResponseCode(), v3_0.getResponseMessage()));
            v2_5.setEntity(com.google.android.gms.internal.zzz.zza(v3_0));
            java.util.Iterator v3_1 = v3_0.getHeaderFields().entrySet().iterator();
            while (v3_1.hasNext()) {
                String v0_11 = ((java.util.Map$Entry) v3_1.next());
                if (v0_11.getKey() != null) {
                    v2_5.addHeader(new org.apache.http.message.BasicHeader(((String) v0_11.getKey()), ((String) ((java.util.List) v0_11.getValue()).get(0))));
                }
            }
            return v2_5;
        } else {
            throw new java.io.IOException("Could not retrieve response code from HttpUrlConnection.");
        }
    }

Method com.google.android.gms.internal.zzaok$10.zzv() calling method java.net.URL.<init>()


    public java.net.URL zzv(com.google.android.gms.internal.zzaom p4)
    {
        java.net.URL v0_0 = 0;
        if (p4.b() != com.google.android.gms.internal.zzaon.bhx) {
            String v1_1 = p4.nextString();
            if (!"null".equals(v1_1)) {
                v0_0 = new java.net.URL(v1_1);
            }
        } else {
            p4.nextNull();
        }
        return v0_0;
    }

Method com.facebook.react.modules.camera.ImageEditingManager$CropTask.openBitmapInputStream() calling method java.net.URL.<init>()


    private java.io.InputStream openBitmapInputStream()
    {
        java.io.InputStream v1;
        if (!com.facebook.react.modules.camera.ImageEditingManager.access$200(this.mUri)) {
            v1 = new java.net.URL(this.mUri).openConnection().getInputStream();
        } else {
            v1 = this.mContext.getContentResolver().openInputStream(android.net.Uri.parse(this.mUri));
        }
        if (v1 != null) {
            return v1;
        } else {
            throw new java.io.IOException(new StringBuilder().append("Cannot open bitmap: ").append(this.mUri).toString());
        }
    }

Method okhttp3.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 io.fabric.sdk.android.services.network.HttpRequest.encode() calling method java.net.URL.<init>()


    public static String encode(CharSequence p12)
    {
        try {
            java.net.URL v10_1 = new java.net.URL(p12.toString());
            String v2 = v10_1.getHost();
            int v11 = v10_1.getPort();
        } catch (java.net.URISyntaxException v6_0) {
            throw new io.fabric.sdk.android.services.network.HttpRequest$HttpRequestException(v6_0);
        }
        if (v11 != -1) {
            v2 = new StringBuilder().append(v2).append(58).append(Integer.toString(v11)).toString();
        }
        try {
            String v7 = new java.net.URI(v10_1.getProtocol(), v2, v10_1.getPath(), v10_1.getQuery(), 0).toASCIIString();
            int v9 = v7.indexOf(63);
        } catch (java.net.URISyntaxException v6_1) {
            java.io.IOException v8_1 = new java.io.IOException("Parsing URI failed");
            v8_1.initCause(v6_1);
            throw new io.fabric.sdk.android.services.network.HttpRequest$HttpRequestException(v8_1);
        }
        if ((v9 > 0) && ((v9 + 1) < v7.length())) {
            v7 = new StringBuilder().append(v7.substring(0, (v9 + 1))).append(v7.substring((v9 + 1)).replace("+", "%2B")).toString();
        }
        return v7;
    }

Method io.fabric.sdk.android.services.network.HttpRequest.<init>() calling method java.net.URL.<init>()


    public HttpRequest(CharSequence p4, String p5)
    {
        this.connection = 0;
        this.ignoreCloseExceptions = 1;
        this.uncompress = 0;
        this.bufferSize = 8192;
        try {
            this.url = new java.net.URL(p4.toString());
            this.requestMethod = p5;
            return;
        } catch (java.net.MalformedURLException v0) {
            throw new io.fabric.sdk.android.services.network.HttpRequest$HttpRequestException(v0);
        }
    }

Method com.rnfs.Downloader.download() calling method java.net.URL.<init>()


    private void download(com.rnfs.DownloadParams p27, com.rnfs.DownloadResult p28)
    {
        java.io.BufferedInputStream v9 = 0;
        java.io.FileOutputStream v15 = 0;
        try {
            java.net.HttpURLConnection v2 = ((java.net.HttpURLConnection) p27.src.openConnection());
            com.facebook.react.bridge.ReadableMapKeySetIterator v12 = p27.headers.keySetIterator();
        } catch (int v22_7) {
            if (v15 != null) {
                v15.close();
            }
            if (v9 != null) {
                v9.close();
            }
            if (v2 != null) {
                v2.disconnect();
            }
            throw v22_7;
        }
        while (v12.hasNextKey()) {
            String v13 = v12.nextKey();
            v2.setRequestProperty(v13, p27.headers.getString(v13));
        }
        int v11;
        v2.setConnectTimeout(5000);
        v2.connect();
        int v18 = v2.getResponseCode();
        int v14 = v2.getContentLength();
        if ((v18 == 200) || ((v18 != 301) && (v18 != 302))) {
            v11 = 0;
        } else {
            v11 = 1;
        }
        if (v11 != 0) {
            String v17 = v2.getHeaderField("Location");
            v2.disconnect();
            int v22_17 = new java.net.URL;
            v22_17(v17);
            v2 = ((java.net.HttpURLConnection) v22_17.openConnection());
            v2.setConnectTimeout(5000);
            v2.connect();
            v18 = v2.getResponseCode();
            v14 = v2.getContentLength();
        }
        java.util.Map v7 = v2.getHeaderFields();
        java.util.HashMap v8_1 = new java.util.HashMap();
        int v23_1 = v7.entrySet().iterator();
        while (v23_1.hasNext()) {
            java.util.Map$Entry v5_1 = ((java.util.Map$Entry) v23_1.next());
            String v6_1 = ((String) v5_1.getKey());
            String v21_1 = ((String) ((java.util.List) v5_1.getValue()).get(0));
            if ((v6_1 != null) && (v21_1 != null)) {
                v8_1.put(v6_1, v21_1);
            }
        }
        this.mParam.onDownloadBegin.onDownloadBegin(v18, v14, v8_1);
        java.io.BufferedInputStream v10_1 = new java.io.BufferedInputStream(v2.getInputStream(), 8192);
        try {
            java.io.FileOutputStream v16 = new java.io.FileOutputStream;
            v16(p27.dest);
            try {
                byte[] v4 = new byte[8192];
                int v19 = 0;
            } catch (int v22_7) {
                v15 = v16;
                v9 = v10_1;
            }
            while(true) {
                int v3 = v10_1.read(v4);
                if ((v3 == -1) || (this.mAbort.get())) {
                    break;
                }
                v19 += v3;
                java.io.FileOutputStream v0_6 = new int[][1];
                int v22_4 = v0_6;
                java.io.FileOutputStream v0_9 = new int[2];
                int[] v24_1 = v0_9;
                v24_1[0] = v14;
                v24_1[1] = v19;
                v22_4[0] = v24_1;
                this.publishProgress(v22_4);
                v16.write(v4, 0, v3);
            }
            v16.flush();
            p28.statusCode = v18;
            p28.bytesWritten = v19;
            if (v16 != null) {
                v16.close();
            }
            if (v10_1 != null) {
                v10_1.close();
            }
            if (v2 != null) {
                v2.disconnect();
            }
            return;
        } catch (int v22_7) {
            v9 = v10_1;
        }
    }

Method com.microsoft.codepush.react.CodePushUpdateManager.downloadPackage() calling method java.net.URL.<init>()


    public void downloadPackage(org.json.JSONObject p43, String p44, com.microsoft.codepush.react.DownloadProgressCallback p45)
    {
        String v30 = p43.optString("packageHash", 0);
        String v29 = this.getPackageFolderPath(v30);
        String v31 = com.microsoft.codepush.react.CodePushUtils.appendPathComponent(v29, "app.json");
        if (com.microsoft.codepush.react.FileUtils.fileAtPathExists(v29)) {
            com.microsoft.codepush.react.FileUtils.deleteDirectoryAtPath(v29);
        }
        String v19 = p43.optString("downloadUrl", 0);
        java.io.BufferedInputStream v6 = 0;
        java.io.FileOutputStream v21 = 0;
        java.io.BufferedOutputStream v8 = 0;
        int v27 = 0;
        try {
            java.net.HttpURLConnection v10 = ((java.net.HttpURLConnection) ((java.net.HttpURLConnection) new java.net.URL(v19).openConnection()));
            long v36 = ((long) v10.getContentLength());
            long v34 = 0;
            java.io.BufferedInputStream v7_1 = new java.io.BufferedInputStream(v10.getInputStream());
            try {
                java.io.File v17 = new java.io.File;
                v17(this.getCodePushPath());
                v17.mkdirs();
                java.io.File v16 = new java.io.File;
                v16(v17, "download.zip");
                try {
                    java.io.FileOutputStream v22 = new java.io.FileOutputStream;
                    v22(v16);
                    try {
                        java.io.BufferedOutputStream v9_1 = new java.io.BufferedOutputStream(v22, 262144);
                        try {
                            byte[] v12 = new byte[262144];
                            org.json.JSONObject v0_40 = new byte[4];
                            byte[] v23 = v0_40;
                        } catch (java.io.IOException v20_1) {
                            v8 = v9_1;
                            v21 = v22;
                            v6 = v7_1;
                            String v39_21 = new com.microsoft.codepush.react.CodePushMalformedDataException;
                            v39_21(v19, v20_1);
                            throw v39_21;
                        }
                        while(true) {
                            int v32 = v7_1.read(v12, 0, 262144);
                            if (v32 < 0) {
                                break;
                            }
                            if (v34 < 4) {
                                int v25 = 0;
                                while (v25 < v32) {
                                    int v24 = (((int) v34) + v25);
                                    if (v24 >= 4) {
                                        break;
                                    }
                                    v23[v24] = v12[v25];
                                    v25++;
                                }
                            }
                            v34 += ((long) v32);
                            v9_1.write(v12, 0, v32);
                            String v39_24 = new com.microsoft.codepush.react.DownloadProgress;
                            v39_24(v36, v34);
                            p45.call(v39_24);
                        }
                        if (v36 == v34) {
                            if (java.nio.ByteBuffer.wrap(v23).getInt() != 1347093252) {
                                v27 = 0;
                            } else {
                                v27 = 1;
                            }
                            try {
                                if (v9_1 != null) {
                                    v9_1.close();
                                }
                            } catch (java.io.IOException v20_0) {
                                String v39_6 = new com.microsoft.codepush.react.CodePushUnknownException;
                                v39_6("Error closing IO resources.", v20_0);
                                throw v39_6;
                            }
                            if (v22 != null) {
                                v22.close();
                            }
                            if (v7_1 != null) {
                                v7_1.close();
                            }
                            if (v10 != null) {
                                v10.disconnect();
                            }
                            if (v27 == 0) {
                                com.microsoft.codepush.react.FileUtils.moveFile(v16, v29, p44);
                            } else {
                                String v38 = this.getUnzippedFolderPath();
                                com.microsoft.codepush.react.FileUtils.unzipFile(v16, v38);
                                com.microsoft.codepush.react.FileUtils.deleteFileOrFolderSilently(v16);
                                String v14 = com.microsoft.codepush.react.CodePushUtils.appendPathComponent(v38, "hotcodepush.json");
                                boolean v26 = com.microsoft.codepush.react.FileUtils.fileAtPathExists(v14);
                                if (v26) {
                                    com.microsoft.codepush.react.CodePushUpdateUtils.copyNecessaryFilesFromCurrentPackage(v14, this.getCurrentPackageFolderPath(), v29);
                                    new java.io.File(v14).delete();
                                }
                                com.microsoft.codepush.react.FileUtils.copyDirectoryContents(v38, v29);
                                com.microsoft.codepush.react.FileUtils.deleteFileAtPathSilently(v38);
                                String v33 = com.microsoft.codepush.react.CodePushUpdateUtils.findJSBundleInUpdateContents(v29, p44);
                                if (v33 != null) {
                                    if (com.microsoft.codepush.react.FileUtils.fileAtPathExists(v31)) {
                                        java.io.File v28 = new java.io.File;
                                        v28(v31);
                                        v28.delete();
                                    }
                                    if (v26) {
                                        com.microsoft.codepush.react.CodePushUpdateUtils.verifyHashForDiffUpdate(v29, v30);
                                    }
                                    com.microsoft.codepush.react.CodePushUtils.setJSONValueForKey(p43, "bundlePath", v33);
                                } else {
                                    throw new com.microsoft.codepush.react.CodePushInvalidUpdateException(new StringBuilder().append("Update is invalid - A JS bundle file named \"").append(p44).append("\" could not be found within the downloaded contents. Please check that you are releasing your CodePush updates using the exact same JS bundle file name that was shipped with your app\'s binary.").toString());
                                }
                            }
                            com.microsoft.codepush.react.CodePushUtils.writeJsonToFile(p43, v31);
                            return;
                        } else {
                            throw new com.microsoft.codepush.react.CodePushUnknownException(new StringBuilder().append("Received ").append(v34).append(" bytes, expected ").append(v36).toString());
                        }
                    } catch (String v39_20) {
                        v21 = v22;
                        v6 = v7_1;
                        try {
                            if (v8 != null) {
                                v8.close();
                            }
                        } catch (java.io.IOException v20_2) {
                            String v39_22 = new com.microsoft.codepush.react.CodePushUnknownException;
                            v39_22("Error closing IO resources.", v20_2);
                            throw v39_22;
                        }
                        if (v21 != null) {
                            v21.close();
                        }
                        if (v6 != null) {
                            v6.close();
                        }
                        if (v10 != null) {
                            v10.disconnect();
                        }
                        throw v39_20;
                    } catch (java.io.IOException v20_1) {
                        v21 = v22;
                        v6 = v7_1;
                    }
                } catch (String v39_20) {
                    v6 = v7_1;
                } catch (java.io.IOException v20_1) {
                    v6 = v7_1;
                }
            } catch (String v39_20) {
                v6 = v7_1;
            } catch (java.io.IOException v20_1) {
                v6 = v7_1;
            }
        } catch (String v39_20) {
        } catch (java.io.IOException v20_1) {
        }
    }

Method com.microsoft.codepush.react.CodePushUpdateManager.downloadAndReplaceCurrentBundle() calling method java.net.URL.<init>()


    public void downloadAndReplaceCurrentBundle(String p16, String p17)
    {
        java.io.BufferedInputStream v1 = 0;
        java.io.FileOutputStream v10 = 0;
        java.io.BufferedOutputStream v3 = 0;
        try {
            java.net.HttpURLConnection v5 = ((java.net.HttpURLConnection) ((java.net.HttpURLConnection) new java.net.URL(p16).openConnection()));
            java.io.BufferedInputStream v2_1 = new java.io.BufferedInputStream(v5.getInputStream());
            try {
                java.io.File v7_1 = new java.io.File(this.getCurrentPackageBundlePath(p17));
                v7_1.delete();
                java.io.FileOutputStream v11_1 = new java.io.FileOutputStream(v7_1);
                try {
                    java.io.BufferedOutputStream v4_1 = new java.io.BufferedOutputStream(v11_1, 262144);
                    try {
                        byte[] v6 = new byte[262144];
                    } catch (com.microsoft.codepush.react.CodePushUnknownException v13_2) {
                        v3 = v4_1;
                        v10 = v11_1;
                        v1 = v2_1;
                        try {
                            if (v3 != null) {
                                v3.close();
                            }
                        } catch (java.io.IOException v9_1) {
                            throw new com.microsoft.codepush.react.CodePushUnknownException("Error closing IO resources.", v9_1);
                        }
                        if (v10 != null) {
                            v10.close();
                        }
                        if (v1 != null) {
                            v1.close();
                        }
                        if (v5 != null) {
                            v5.disconnect();
                        }
                        throw v13_2;
                    } catch (java.io.IOException v9_0) {
                        v3 = v4_1;
                        v10 = v11_1;
                        v1 = v2_1;
                        throw new com.microsoft.codepush.react.CodePushMalformedDataException(p16, v9_0);
                    }
                    while(true) {
                        int v12 = v2_1.read(v6, 0, 262144);
                        if (v12 < 0) {
                            break;
                        }
                        v4_1.write(v6, 0, v12);
                    }
                    try {
                        if (v4_1 != null) {
                            v4_1.close();
                        }
                    } catch (java.io.IOException v9_2) {
                        throw new com.microsoft.codepush.react.CodePushUnknownException("Error closing IO resources.", v9_2);
                    }
                    if (v11_1 != null) {
                        v11_1.close();
                    }
                    if (v2_1 != null) {
                        v2_1.close();
                    }
                    if (v5 != null) {
                        v5.disconnect();
                    }
                    return;
                } catch (com.microsoft.codepush.react.CodePushUnknownException v13_2) {
                    v10 = v11_1;
                    v1 = v2_1;
                } catch (java.io.IOException v9_0) {
                    v10 = v11_1;
                    v1 = v2_1;
                }
            } catch (com.microsoft.codepush.react.CodePushUnknownException v13_2) {
                v1 = v2_1;
            } catch (java.io.IOException v9_0) {
                v1 = v2_1;
            }
        } catch (com.microsoft.codepush.react.CodePushUnknownException v13_2) {
        } catch (java.io.IOException v9_0) {
        }
    }

Method com.google.android.gms.measurement.internal.zzx.zzbuc() calling method java.net.URL.<init>()


    public void zzbuc()
    {
        com.google.android.gms.measurement.internal.zzx$2 v5_0 = 0;
        byte[] v3_0 = 0;
        this.zzwu();
        this.zzzg();
        if (this.zzbsf().zzabc()) {
            if (!this.zzbub()) {
                if (this.zzbts().zzadj()) {
                    Integer v8_2 = this.zzyw().currentTimeMillis();
                    this.zzbl((v8_2 - this.zzbsf().zzbrl()));
                    com.google.android.gms.measurement.internal.zzq v0_65 = this.zzbse().ajY.get();
                    if (v0_65 != 0) {
                        this.zzbsd().zzbtb().zzj("Uploading events. Elapsed time since last upload attempt (ms)", Long.valueOf(Math.abs((v8_2 - v0_65))));
                    }
                    String v1_9 = this.zzbry().zzbsg();
                    if (android.text.TextUtils.isEmpty(v1_9)) {
                        com.google.android.gms.measurement.internal.zzq v0_73 = this.zzbry().zzbi((v8_2 - this.zzbsf().zzbrl()));
                        if (!android.text.TextUtils.isEmpty(v0_73)) {
                            String v1_13 = this.zzbry().zzln(v0_73);
                            if (v1_13 != null) {
                                java.net.URL v2_16 = this.zzbsf().zzap(v1_13.zzbps(), v1_13.zzawo());
                                try {
                                    byte[] v3_4 = new java.net.URL(v2_16);
                                    this.zzbsd().zzbtc().zzj("Fetching remote configuration", v1_13.zzsh());
                                    int v4_0 = this.zzbsa().zzmb(v1_13.zzsh());
                                    String v1_1 = this.zzbsa().zzmc(v1_13.zzsh());
                                } catch (com.google.android.gms.measurement.internal.zzq v0) {
                                    this.zzbsd().zzbsv().zzj("Failed to parse config URL. Not fetching", v2_16);
                                }
                                if ((v4_0 != 0) && (!android.text.TextUtils.isEmpty(v1_1))) {
                                    v5_0 = new android.support.v4.util.ArrayMap();
                                    v5_0.put("If-Modified-Since", v1_1);
                                }
                                this.zzbts().zza(v0_73, v3_4, v5_0, new com.google.android.gms.measurement.internal.zzx$3(this));
                            }
                        }
                    } else {
                        int v4_6 = this.zzbry().zzn(v1_9, this.zzbsf().zzlj(v1_9), this.zzbsf().zzlk(v1_9));
                        if (!v4_6.isEmpty()) {
                            java.net.URL v2_2 = v4_6.iterator();
                            while (v2_2.hasNext()) {
                                com.google.android.gms.measurement.internal.zzq v0_12 = ((com.google.android.gms.internal.zzuh$zze) ((android.util.Pair) v2_2.next()).first);
                                if (!android.text.TextUtils.isEmpty(v0_12.anI)) {
                                    String v6_1 = v0_12.anI;
                                }
                                java.net.URL v2_4;
                                if (v6_1 == null) {
                                    v2_4 = v4_6;
                                } else {
                                    java.net.URL v2_3 = 0;
                                    while (v2_3 < v4_6.size()) {
                                        com.google.android.gms.measurement.internal.zzq v0_18 = ((com.google.android.gms.internal.zzuh$zze) ((android.util.Pair) v4_6.get(v2_3)).first);
                                        if ((android.text.TextUtils.isEmpty(v0_18.anI)) || (v0_18.anI.equals(v6_1))) {
                                            v2_3++;
                                        } else {
                                            v2_4 = v4_6.subList(0, v2_3);
                                        }
                                    }
                                }
                                String v6_5 = new com.google.android.gms.internal.zzuh$zzd();
                                com.google.android.gms.measurement.internal.zzq v0_24 = new com.google.android.gms.internal.zzuh$zze[v2_4.size()];
                                v6_5.ans = v0_24;
                                int v4_8 = new java.util.ArrayList(v2_4.size());
                                while (v3_0 < v6_5.ans.length) {
                                    v6_5.ans[v3_0] = ((com.google.android.gms.internal.zzuh$zze) ((android.util.Pair) v2_4.get(v3_0)).first);
                                    v4_8.add(((Long) ((android.util.Pair) v2_4.get(v3_0)).second));
                                    v6_5.ans[v3_0].anH = Long.valueOf(this.zzbsf().zzbpz());
                                    v6_5.ans[v3_0].anx = Long.valueOf(v8_2);
                                    v6_5.ans[v3_0].anN = Boolean.valueOf(this.zzbsf().zzabc());
                                    v3_0++;
                                }
                                com.google.android.gms.measurement.internal.zzq v0_30;
                                if (!this.zzbsd().zzaz(2)) {
                                    v0_30 = 0;
                                } else {
                                    v0_30 = com.google.android.gms.measurement.internal.zzal.zzb(v6_5);
                                }
                                byte[] v3_1 = this.zzbrz().zza(v6_5);
                                String v7_2 = this.zzbsf().zzbrk();
                                try {
                                    java.net.URL v2_9 = new java.net.URL(v7_2);
                                    this.zzad(v4_8);
                                    this.zzbse().ajZ.set(v8_2);
                                    int v4_11 = "?";
                                } catch (com.google.android.gms.measurement.internal.zzq v0) {
                                    this.zzbsd().zzbsv().zzj("Failed to parse upload URL. Not uploading", v7_2);
                                }
                                if (v6_5.ans.length > 0) {
                                    v4_11 = v6_5.ans[0].zzck;
                                }
                                this.zzbsd().zzbtc().zzd("Uploading data. app, uncompressed size, data", v4_11, Integer.valueOf(v3_1.length), v0_30);
                                this.zzbts().zza(v1_9, v2_9, v3_1, 0, new com.google.android.gms.measurement.internal.zzx$2(this));
                            }
                            v6_1 = 0;
                        }
                    }
                } else {
                    this.zzbsd().zzbsx().log("Network not connected, ignoring upload request");
                    this.zzbue();
                }
            } else {
                this.zzbsd().zzbsx().log("Uploading requested multiple times");
            }
        } else {
            com.google.android.gms.measurement.internal.zzq v0_2 = this.zzbse().zzbtj();
            if (v0_2 != null) {
                if (!v0_2.booleanValue()) {
                } else {
                    this.zzbsd().zzbsv().log("Upload called in the client side when service should be used");
                }
            } else {
                this.zzbsd().zzbsx().log("Upload data called on the client side before use of service was decided");
            }
        }
        return;
    }