package com.ironsource; import com.google.firebase.perf.network.FirebasePerfUrlConnection; import com.ironsource.mediationsdk.logger.IronLog; import java.io.DataOutputStream; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLConnection; import kotlin.jvm.internal.Intrinsics; import org.json.JSONObject; /* loaded from: classes2.dex */ public class j9 implements Runnable { private final JSONObject a; public j9(JSONObject stringToSend) { Intrinsics.checkNotNullParameter(stringToSend, "stringToSend"); this.a = stringToSend; } @Override // java.lang.Runnable public void run() { try { IronLog ironLog = IronLog.INTERNAL; ironLog.verbose("preparing to send crashes report"); URLConnection uRLConnection = (URLConnection) FirebasePerfUrlConnection.instrument(new URL(i9.d().h).openConnection()); Intrinsics.checkNotNull(uRLConnection, "null cannot be cast to non-null type java.net.HttpURLConnection"); HttpURLConnection httpURLConnection = (HttpURLConnection) uRLConnection; httpURLConnection.setRequestMethod("POST"); httpURLConnection.setRequestProperty("Content-Type", "application/json;charset=UTF-8"); httpURLConnection.setRequestProperty("Accept", nb.L); httpURLConnection.setDoOutput(true); httpURLConnection.setDoInput(true); DataOutputStream dataOutputStream = new DataOutputStream(httpURLConnection.getOutputStream()); dataOutputStream.writeBytes(this.a.toString()); dataOutputStream.flush(); dataOutputStream.close(); httpURLConnection.getResponseCode(); httpURLConnection.getResponseMessage(); httpURLConnection.disconnect(); ironLog.verbose("sent crash report for type " + this.a.get("crashType") + " and date " + this.a.get("crashDate")); } catch (Exception e) { IronLog.INTERNAL.error(e.toString()); } } }