package D0;

import android.os.SystemClock;

/* JADX INFO: loaded from: classes.dex */
public final class C {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public Exception f1430a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public long f1431b = -9223372036854775807L;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public long f1432c = -9223372036854775807L;

    public final void a(Exception exc) {
        boolean z8;
        long jElapsedRealtime = SystemClock.elapsedRealtime();
        if (this.f1430a == null) {
            this.f1430a = exc;
        }
        if (this.f1431b == -9223372036854775807L) {
            synchronized (F.f1435j0) {
                z8 = F.f1437l0 > 0;
            }
            if (!z8) {
                this.f1431b = 200 + jElapsedRealtime;
            }
        }
        long j8 = this.f1431b;
        if (j8 == -9223372036854775807L || jElapsedRealtime < j8) {
            this.f1432c = jElapsedRealtime + 50;
            return;
        }
        Exception exc2 = this.f1430a;
        if (exc2 != exc) {
            exc2.addSuppressed(exc);
        }
        Exception exc3 = this.f1430a;
        this.f1430a = null;
        this.f1431b = -9223372036854775807L;
        this.f1432c = -9223372036854775807L;
        throw exc3;
    }
}
