package com.fyber.inneractive.sdk.player.controller; import android.annotation.SuppressLint; import android.media.AudioManager; import com.fyber.inneractive.sdk.config.IAConfigManager; import com.fyber.inneractive.sdk.config.e0; import com.fyber.inneractive.sdk.config.enums.Skip; import com.fyber.inneractive.sdk.config.enums.TapAction; import com.fyber.inneractive.sdk.config.f0; import com.fyber.inneractive.sdk.config.global.features.r; import com.fyber.inneractive.sdk.player.enums.VideoClickOrigin; import com.fyber.inneractive.sdk.util.IAlog; import com.fyber.inneractive.sdk.util.p0; /* loaded from: classes2.dex */ public final class e extends o { public final boolean C; public boolean D; public final boolean E; public e(com.fyber.inneractive.sdk.player.e eVar, com.fyber.inneractive.sdk.player.ui.s sVar, f0 f0Var, com.fyber.inneractive.sdk.config.global.s sVar2, boolean z, Skip skip, boolean z2, String str, boolean z3) { super(eVar, sVar, f0Var, sVar2, z, skip, str, z3); this.D = false; this.C = false; this.E = z2; } @Override // com.fyber.inneractive.sdk.player.controller.o, com.fyber.inneractive.sdk.player.controller.b public final void e(boolean z) { i iVar; com.fyber.inneractive.sdk.player.enums.b bVar; super.e(z); if (this.C) { this.d.o(); this.d.h(false); this.f = 0; } w(); com.fyber.inneractive.sdk.player.c cVar = this.a; this.d.d((cVar == null || (iVar = cVar.b) == null || ((bVar = iVar.e) != com.fyber.inneractive.sdk.player.enums.b.Preparing && bVar != com.fyber.inneractive.sdk.player.enums.b.Prepared)) ? false : true); this.d.f(false); com.fyber.inneractive.sdk.player.ui.s sVar = this.d; com.fyber.inneractive.sdk.player.ui.c cVar2 = new com.fyber.inneractive.sdk.player.ui.c(); cVar2.b = false; sVar.c(new com.fyber.inneractive.sdk.player.ui.b(cVar2)); } @Override // com.fyber.inneractive.sdk.player.controller.o @SuppressLint({"NewApi"}) public final void j() { int i; int i2; com.fyber.inneractive.sdk.player.c cVar; i iVar; i iVar2; AudioManager audioManager; super.j(); com.fyber.inneractive.sdk.player.c cVar2 = this.a; if (cVar2 != null && cVar2.b != null && !this.D) { try { audioManager = (AudioManager) this.d.getContext().getSystemService("audio"); i = audioManager.getRingerMode(); } catch (Throwable unused) { i = 0; } try { i2 = audioManager.getStreamVolume(2); } catch (Throwable unused2) { i2 = 0; if (this.C) { } if (i2 > 0) { IAlog.a("%s setting default volume. unmuting player", IAlog.a(this)); cVar = this.a; if (cVar != null) { iVar.d(false); } this.d.setMuteButtonState(false); } this.d.setMuteButtonState(o()); this.D = true; h(false); } if ((this.C && ((e0) this.b).f.d.booleanValue()) || this.E || o()) { com.fyber.inneractive.sdk.player.c cVar3 = this.a; if (cVar3 != null && (iVar2 = cVar3.b) != null) { iVar2.b(false); } this.d.setMuteButtonState(true); } else if (i2 > 0 && i == 2) { IAlog.a("%s setting default volume. unmuting player", IAlog.a(this)); cVar = this.a; if (cVar != null && (iVar = cVar.b) != null) { iVar.d(false); } this.d.setMuteButtonState(false); } this.d.setMuteButtonState(o()); this.D = true; } h(false); } @Override // com.fyber.inneractive.sdk.player.controller.o public final int m() { return IAConfigManager.L.t.b.a(12, 1, "VideoFullscreenBufferingTimeout") * 1000; } /* JADX WARN: Can't wrap try/catch for region: R(16:0|1|(2:5|(13:7|8|(2:10|(1:51))(1:52)|13|14|15|(6:17|18|(1:23)|(1:(1:(2:34|(1:39)(2:37|38)))(2:27|28))(1:(2:43|(1:45)(2:46|47)))|32|33)|49|18|(2:21|23)|(0)(0)|32|33))|53|8|(0)(0)|13|14|15|(0)|49|18|(0)|(0)(0)|32|33) */ /* JADX WARN: Removed duplicated region for block: B:10:0x0038 */ /* JADX WARN: Removed duplicated region for block: B:17:0x0067 A[Catch: Exception -> 0x0074, TRY_LEAVE, TryCatch #0 {Exception -> 0x0074, blocks: (B:15:0x005f, B:17:0x0067), top: B:14:0x005f }] */ /* JADX WARN: Removed duplicated region for block: B:20:0x007b A[ADDED_TO_REGION] */ /* JADX WARN: Removed duplicated region for block: B:25:0x0087 */ /* JADX WARN: Removed duplicated region for block: B:41:0x00a7 */ /* JADX WARN: Removed duplicated region for block: B:52:0x0045 */ @Override // com.fyber.inneractive.sdk.player.controller.o /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public final int n() { /* r10 = this; com.fyber.inneractive.sdk.config.global.s r0 = r10.c if (r0 == 0) goto L31 java.lang.Class r1 = com.fyber.inneractive.sdk.config.global.features.b.class com.fyber.inneractive.sdk.config.global.features.g r0 = r0.a(r1) if (r0 == 0) goto L31 com.fyber.inneractive.sdk.config.global.s r0 = r10.c com.fyber.inneractive.sdk.config.global.features.g r0 = r0.a(r1) com.fyber.inneractive.sdk.config.global.features.b r0 = (com.fyber.inneractive.sdk.config.global.features.b) r0 r0.getClass() java.util.ArrayList r2 = new java.util.ArrayList java.util.HashMap r0 = r0.c java.util.Collection r0 = r0.values() r2.(r0) int r0 = r2.size() if (r0 <= 0) goto L31 com.fyber.inneractive.sdk.config.global.s r0 = r10.c com.fyber.inneractive.sdk.config.global.features.g r0 = r0.a(r1) com.fyber.inneractive.sdk.config.global.features.b r0 = (com.fyber.inneractive.sdk.config.global.features.b) r0 goto L32 L31: r0 = 0 L32: r1 = 8 r2 = 5 r3 = -1 if (r0 == 0) goto L45 java.lang.String r4 = "skip_time_sec" int r0 = r0.a(r4, r2) if (r0 < 0) goto L43 if (r0 > r1) goto L43 goto L46 L43: r0 = r2 goto L46 L45: r0 = r3 L46: com.fyber.inneractive.sdk.config.IAConfigManager r4 = com.fyber.inneractive.sdk.config.IAConfigManager.L com.fyber.inneractive.sdk.config.m r4 = r4.t com.fyber.inneractive.sdk.config.k r4 = r4.b com.fyber.inneractive.sdk.config.f0 r5 = r10.b com.fyber.inneractive.sdk.config.enums.Skip r6 = r10.A boolean r7 = com.fyber.inneractive.sdk.external.InneractiveAdManager.isCurrentUserAChild() java.lang.String r8 = "vast_configuration" com.fyber.inneractive.sdk.config.h r4 = r4.a(r8) java.lang.String r8 = "skip_d" r4.getClass() java.util.HashMap r9 = r4.a // Catch: java.lang.Exception -> L74 boolean r9 = r9.containsKey(r8) // Catch: java.lang.Exception -> L74 if (r9 == 0) goto L74 java.util.HashMap r4 = r4.a // Catch: java.lang.Exception -> L74 java.lang.Object r4 = r4.get(r8) // Catch: java.lang.Exception -> L74 java.lang.String r4 = (java.lang.String) r4 // Catch: java.lang.Exception -> L74 int r4 = java.lang.Integer.parseInt(r4) // Catch: java.lang.Exception -> L74 goto L75 L74: r4 = r3 L75: int r4 = java.lang.Math.max(r4, r3) if (r6 != 0) goto L85 if (r5 == 0) goto L85 com.fyber.inneractive.sdk.config.e0 r5 = (com.fyber.inneractive.sdk.config.e0) r5 com.fyber.inneractive.sdk.config.g0 r5 = r5.f if (r5 == 0) goto L85 com.fyber.inneractive.sdk.config.enums.Skip r6 = r5.h L85: if (r7 == 0) goto La7 if (r0 <= r3) goto L8d if (r0 > r1) goto L8d r2 = r0 goto Lbd L8d: if (r4 <= r3) goto L92 if (r4 > r1) goto L92 goto Lab L92: java.lang.Integer r0 = r6.value() int r0 = r0.intValue() if (r0 <= r3) goto Lbd if (r0 > r1) goto Lbd java.lang.Integer r0 = r6.value() int r2 = r0.intValue() goto Lbd La7: if (r4 <= r3) goto Lad if (r4 > r2) goto Lad Lab: r2 = r4 goto Lbd Lad: com.fyber.inneractive.sdk.config.enums.Skip r0 = com.fyber.inneractive.sdk.config.enums.Skip.DEFAULT if (r6 != r0) goto Lb5 r2 = 99999(0x1869f, float:1.40128E-40) goto Lbd Lb5: java.lang.Integer r0 = r6.value() int r2 = r0.intValue() Lbd: return r2 */ throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.controller.e.n():int"); } @Override // com.fyber.inneractive.sdk.player.controller.o public final void s() { this.d.h(true); w(); l(); j(); h(true); } @Override // com.fyber.inneractive.sdk.player.controller.o public final void u() { super.u(); this.d.d(false); if (this.C) { this.d.o(); } } @Override // com.fyber.inneractive.sdk.player.controller.o public final boolean v() { return !this.C; } @Override // com.fyber.inneractive.sdk.player.controller.o public final void x() { i iVar; super.x(); com.fyber.inneractive.sdk.player.c cVar = this.a; if (cVar == null || (iVar = cVar.b) == null || !iVar.e.equals(com.fyber.inneractive.sdk.player.enums.b.Completed) || !this.C) { return; } this.d.o(); } @Override // com.fyber.inneractive.sdk.player.controller.o, com.fyber.inneractive.sdk.player.ui.m public final void a(boolean z) { com.fyber.inneractive.sdk.player.c cVar; i iVar; if (z && (cVar = this.a) != null && (iVar = cVar.b) != null && !iVar.e.equals(com.fyber.inneractive.sdk.player.enums.b.Completed) && !this.d.i()) { h(false); } super.a(z); } @Override // com.fyber.inneractive.sdk.player.controller.o, com.fyber.inneractive.sdk.player.ui.m public final void b() { if (!this.h) { j(); return; } if (this.d.i()) { return; } this.d.a(false); Runnable runnable = this.j; if (runnable != null) { this.d.removeCallbacks(runnable); this.j = null; } x(); this.k = false; this.h = true; } @Override // com.fyber.inneractive.sdk.player.controller.o public final void q() { ListenerT listenert = this.g; if (listenert != 0) { listenert.q(); } } @Override // com.fyber.inneractive.sdk.player.controller.o public final void p() { this.u = true; IAlog.a("%s onBufferingTimeout reached. Skipping to end card", IAlog.a(this)); b(false); } @Override // com.fyber.inneractive.sdk.player.controller.o public final void a(p0 p0Var) { com.fyber.inneractive.sdk.player.ui.s sVar; TapAction tapAction = ((e0) this.b).f.i; if (tapAction == TapAction.CTR) { a(false, VideoClickOrigin.VIDEO, p0Var); return; } if (tapAction != TapAction.FULLSCREEN && tapAction != TapAction.DO_NOTHING) { IAlog.a("% sonVideoClicked called, but we recieved an unknown tap action %s", IAlog.a(this), tapAction); return; } if (((com.fyber.inneractive.sdk.config.global.features.r) this.c.a(com.fyber.inneractive.sdk.config.global.features.r.class)).d().equals(r.b.OPEN) || ((this.w != com.fyber.inneractive.sdk.ignite.l.NONE && IAConfigManager.L.D.m()) || ((sVar = this.d) != null && sVar.a()))) { a(false, VideoClickOrigin.VIDEO, p0Var); } } }