package com.bytedance.sdk.component.adexpress.dynamic.lb.fm;

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

/* JADX INFO: loaded from: classes.dex */
public class jnr implements View.OnTouchListener {
    private float fm;
    private int jnr;

    /* JADX INFO: renamed from: lb, reason: collision with root package name */
    private boolean f6491lb;
    private float ro;
    private com.bytedance.sdk.component.adexpress.dynamic.lb.wu yz;

    public jnr(com.bytedance.sdk.component.adexpress.dynamic.lb.wu wuVar, int i10) {
        this.yz = wuVar;
        this.jnr = i10;
    }

    @Override // android.view.View.OnTouchListener
    public boolean onTouch(View view, MotionEvent motionEvent) {
        com.bytedance.sdk.component.adexpress.dynamic.lb.wu wuVar;
        int action = motionEvent.getAction();
        if (action == 0) {
            this.fm = motionEvent.getY();
        } else if (action != 1) {
            if (action == 2) {
                float y10 = motionEvent.getY();
                this.ro = y10;
                if (Math.abs(y10 - this.fm) > 10.0f) {
                    this.f6491lb = true;
                }
            }
        } else {
            if (!this.f6491lb) {
                return false;
            }
            int iRo = com.bytedance.sdk.component.adexpress.yz.wsy.ro(com.bytedance.sdk.component.adexpress.yz.fm(), Math.abs(this.ro - this.fm));
            if (this.ro - this.fm < 0.0f && iRo > this.jnr && (wuVar = this.yz) != null) {
                wuVar.fm();
                this.fm = 0.0f;
                this.ro = 0.0f;
                this.f6491lb = false;
            }
        }
        return true;
    }
}
