package com.mbridge.msdk.tracker.network; import android.text.TextUtils; import com.mbridge.msdk.foundation.tools.af; import com.mbridge.msdk.playercommon.exoplayer2.source.chunk.ChunkedTrackBlacklistUtil; import java.util.HashMap; import java.util.Map; /* loaded from: classes4.dex */ public abstract class i extends u { protected static final String a = "i"; private final long b; private Map c; private Map d; private z e; private boolean f; public final void a(boolean z) { this.f = z; } public i(int i, String str, int i2, String str2, long j) { super(i, str, i2, str2); this.f = false; if (j > 0) { this.b = j; } else { this.b = ChunkedTrackBlacklistUtil.DEFAULT_TRACK_BLACKLIST_MS; } } public final void a(Map map) { if (map == null || map.isEmpty()) { return; } if (this.c == null) { this.c = new HashMap(); } try { this.c.putAll(map); } catch (Exception e) { af.b(a, "addParams error: " + e.getMessage()); } } public final void a(String str, String str2) { if (TextUtils.isEmpty(str)) { return; } if (this.d == null) { this.d = new HashMap(); } try { this.d.put(str, str2); } catch (Exception e) { af.b(a, "addHeader error: " + e.getMessage()); } } @Override // com.mbridge.msdk.tracker.network.u public final Map c() { if (this.d == null) { this.d = new HashMap(); } this.d.put("Charset", "UTF-8"); return this.d; } @Override // com.mbridge.msdk.tracker.network.u public final Map a() { if (this.c == null) { this.c = new HashMap(); } return this.c; } @Override // com.mbridge.msdk.tracker.network.u public final boolean d() { return this.f && com.mbridge.msdk.foundation.same.d.a(f(), k()); } @Override // com.mbridge.msdk.tracker.network.u public final z b() { if (this.e == null) { this.e = new e(30000, this.b, 3); } return this.e; } }