Wolves Themes v1.0版本的 MD5 值为:cddc92b47f6b7c4a195c9625507eb51c
以下内容为反编译后的 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.List;
import org.json.JSONArray;
import org.json.JSONObject;
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;
String headerField;
try {
List<String> a = this.a.a(false);
JSONArray jSONArray = new JSONArray();
for (String str : a) {
jSONArray.put(new JSONObject(str));
}
HttpURLConnection httpURLConnection2 = null;
try {
try {
httpURLConnection = (HttpURLConnection) a().openConnection();
} catch (Exception e) {
e = e;
}
} catch (Throwable th) {
th = th;
httpURLConnection = httpURLConnection2;
}
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();
if (responseCode == 200) {
this.a.a(a);
} else if (responseCode == 503 && (headerField = httpURLConnection.getHeaderField("Retry-After")) != null) {
this.a.b(headerField);
}
} catch (Exception e2) {
e = e2;
httpURLConnection2 = httpURLConnection;
Log.e("ExceptionTask", e.toString());
if (httpURLConnection2 != null) {
httpURLConnection2.getInputStream().close();
httpURLConnection2.disconnect();
}
} catch (Throwable th2) {
th = th2;
if (httpURLConnection != null) {
httpURLConnection.getInputStream().close();
httpURLConnection.disconnect();
}
throw th;
}
} catch (Exception e3) {
Log.e("ExceptionTask", e3.toString());
}
}
}