package l;

import android.view.MotionEvent;
import android.view.View;

/* JADX INFO: loaded from: classes.dex */
public final class g2 implements View.OnTouchListener {

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

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

    public /* synthetic */ g2(Object obj, int i10) {
        this.f29688a = i10;
        this.f29689b = obj;
    }

    @Override // android.view.View.OnTouchListener
    public final boolean onTouch(View view, MotionEvent motionEvent) {
        h2 h2Var;
        h0 h0Var;
        switch (this.f29688a) {
            case 0:
                int action = motionEvent.getAction();
                int x10 = (int) motionEvent.getX();
                int y10 = (int) motionEvent.getY();
                Object obj = this.f29689b;
                if (action == 0 && (h0Var = (h2Var = (h2) obj).f29707e0) != null && h0Var.isShowing() && x10 >= 0 && x10 < h2Var.f29707e0.getWidth() && y10 >= 0 && y10 < h2Var.f29707e0.getHeight()) {
                    h2Var.f29699a0.postDelayed(h2Var.W, 250L);
                } else if (action == 1) {
                    h2 h2Var2 = (h2) obj;
                    h2Var2.f29699a0.removeCallbacks(h2Var2.W);
                }
                break;
        }
        return false;
    }
}
