package com.applovin.impl; import android.os.Bundle; import android.os.SystemClock; import android.text.TextUtils; import com.applovin.impl.o2; import java.io.IOException; /* loaded from: classes.dex */ public final class a8 extends nh { public static final o2.a l = new o2.a() { // from class: com.applovin.impl.a8$$ExternalSyntheticLambda0 @Override // com.applovin.impl.o2.a public final o2 a(Bundle bundle) { return a8.$r8$lambda$EmiKJ7f3R_W6NXDeEcT0iqE9T2w(bundle); } }; public final int d; public final String f; public final int g; public final f9 h; public final int i; public final yd j; final boolean k; public static /* synthetic */ a8 $r8$lambda$EmiKJ7f3R_W6NXDeEcT0iqE9T2w(Bundle bundle) { return new a8(bundle); } public static a8 a(Throwable th, String str, int i, f9 f9Var, int i2, boolean z, int i3) { return new a8(1, th, null, i3, str, i, f9Var, f9Var == null ? 4 : i2, z); } private a8(int i, Throwable th, int i2) { this(i, th, null, i2, null, -1, null, 4, false); } public static a8 a(RuntimeException runtimeException) { return a(runtimeException, 1000); } private a8(int i, Throwable th, String str, int i2, String str2, int i3, f9 f9Var, int i4, boolean z) { this(a(i, str, str2, i3, f9Var, i4), th, i2, i, str2, i3, f9Var, i4, null, SystemClock.elapsedRealtime(), z); } private a8(Bundle bundle) { super(bundle); this.d = bundle.getInt(nh.b(1001), 2); this.f = bundle.getString(nh.b(1002)); this.g = bundle.getInt(nh.b(1003), -1); this.h = (f9) p2.a(f9.I, bundle.getBundle(nh.b(1004))); this.i = bundle.getInt(nh.b(1005), 4); this.k = bundle.getBoolean(nh.b(1006), false); this.j = null; } private static String a(int i, String str, String str2, int i2, f9 f9Var, int i3) { String str3; if (i == 0) { str3 = "Source error"; } else if (i != 1) { str3 = i != 3 ? "Unexpected runtime error" : "Remote error"; } else { str3 = str2 + " error, index=" + i2 + ", format=" + f9Var + ", format_supported=" + t2.b(i3); } if (TextUtils.isEmpty(str)) { return str3; } return str3 + ": " + str; } public static a8 a(IOException iOException, int i) { return new a8(0, iOException, i); } public static a8 a(RuntimeException runtimeException, int i) { return new a8(2, runtimeException, i); } public a8 a(yd ydVar) { return new a8((String) xp.a((Object) getMessage()), getCause(), this.a, this.d, this.f, this.g, this.h, this.i, ydVar, this.b, this.k); } private a8(String str, Throwable th, int i, int i2, String str2, int i3, f9 f9Var, int i4, yd ydVar, long j, boolean z) { super(str, th, i, j); b1.a(!z || i2 == 1); b1.a(th != null || i2 == 3); this.d = i2; this.f = str2; this.g = i3; this.h = f9Var; this.i = i4; this.j = ydVar; this.k = z; } }