package o;

import android.view.View;
import android.view.ViewConfiguration;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public abstract class JB implements View.OnTouchListener, View.OnAttachStateChangeListener {
    public final float l;
    public final int m;
    public final int n;

    /* renamed from: o, reason: collision with root package name */
    public final View f168o;
    public IB p;
    public IB q;
    public boolean r;
    public int s;
    public final int[] t = new int[2];

    public JB(View view) {
        this.f168o = view;
        view.setLongClickable(true);
        view.addOnAttachStateChangeListener(this);
        this.l = ViewConfiguration.get(view.getContext()).getScaledTouchSlop();
        int tapTimeout = ViewConfiguration.getTapTimeout();
        this.m = tapTimeout;
        this.n = (ViewConfiguration.getLongPressTimeout() + tapTimeout) / 2;
    }

    public final void a() {
        IB ib = this.q;
        View view = this.f168o;
        if (ib != null) {
            view.removeCallbacks(ib);
        }
        IB ib2 = this.p;
        if (ib2 != null) {
            view.removeCallbacks(ib2);
        }
    }

    public abstract D80 b();

    public abstract boolean c();

    public boolean d() {
        D80 d80B = b();
        if (d80B == null || !d80B.b()) {
            return true;
        }
        d80B.dismiss();
        return true;
    }

    /* JADX WARN: Removed duplicated region for block: B:22:0x005c  */
    /* JADX WARN: Removed duplicated region for block: B:24:0x0062  */
    /* JADX WARN: Removed duplicated region for block: B:50:0x00cb  */
    /* JADX WARN: Removed duplicated region for block: B:60:0x0100  */
    @Override // android.view.View.OnTouchListener
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final boolean onTouch(android.view.View r13, android.view.MotionEvent r14) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException {
        /*
            Method dump skipped, instructions count: 284
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.JB.onTouch(android.view.View, android.view.MotionEvent):boolean");
    }

    @Override // android.view.View.OnAttachStateChangeListener
    public final void onViewDetachedFromWindow(View view) {
        this.r = false;
        this.s = -1;
        IB ib = this.p;
        if (ib != null) {
            this.f168o.removeCallbacks(ib);
        }
    }

    @Override // android.view.View.OnAttachStateChangeListener
    public final void onViewAttachedToWindow(View view) {
    }
}
