package o;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.ug, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C2638ug {
    public boolean a;
    public InterfaceC2543tg b;
    public boolean c;

    public final void a(InterfaceC2543tg interfaceC2543tg) {
        synchronized (this) {
            while (this.c) {
                try {
                    try {
                        wait();
                    } catch (InterruptedException unused) {
                    }
                } finally {
                }
            }
            if (this.b == interfaceC2543tg) {
                return;
            }
            this.b = interfaceC2543tg;
            if (this.a) {
                interfaceC2543tg.onCancel();
            }
        }
    }
}
