package o; import android.content.Context; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.VelocityTracker; import android.view.View; import android.view.ViewConfiguration; import android.widget.OverScroller; import androidx.coordinatorlayout.widget.CoordinatorLayout; import androidx.core.view.ViewCompat; import org.bouncycastle.asn1.cmp.PKIFailureInfo; /* loaded from: classes2.dex */ public abstract class xVN extends JFA { OverScroller a; private int b; private boolean c; private Runnable d; private int e; private int h; private VelocityTracker j; protected void a(CoordinatorLayout coordinatorLayout, V v) { } protected boolean d(V v) { return false; } public xVN() { this.b = -1; this.h = -1; } public xVN(Context context, AttributeSet attributeSet) { super(context, attributeSet); this.b = -1; this.h = -1; } @Override // androidx.coordinatorlayout.widget.CoordinatorLayout.Sts public boolean LJ_(CoordinatorLayout coordinatorLayout, V v, MotionEvent motionEvent) { int findPointerIndex; if (this.h < 0) { this.h = ViewConfiguration.get(coordinatorLayout.getContext()).getScaledTouchSlop(); } if (motionEvent.getActionMasked() == 2 && this.c) { int i = this.b; if (i == -1 || (findPointerIndex = motionEvent.findPointerIndex(i)) == -1) { return false; } int y = (int) motionEvent.getY(findPointerIndex); if (Math.abs(y - this.e) > this.h) { this.e = y; return true; } } if (motionEvent.getActionMasked() == 0) { this.b = -1; int x = (int) motionEvent.getX(); int y2 = (int) motionEvent.getY(); boolean z = d(v) && coordinatorLayout.e(v, x, y2); this.c = z; if (z) { this.e = y2; this.b = motionEvent.getPointerId(0); if (this.j == null) { this.j = VelocityTracker.obtain(); } OverScroller overScroller = this.a; if (overScroller != null && !overScroller.isFinished()) { this.a.abortAnimation(); return true; } } } VelocityTracker velocityTracker = this.j; if (velocityTracker != null) { velocityTracker.addMovement(motionEvent); } return false; } /* JADX WARN: Removed duplicated region for block: B:17:0x00d4 */ /* JADX WARN: Removed duplicated region for block: B:20:0x00db A[ADDED_TO_REGION] */ /* JADX WARN: Removed duplicated region for block: B:28:0x00cb */ @Override // androidx.coordinatorlayout.widget.CoordinatorLayout.Sts /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public boolean MY_(androidx.coordinatorlayout.widget.CoordinatorLayout r20, V r21, android.view.MotionEvent r22) { /* Method dump skipped, instructions count: 223 To view this dump add '--comments-level debug' option */ throw new UnsupportedOperationException("Method not decompiled: o.xVN.MY_(androidx.coordinatorlayout.widget.CoordinatorLayout, android.view.View, android.view.MotionEvent):boolean"); } public int e(CoordinatorLayout coordinatorLayout, V v, int i, int i2, int i3) { int c = c(); if (i2 != 0 && c >= i2 && c <= i3) { if (i < i2) { i = i2; } else if (i > i3) { i = i3; } if (c != i) { e(i); return c - i; } } return 0; } public int a() { return c(); } protected int e(V v) { return -v.getHeight(); } protected int a(V v) { return v.getHeight(); } /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes2.dex */ public class LWm implements Runnable { private final V a; private xVN b; private final CoordinatorLayout d; LWm(xVN xvn, CoordinatorLayout coordinatorLayout, V v) { this.b = xvn; this.d = coordinatorLayout; this.a = v; } @Override // java.lang.Runnable public final void run() { if (this.a == null || this.b.a == null) { return; } if (!this.b.a.computeScrollOffset()) { this.b.a(this.d, this.a); return; } xVN xvn = this.b; xvn.e(this.d, this.a, xvn.a.getCurrY(), PKIFailureInfo.systemUnavail, Integer.MAX_VALUE); ViewCompat.e(this.a, this); } } }