拼多多跨境 v1.0.0版本的 MD5 值为:46d7e086dc764eefcdcf4fedc6f7a054
以下内容为反编译后的 b.java 源代码,内容仅作参考
package co.median.android;
import H0.I;
import android.content.Context;
import android.os.AsyncTask;
import java.io.OutputStreamWriter;
import java.lang.ref.WeakReference;
import java.net.HttpURLConnection;
import java.net.URL;
import org.json.JSONException;
import org.json.JSONObject;
public class b {
private static final String f6844b = "co.median.android.b";
private Context f6845a;
private static class a extends AsyncTask {
WeakReference f6846a;
a(Context context) {
this.f6846a = new WeakReference(context);
}
@Override
public Void doInBackground(Void... voidArr) {
Context context = (Context) this.f6846a.get();
if (context == null) {
return null;
}
JSONObject jSONObject = new JSONObject(I.b(context));
try {
jSONObject.put("event", "launch");
try {
HttpURLConnection httpURLConnection = (HttpURLConnection) new URL("https://events.gonative.io/api/events/new").openConnection();
httpURLConnection.setRequestMethod("POST");
httpURLConnection.setRequestProperty("Content-Type", "application/json");
httpURLConnection.setDoOutput(true);
httpURLConnection.setDoInput(false);
OutputStreamWriter outputStreamWriter = new OutputStreamWriter(httpURLConnection.getOutputStream(), "UTF-8");
outputStreamWriter.write(jSONObject.toString());
outputStreamWriter.close();
httpURLConnection.connect();
httpURLConnection.getResponseCode();
httpURLConnection.disconnect();
} catch (Exception e2) {
L0.f.a().c(b.f6844b, e2.getMessage(), e2);
}
return null;
} catch (JSONException e3) {
L0.f.a().c(b.f6844b, e3.getMessage(), e3);
return null;
}
}
}
public b(Context context) {
this.f6845a = context;
}
public void b() {
if (L0.a.U(this.f6845a).f1227p) {
return;
}
new a(this.f6845a).execute(new Void[0]);
}
}