package i8; import android.os.Bundle; import android.util.Log; import com.vungle.warren.VungleApiClient; import com.vungle.warren.model.p; import g8.d; import java.io.IOException; import java.util.List; /* loaded from: classes2.dex */ public class k implements e { /* renamed from: c, reason: collision with root package name */ static final String f10961c = "i8.k"; /* renamed from: a, reason: collision with root package name */ private g8.j f10962a; /* renamed from: b, reason: collision with root package name */ private VungleApiClient f10963b; public k(g8.j jVar, VungleApiClient vungleApiClient) { this.f10962a = jVar; this.f10963b = vungleApiClient; } public static g b(boolean z10) { Bundle bundle = new Bundle(); bundle.putBoolean("sendAll", z10); return new g(f10961c).k(bundle).l(5).n(30000L, 1); } @Override // i8.e public int a(Bundle bundle, h hVar) { d8.e c10; List

list = bundle.getBoolean("sendAll", false) ? (List) this.f10962a.a0().get() : (List) this.f10962a.c0().get(); if (list == null) { return 1; } for (p pVar : list) { try { c10 = this.f10963b.A(pVar.n()).c(); } catch (d.a unused) { } catch (IOException e10) { Log.d(f10961c, "SendReportsJob: IOEx"); for (p pVar2 : list) { pVar2.k(3); try { this.f10962a.h0(pVar2); } catch (d.a unused2) { return 1; } } Log.e(f10961c, Log.getStackTraceString(e10)); return 2; } if (c10.b() == 200) { this.f10962a.s(pVar); } else { pVar.k(3); this.f10962a.h0(pVar); long t10 = this.f10963b.t(c10); if (t10 > 0) { hVar.a(b(false).j(t10)); return 1; } } } return 0; } }