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

import android.view.MotionEvent;
import android.view.View;
import com.bytedance.sdk.component.adexpress.dynamic.lb.ef;

/* JADX INFO: loaded from: classes.dex */
public class ro implements View.OnTouchListener {
    private com.bytedance.sdk.component.adexpress.dynamic.lb.wu ajl;
    private float fm;
    private ef jnr;

    /* JADX INFO: renamed from: lb, reason: collision with root package name */
    private long f6494lb;
    private float ro;
    private boolean yz;

    public ro(ef efVar, com.bytedance.sdk.component.adexpress.dynamic.lb.wu wuVar) {
        this.jnr = efVar;
        this.ajl = wuVar;
    }

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