package L2;

import java.lang.ref.WeakReference;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;

/* JADX INFO: loaded from: classes.dex */
public final class c extends Thread {

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public final WeakReference f3987q;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public final long f3988r;

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public final CountDownLatch f3989s = new CountDownLatch(1);

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public boolean f3990t = false;

    public c(b bVar, long j8) {
        this.f3987q = new WeakReference(bVar);
        this.f3988r = j8;
        start();
    }

    @Override // java.lang.Thread, java.lang.Runnable
    public final void run() {
        b bVar;
        WeakReference weakReference = this.f3987q;
        try {
            if (this.f3989s.await(this.f3988r, TimeUnit.MILLISECONDS) || (bVar = (b) weakReference.get()) == null) {
                return;
            }
            bVar.b();
            this.f3990t = true;
        } catch (InterruptedException unused) {
            b bVar2 = (b) weakReference.get();
            if (bVar2 != null) {
                bVar2.b();
                this.f3990t = true;
            }
        }
    }
}
