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 ajl implements View.OnTouchListener {

    /* JADX INFO: renamed from: lb, reason: collision with root package name */
    private static int f6488lb = 10;
    private float fm;
    private com.bytedance.sdk.component.adexpress.dynamic.lb.wu jnr;
    private float ro;
    private boolean yz;

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

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