package c6;

import A6.n;
import G6.i;
import O6.p;
import android.os.Looper;
import android.widget.TextView;
import b7.u;
import com.google.android.gms.internal.measurement.C1;

/* JADX INFO: renamed from: c6.d, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0588d extends i implements p {

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public int f9362u;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public /* synthetic */ Object f9363v;

    /* JADX INFO: renamed from: w, reason: collision with root package name */
    public final /* synthetic */ TextView f9364w;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C0588d(TextView textView, E6.d dVar) {
        super(2, dVar);
        this.f9364w = textView;
    }

    @Override // O6.p
    public final Object k(Object obj, Object obj2) {
        return ((C0588d) m((E6.d) obj2, (u) obj)).p(n.f457a);
    }

    @Override // G6.a
    public final E6.d m(E6.d dVar, Object obj) {
        C0588d c0588d = new C0588d(this.f9364w, dVar);
        c0588d.f9363v = obj;
        return c0588d;
    }

    @Override // G6.a
    public final Object p(Object obj) throws Throwable {
        F6.a aVar = F6.a.f2580q;
        int i = this.f9362u;
        if (i == 0) {
            C1.N(obj);
            u uVar = (u) this.f9363v;
            if (Looper.getMainLooper() != Looper.myLooper()) {
                throw new IllegalStateException("Must be called on the main application thread");
            }
            C0587c c0587c = new C0587c(0, uVar);
            TextView textView = this.f9364w;
            textView.addTextChangedListener(c0587c);
            Q1.c cVar = new Q1.c(textView, 2, c0587c);
            this.f9362u = 1;
            if (android.support.v4.media.session.a.b(uVar, cVar, this) == aVar) {
                return aVar;
            }
        } else {
            if (i != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            C1.N(obj);
        }
        return n.f457a;
    }
}
