package Q;

import android.database.ContentObserver;
import android.database.Cursor;
import android.os.Handler;
import com.google.android.gms.internal.measurement.C0727y1;
import java.util.Iterator;
import java.util.concurrent.atomic.AtomicBoolean;
import n.F0;
import n.U0;
import n4.u0;

/* JADX INFO: loaded from: classes.dex */
public final class a extends ContentObserver {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f5537a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ Object f5538b;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ a(int i, Object obj) {
        super(null);
        this.f5537a = i;
        this.f5538b = obj;
    }

    @Override // android.database.ContentObserver
    public boolean deliverSelfNotifications() {
        switch (this.f5537a) {
            case u0.f15495q /* 0 */:
                return true;
            default:
                return super.deliverSelfNotifications();
        }
    }

    @Override // android.database.ContentObserver
    public final void onChange(boolean z8) {
        Cursor cursor;
        switch (this.f5537a) {
            case u0.f15495q /* 0 */:
                F0 f02 = (F0) this.f5538b;
                if (!f02.f5542r || (cursor = f02.f5543s) == null || cursor.isClosed()) {
                    return;
                }
                f02.f5541q = f02.f5543s.requery();
                return;
            case 1:
                ((AtomicBoolean) ((U0) this.f5538b).f14793a).set(true);
                return;
            default:
                C0727y1 c0727y1 = (C0727y1) this.f5538b;
                synchronized (c0727y1.f10075e) {
                    c0727y1.f10076f = null;
                    c0727y1.f10073c.run();
                    break;
                }
                synchronized (c0727y1) {
                    try {
                        Iterator it = c0727y1.f10077g.iterator();
                        if (it.hasNext()) {
                            if (it.next() != null) {
                                throw new ClassCastException();
                            }
                            throw null;
                        }
                    } catch (Throwable th) {
                        throw th;
                    }
                }
                return;
        }
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public a(F0 f02) {
        super(new Handler());
        this.f5537a = 0;
        this.f5538b = f02;
    }
}
