package B0;

import android.os.Bundle;
import android.os.SystemClock;
import android.text.TextUtils;
import d5.AbstractC0844a;
import u0.C1579o;
import x0.AbstractC1709a;

/* JADX INFO: renamed from: B0.q, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0030q extends u0.G {

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public final int f872s;

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public final String f873t;

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public final int f874u;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public final C1579o f875v;

    /* JADX INFO: renamed from: w, reason: collision with root package name */
    public final int f876w;

    /* JADX INFO: renamed from: x, reason: collision with root package name */
    public final L0.C f877x;

    /* JADX INFO: renamed from: y, reason: collision with root package name */
    public final boolean f878y;

    public C0030q(int i, Exception exc, int i5) {
        this(i, exc, i5, null, -1, null, 4, false);
    }

    public final C0030q a(L0.C c3) {
        String message = getMessage();
        int i = x0.v.f18553a;
        return new C0030q(message, getCause(), this.f17156q, this.f872s, this.f873t, this.f874u, this.f875v, this.f876w, c3, this.f17157r, this.f878y);
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C0030q(String str, Throwable th, int i, int i5, String str2, int i8, C1579o c1579o, int i9, L0.C c3, long j8, boolean z8) {
        super(str, th, i, j8);
        Bundle bundle = Bundle.EMPTY;
        AbstractC1709a.d(!z8 || i5 == 1);
        AbstractC1709a.d(th != null || i5 == 3);
        this.f872s = i5;
        this.f873t = str2;
        this.f874u = i8;
        this.f875v = c1579o;
        this.f876w = i9;
        this.f877x = c3;
        this.f878y = z8;
    }

    /* JADX WARN: Illegal instructions before constructor call */
    public C0030q(int i, Exception exc, int i5, String str, int i8, C1579o c1579o, int i9, boolean z8) {
        String str2;
        int i10;
        C1579o c1579o2;
        String string;
        String str3;
        if (i == 0) {
            str2 = str;
            i10 = i8;
            c1579o2 = c1579o;
            string = "Source error";
        } else if (i != 1) {
            if (i != 3) {
                string = "Unexpected runtime error";
            } else {
                string = "Remote error";
            }
            str2 = str;
            i10 = i8;
            c1579o2 = c1579o;
        } else {
            StringBuilder sb = new StringBuilder();
            str2 = str;
            sb.append(str2);
            sb.append(" error, index=");
            i10 = i8;
            sb.append(i10);
            sb.append(", format=");
            c1579o2 = c1579o;
            sb.append(c1579o2);
            sb.append(", format_supported=");
            int i11 = x0.v.f18553a;
            if (i9 == 0) {
                str3 = "NO";
            } else if (i9 == 1) {
                str3 = "NO_UNSUPPORTED_TYPE";
            } else if (i9 == 2) {
                str3 = "NO_UNSUPPORTED_DRM";
            } else if (i9 == 3) {
                str3 = "NO_EXCEEDS_CAPABILITIES";
            } else if (i9 == 4) {
                str3 = "YES";
            } else {
                throw new IllegalStateException();
            }
            sb.append(str3);
            string = sb.toString();
        }
        this(TextUtils.isEmpty(null) ? string : AbstractC0844a.l(string, ": null"), exc, i5, i, str2, i10, c1579o2, i9, null, SystemClock.elapsedRealtime(), z8);
    }
}
