VegeFruits v7.1版本的 MD5 值为:2ff167dfba698c783e879938fe00b9ce

以下内容为反编译后的 b.java 源代码,内容仅作参考


package com.appodeal.ads.utils.c;

import android.util.Log;
import java.io.DataOutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.Charset;
import java.util.Iterator;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONObject;
import org.nexage.sourcekit.vast.model.VASTModel;

public class b implements Runnable {
    private final c a;

    public b(c cVar) {
        this.a = cVar;
    }

    URL a() {
        return new URL("https://ach.appodeal.com/api/v0/android/crashes");
    }

    @Override
    public void run() {
        HttpURLConnection httpURLConnection;
        try {
            List<String> a = this.a.a(false);
            JSONArray jSONArray = new JSONArray();
            Iterator<String> it = a.iterator();
            while (it.hasNext()) {
                jSONArray.put(new JSONObject(it.next()));
            }
            HttpURLConnection httpURLConnection2 = null;
            httpURLConnection2 = null;
            try {
                try {
                    httpURLConnection = (HttpURLConnection) a().openConnection();
                } catch (Throwable th) {
                    th = th;
                }
            } catch (Exception e) {
                e = e;
            }
            try {
                httpURLConnection.setConnectTimeout(10000);
                httpURLConnection.setReadTimeout(10000);
                httpURLConnection.setRequestProperty("Content-Type", "application/json; charset=UTF-8");
                httpURLConnection.setDoOutput(true);
                httpURLConnection.setRequestMethod("POST");
                DataOutputStream dataOutputStream = new DataOutputStream(httpURLConnection.getOutputStream());
                dataOutputStream.write(jSONArray.toString().getBytes(Charset.forName("UTF-8")));
                dataOutputStream.flush();
                dataOutputStream.close();
                int responseCode = httpURLConnection.getResponseCode();
                httpURLConnection2 = responseCode;
                switch (responseCode) {
                    case VASTModel.ERROR_CODE_BAD_MODEL:
                        c cVar = this.a;
                        cVar.a(a);
                        httpURLConnection2 = cVar;
                        break;
                    case 503:
                        String headerField = httpURLConnection.getHeaderField("Retry-After");
                        httpURLConnection2 = headerField;
                        if (headerField != null) {
                            this.a.b(headerField);
                            httpURLConnection2 = headerField;
                            break;
                        }
                        break;
                }
                if (httpURLConnection != null) {
                    httpURLConnection.disconnect();
                }
            } catch (Exception e2) {
                httpURLConnection2 = httpURLConnection;
                e = e2;
                Log.e("ExceptionTask", e.toString());
                if (httpURLConnection2 != null) {
                    httpURLConnection2.disconnect();
                }
            } catch (Throwable th2) {
                httpURLConnection2 = httpURLConnection;
                th = th2;
                if (httpURLConnection2 != null) {
                    httpURLConnection2.disconnect();
                }
                throw th;
            }
        } catch (Exception e3) {
            Log.e("ExceptionTask", e3.toString());
        }
    }
}