package u6;

import android.os.Looper;
import java.util.HashSet;
import java.util.Iterator;

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

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final HashSet f17846a = new HashSet();

    public final void a() {
        if (U2.a.f6685g == null) {
            U2.a.f6685g = Looper.getMainLooper().getThread();
        }
        if (Thread.currentThread() != U2.a.f6685g) {
            throw new IllegalStateException("Must be called on the Main thread.");
        }
        Iterator it = this.f17846a.iterator();
        if (it.hasNext()) {
            it.next().getClass();
            throw new ClassCastException();
        }
    }
}
