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 wu implements View.OnTouchListener {
    private float ajl;
    private final com.bytedance.sdk.component.adexpress.dynamic.lb.wu fm;
    private float jnr;

    /* JADX INFO: renamed from: lb, reason: collision with root package name */
    private final int f6497lb = 10;
    private final boolean ro;
    private float wsy;
    private float yz;

    public wu(com.bytedance.sdk.component.adexpress.dynamic.lb.wu wuVar, boolean z10) {
        this.fm = wuVar;
        this.ro = z10;
    }

    @Override // android.view.View.OnTouchListener
    public boolean onTouch(View view, MotionEvent motionEvent) {
        com.bytedance.sdk.component.adexpress.dynamic.lb.wu wuVar;
        com.bytedance.sdk.component.adexpress.dynamic.lb.wu wuVar2;
        int action = motionEvent.getAction();
        if (action == 0) {
            this.yz = motionEvent.getX();
            this.jnr = motionEvent.getY();
            new StringBuilder(", mStartY: ").append(this.jnr);
        } else if (action == 1) {
            this.ajl = motionEvent.getX();
            this.wsy = motionEvent.getY();
            new StringBuilder(", mEndY: ").append(this.wsy);
            if (this.ro || (wuVar2 = this.fm) == null) {
                float f10 = this.ajl - this.yz;
                float f11 = this.wsy - this.jnr;
                if (com.bytedance.sdk.component.adexpress.yz.wsy.ro(com.bytedance.sdk.component.adexpress.yz.fm(), Math.abs((float) Math.sqrt((f11 * f11) + (f10 * f10)))) > 10.0f && (wuVar = this.fm) != null) {
                    wuVar.fm();
                }
            } else {
                wuVar2.fm();
            }
        }
        return true;
    }
}
