922 lines
30 KiB
Java
922 lines
30 KiB
Java
|
package o;
|
||
|
|
||
|
import android.graphics.Rect;
|
||
|
import android.graphics.drawable.NinePatchDrawable;
|
||
|
import android.os.Handler;
|
||
|
import android.os.Message;
|
||
|
import android.view.MotionEvent;
|
||
|
import android.view.View;
|
||
|
import android.view.ViewConfiguration;
|
||
|
import android.view.ViewParent;
|
||
|
import android.view.animation.DecelerateInterpolator;
|
||
|
import android.view.animation.Interpolator;
|
||
|
import androidx.core.view.ViewCompat;
|
||
|
import androidx.core.widget.NestedScrollView;
|
||
|
import androidx.recyclerview.widget.RecyclerView;
|
||
|
import java.lang.ref.WeakReference;
|
||
|
import java.util.List;
|
||
|
import org.bouncycastle.asn1.x509.DisplayText;
|
||
|
|
||
|
/* renamed from: o.hqi, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public final class C15703hqi {
|
||
|
private static Interpolator O = new Sta();
|
||
|
private static Interpolator Q = new DecelerateInterpolator();
|
||
|
int B;
|
||
|
int C;
|
||
|
int E;
|
||
|
public RecyclerView F;
|
||
|
int G;
|
||
|
int H;
|
||
|
NestedScrollView I;
|
||
|
C15730iBR J;
|
||
|
JuK K;
|
||
|
public int M;
|
||
|
public qHQ P;
|
||
|
public int R;
|
||
|
private Object T;
|
||
|
private int U;
|
||
|
private int V;
|
||
|
private int W;
|
||
|
private int Y;
|
||
|
private JuK Z;
|
||
|
boolean a;
|
||
|
private int aa;
|
||
|
private int ab;
|
||
|
private NinePatchDrawable ae;
|
||
|
public boolean b;
|
||
|
boolean c;
|
||
|
int d;
|
||
|
int e;
|
||
|
public float f;
|
||
|
int h;
|
||
|
int j;
|
||
|
C16147leI l;
|
||
|
C16549pIo m;
|
||
|
RecyclerView.zJl n;
|
||
|
|
||
|
/* renamed from: o, reason: collision with root package name */
|
||
|
public EKR f9162o;
|
||
|
boolean q;
|
||
|
int r;
|
||
|
int s;
|
||
|
public IeS t;
|
||
|
boolean v;
|
||
|
public boolean y;
|
||
|
public RVV z;
|
||
|
public Interpolator S = O;
|
||
|
long p = -1;
|
||
|
public boolean w = true;
|
||
|
private final Rect ah = new Rect();
|
||
|
private int ag = DisplayText.DISPLAY_TEXT_MAXIMUM_SIZE;
|
||
|
private Interpolator ad = Q;
|
||
|
public int D = 0;
|
||
|
public hNx k = new hNx();
|
||
|
int N = 0;
|
||
|
float g = 1.0f;
|
||
|
private int X = 0;
|
||
|
private LWm af = new LWm();
|
||
|
private Sts ac = new Sts();
|
||
|
final Runnable i = new Runnable(this) { // from class: o.hqi.2
|
||
|
private C15703hqi d;
|
||
|
|
||
|
{
|
||
|
this.d = this;
|
||
|
}
|
||
|
|
||
|
@Override // java.lang.Runnable
|
||
|
public final void run() {
|
||
|
if (this.d.n != null) {
|
||
|
C15703hqi c15703hqi = this.d;
|
||
|
c15703hqi.b(c15703hqi.F);
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
public RecyclerView.jNh u = new RecyclerView.jNh(this) { // from class: o.hqi.3
|
||
|
private C15703hqi b;
|
||
|
|
||
|
{
|
||
|
this.b = this;
|
||
|
}
|
||
|
|
||
|
@Override // androidx.recyclerview.widget.RecyclerView.jNh
|
||
|
public final boolean Ob_(RecyclerView recyclerView, MotionEvent motionEvent) {
|
||
|
C15703hqi c15703hqi = this.b;
|
||
|
int actionMasked = motionEvent.getActionMasked();
|
||
|
if (actionMasked != 0) {
|
||
|
if (actionMasked != 1) {
|
||
|
if (actionMasked == 2) {
|
||
|
if (c15703hqi.m != null && !c15703hqi.t.hasMessages(2)) {
|
||
|
c15703hqi.NU_(recyclerView, motionEvent);
|
||
|
} else if (!c15703hqi.w || !c15703hqi.NT_(recyclerView, motionEvent, true)) {
|
||
|
return false;
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
if (actionMasked != 3) {
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
return c15703hqi.c(actionMasked, true);
|
||
|
}
|
||
|
if (c15703hqi.m != null && !c15703hqi.t.hasMessages(2)) {
|
||
|
return false;
|
||
|
}
|
||
|
View Od_ = BvX.Od_(recyclerView, motionEvent.getX(), motionEvent.getY());
|
||
|
RecyclerView.zJl g = Od_ != null ? recyclerView.g(Od_) : null;
|
||
|
if (!(g instanceof YNE)) {
|
||
|
return false;
|
||
|
}
|
||
|
int c = c15703hqi.c(g);
|
||
|
qHQ qhq = c15703hqi.P;
|
||
|
if (c < 0 || c >= qhq.getItemCount()) {
|
||
|
return false;
|
||
|
}
|
||
|
int x = (int) (motionEvent.getX() + 0.5f);
|
||
|
int y = (int) (motionEvent.getY() + 0.5f);
|
||
|
if (!c15703hqi.e(g)) {
|
||
|
return false;
|
||
|
}
|
||
|
int d = BvX.d(c15703hqi.F.x);
|
||
|
int d2 = BvX.d(c15703hqi.F);
|
||
|
c15703hqi.B = x;
|
||
|
c15703hqi.r = x;
|
||
|
c15703hqi.C = y;
|
||
|
c15703hqi.s = y;
|
||
|
c15703hqi.p = g.getItemId();
|
||
|
c15703hqi.c = d == 0 || (d == 1 && d2 > 1);
|
||
|
c15703hqi.a = d == 1 || (d == 0 && d2 > 1);
|
||
|
boolean z = c15703hqi.v;
|
||
|
if (!c15703hqi.y) {
|
||
|
return false;
|
||
|
}
|
||
|
IeS ieS = c15703hqi.t;
|
||
|
int i = c15703hqi.A;
|
||
|
ieS.removeMessages(1);
|
||
|
MotionEvent motionEvent2 = ieS.d;
|
||
|
if (motionEvent2 != null) {
|
||
|
motionEvent2.recycle();
|
||
|
ieS.d = null;
|
||
|
}
|
||
|
ieS.d = MotionEvent.obtain(motionEvent);
|
||
|
ieS.sendEmptyMessageAtTime(1, motionEvent.getDownTime() + i);
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
@Override // androidx.recyclerview.widget.RecyclerView.jNh
|
||
|
public final void b(boolean z) {
|
||
|
C15703hqi c15703hqi = this.b;
|
||
|
if (z) {
|
||
|
c15703hqi.b(true);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // androidx.recyclerview.widget.RecyclerView.jNh
|
||
|
public final void Oc_(RecyclerView recyclerView, MotionEvent motionEvent) {
|
||
|
C15703hqi c15703hqi = this.b;
|
||
|
int actionMasked = motionEvent.getActionMasked();
|
||
|
if (c15703hqi.m == null || c15703hqi.t.hasMessages(2)) {
|
||
|
return;
|
||
|
}
|
||
|
if (actionMasked != 1) {
|
||
|
if (actionMasked == 2) {
|
||
|
c15703hqi.NU_(recyclerView, motionEvent);
|
||
|
return;
|
||
|
} else if (actionMasked != 3) {
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
c15703hqi.c(actionMasked, true);
|
||
|
}
|
||
|
};
|
||
|
public RecyclerView.dAO x = new RecyclerView.dAO(this) { // from class: o.hqi.5
|
||
|
private C15703hqi d;
|
||
|
|
||
|
{
|
||
|
this.d = this;
|
||
|
}
|
||
|
|
||
|
@Override // androidx.recyclerview.widget.RecyclerView.dAO
|
||
|
public final void onScrolled(RecyclerView recyclerView, int i, int i2) {
|
||
|
C15703hqi c15703hqi = this.d;
|
||
|
if (c15703hqi.q) {
|
||
|
c15703hqi.d = i;
|
||
|
c15703hqi.e = i2;
|
||
|
} else {
|
||
|
if (c15703hqi.m == null || c15703hqi.t.hasMessages(2)) {
|
||
|
return;
|
||
|
}
|
||
|
ViewCompat.b(c15703hqi.F, c15703hqi.i, 500L);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // androidx.recyclerview.widget.RecyclerView.dAO
|
||
|
public final void onScrollStateChanged(RecyclerView recyclerView, int i) {
|
||
|
C15703hqi c15703hqi = this.d;
|
||
|
if (i == 1) {
|
||
|
c15703hqi.b(true);
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
public HBt L = new HBt(this);
|
||
|
public int A = ViewConfiguration.getLongPressTimeout();
|
||
|
|
||
|
/* renamed from: o.hqi$RVV */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public interface RVV {
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* renamed from: o.hqi$LWm */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static class LWm {
|
||
|
public RecyclerView.zJl a;
|
||
|
public boolean b;
|
||
|
public int e;
|
||
|
|
||
|
LWm() {
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* renamed from: o.hqi$Sts */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static class Sts {
|
||
|
public RecyclerView.zJl a;
|
||
|
public boolean b;
|
||
|
public int c;
|
||
|
public C16549pIo d;
|
||
|
public int e;
|
||
|
public JuK f;
|
||
|
public int g;
|
||
|
public RecyclerView h;
|
||
|
public int i;
|
||
|
public int j;
|
||
|
public boolean k;
|
||
|
public JuK m;
|
||
|
private int n;
|
||
|
|
||
|
/* renamed from: o, reason: collision with root package name */
|
||
|
private int f9163o;
|
||
|
|
||
|
Sts() {
|
||
|
}
|
||
|
|
||
|
public final void a(RecyclerView recyclerView, RecyclerView.zJl zjl, C16549pIo c16549pIo, int i, int i2, JuK juK, JuK juK2, boolean z) {
|
||
|
this.h = recyclerView;
|
||
|
this.d = c16549pIo;
|
||
|
this.a = zjl;
|
||
|
this.e = i;
|
||
|
this.c = i2;
|
||
|
this.m = juK;
|
||
|
this.f = juK2;
|
||
|
this.b = z;
|
||
|
int b = BvX.b(recyclerView.x);
|
||
|
this.j = b;
|
||
|
this.k = BvX.e(b) == 1;
|
||
|
int i3 = i - c16549pIo.a;
|
||
|
this.n = i3;
|
||
|
this.g = i3;
|
||
|
int i4 = i2 - c16549pIo.e;
|
||
|
this.f9163o = i4;
|
||
|
this.i = i4;
|
||
|
if (this.k) {
|
||
|
int max = Math.max(this.g, recyclerView.getPaddingLeft());
|
||
|
this.g = max;
|
||
|
this.g = Math.min(max, Math.max(0, (recyclerView.getWidth() - recyclerView.getPaddingRight()) - this.d.f));
|
||
|
} else {
|
||
|
int max2 = Math.max(i4, recyclerView.getPaddingTop());
|
||
|
this.i = max2;
|
||
|
this.i = Math.min(max2, Math.max(0, (recyclerView.getHeight() - recyclerView.getPaddingBottom()) - this.d.d));
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public final void b(boolean z) {
|
||
|
c(3, false);
|
||
|
if (z) {
|
||
|
e(false);
|
||
|
return;
|
||
|
}
|
||
|
if (this.m == null || this.t.hasMessages(2)) {
|
||
|
return;
|
||
|
}
|
||
|
IeS ieS = this.t;
|
||
|
if (ieS.hasMessages(2)) {
|
||
|
return;
|
||
|
}
|
||
|
ieS.sendEmptyMessage(2);
|
||
|
}
|
||
|
|
||
|
private void e(boolean z) {
|
||
|
if (this.m == null || this.t.hasMessages(2)) {
|
||
|
return;
|
||
|
}
|
||
|
IeS ieS = this.t;
|
||
|
if (ieS != null) {
|
||
|
ieS.removeMessages(2);
|
||
|
this.t.removeMessages(3);
|
||
|
}
|
||
|
RecyclerView recyclerView = this.F;
|
||
|
if (recyclerView != null && this.n != null) {
|
||
|
recyclerView.setOverScrollMode(this.H);
|
||
|
}
|
||
|
C16147leI c16147leI = this.l;
|
||
|
if (c16147leI != null) {
|
||
|
c16147leI.a = this.ag;
|
||
|
this.l.b = this.ad;
|
||
|
this.l.a();
|
||
|
}
|
||
|
C15730iBR c15730iBR = this.J;
|
||
|
if (c15730iBR != null) {
|
||
|
c15730iBR.a = this.ag;
|
||
|
this.l.b = this.ad;
|
||
|
this.J.a();
|
||
|
}
|
||
|
EKR ekr = this.f9162o;
|
||
|
if (ekr != null) {
|
||
|
ekr.a();
|
||
|
}
|
||
|
HBt hBt = this.L;
|
||
|
if (hBt != null && hBt.d) {
|
||
|
hBt.d = false;
|
||
|
}
|
||
|
RecyclerView recyclerView2 = this.F;
|
||
|
if (recyclerView2 != null && recyclerView2.getParent() != null) {
|
||
|
this.F.getParent().requestDisallowInterceptTouchEvent(false);
|
||
|
}
|
||
|
RecyclerView recyclerView3 = this.F;
|
||
|
if (recyclerView3 != null) {
|
||
|
recyclerView3.invalidate();
|
||
|
}
|
||
|
this.Z = null;
|
||
|
this.K = null;
|
||
|
this.l = null;
|
||
|
this.J = null;
|
||
|
this.n = null;
|
||
|
this.m = null;
|
||
|
this.T = null;
|
||
|
this.I = null;
|
||
|
this.B = 0;
|
||
|
this.C = 0;
|
||
|
this.G = 0;
|
||
|
this.E = 0;
|
||
|
this.ab = 0;
|
||
|
this.Y = 0;
|
||
|
this.U = 0;
|
||
|
this.aa = 0;
|
||
|
this.W = 0;
|
||
|
this.V = 0;
|
||
|
this.j = 0;
|
||
|
this.h = 0;
|
||
|
this.c = false;
|
||
|
this.a = false;
|
||
|
qHQ qhq = this.P;
|
||
|
if (qhq != null) {
|
||
|
int i = qhq.g;
|
||
|
int i2 = this.P.e;
|
||
|
qHQ qhq2 = this.P;
|
||
|
iIq iiq = qhq2.b;
|
||
|
qhq2.g = -1;
|
||
|
qhq2.e = -1;
|
||
|
qhq2.a = null;
|
||
|
qhq2.f = null;
|
||
|
qhq2.i = null;
|
||
|
qhq2.b = null;
|
||
|
if (z && i2 != i) {
|
||
|
iiq.c(i, i2);
|
||
|
}
|
||
|
iiq.d(i);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
final boolean c(int i, boolean z) {
|
||
|
boolean z2 = i == 1;
|
||
|
boolean z3 = (this.m == null || this.t.hasMessages(2)) ? false : true;
|
||
|
IeS ieS = this.t;
|
||
|
if (ieS != null) {
|
||
|
ieS.removeMessages(1);
|
||
|
MotionEvent motionEvent = ieS.d;
|
||
|
if (motionEvent != null) {
|
||
|
motionEvent.recycle();
|
||
|
ieS.d = null;
|
||
|
}
|
||
|
}
|
||
|
this.r = 0;
|
||
|
this.s = 0;
|
||
|
this.B = 0;
|
||
|
this.C = 0;
|
||
|
this.ab = 0;
|
||
|
this.Y = 0;
|
||
|
this.U = 0;
|
||
|
this.aa = 0;
|
||
|
this.W = 0;
|
||
|
this.V = 0;
|
||
|
this.j = 0;
|
||
|
this.h = 0;
|
||
|
this.p = -1L;
|
||
|
this.c = false;
|
||
|
this.a = false;
|
||
|
if (z && this.m != null && !this.t.hasMessages(2)) {
|
||
|
e(z2);
|
||
|
}
|
||
|
return z3;
|
||
|
}
|
||
|
|
||
|
final boolean NT_(RecyclerView recyclerView, MotionEvent motionEvent, boolean z) {
|
||
|
C16978sqI c16978sqI;
|
||
|
NestedScrollView nestedScrollView;
|
||
|
C15703hqi c15703hqi;
|
||
|
RecyclerView recyclerView2;
|
||
|
if (this.m != null) {
|
||
|
return false;
|
||
|
}
|
||
|
int x = (int) (motionEvent.getX() + 0.5f);
|
||
|
int y = (int) (motionEvent.getY() + 0.5f);
|
||
|
this.B = x;
|
||
|
this.C = y;
|
||
|
if (this.p == -1) {
|
||
|
return false;
|
||
|
}
|
||
|
if (z && ((!this.c || Math.abs(x - this.r) <= this.R) && (!this.a || Math.abs(y - this.s) <= this.R))) {
|
||
|
return false;
|
||
|
}
|
||
|
View Od_ = BvX.Od_(recyclerView, this.r, this.s);
|
||
|
RecyclerView.zJl g = Od_ != null ? recyclerView.g(Od_) : null;
|
||
|
if (g == null || !e(g)) {
|
||
|
return false;
|
||
|
}
|
||
|
RecyclerView.Sts sts = this.F.g;
|
||
|
idN idn = new idN();
|
||
|
int c = ury.c(sts, this.P, null, g.getAdapterPosition(), idn);
|
||
|
iIq iiq = (iIq) ury.d(this.P, iIq.class, c);
|
||
|
JuK e = iiq == null ? null : iiq.e((iIq) g, c);
|
||
|
if (e == null) {
|
||
|
e = new JuK(0, Math.max(0, this.P.getItemCount() - 1));
|
||
|
}
|
||
|
int max = Math.max(0, this.P.getItemCount() - 1);
|
||
|
if (e.c > e.b) {
|
||
|
StringBuilder sb = new StringBuilder("Invalid wrappedAdapterRange specified --- start > wrappedAdapterRange (wrappedAdapterRange = ");
|
||
|
sb.append(e);
|
||
|
sb.append(")");
|
||
|
throw new IllegalStateException(sb.toString());
|
||
|
}
|
||
|
if (e.c < 0) {
|
||
|
StringBuilder sb2 = new StringBuilder("Invalid wrappedAdapterRange specified --- start < 0 (wrappedAdapterRange = ");
|
||
|
sb2.append(e);
|
||
|
sb2.append(")");
|
||
|
throw new IllegalStateException(sb2.toString());
|
||
|
}
|
||
|
if (e.b > max) {
|
||
|
StringBuilder sb3 = new StringBuilder("Invalid wrappedAdapterRange specified --- end >= count (wrappedAdapterRange = ");
|
||
|
sb3.append(e);
|
||
|
sb3.append(")");
|
||
|
throw new IllegalStateException(sb3.toString());
|
||
|
}
|
||
|
if (c < e.c || c > e.b) {
|
||
|
StringBuilder sb4 = new StringBuilder("Invalid wrappedAdapterRange specified --- does not contain drag target item (wrappedAdapterRange = ");
|
||
|
sb4.append(e);
|
||
|
sb4.append(", position = ");
|
||
|
sb4.append(c);
|
||
|
sb4.append(")");
|
||
|
throw new IllegalStateException(sb4.toString());
|
||
|
}
|
||
|
if (idn.c.isEmpty()) {
|
||
|
c16978sqI = null;
|
||
|
} else {
|
||
|
List<C16978sqI> list = idn.c;
|
||
|
c16978sqI = list.get(list.size() - 1);
|
||
|
}
|
||
|
Object obj = c16978sqI.b;
|
||
|
RecyclerView.jbe jbeVar = recyclerView != null ? recyclerView.t : null;
|
||
|
if (jbeVar != null) {
|
||
|
jbeVar.endAnimation(g);
|
||
|
}
|
||
|
IeS ieS = this.t;
|
||
|
ieS.removeMessages(1);
|
||
|
MotionEvent motionEvent2 = ieS.d;
|
||
|
if (motionEvent2 != null) {
|
||
|
motionEvent2.recycle();
|
||
|
ieS.d = null;
|
||
|
}
|
||
|
this.m = new C16549pIo(g, this.B, this.C);
|
||
|
this.n = g;
|
||
|
this.Z = e;
|
||
|
RecyclerView.Sts sts2 = this.F.g;
|
||
|
this.K = new JuK(ury.e(idn, this.P, sts2, e.c), ury.e(idn, this.P, sts2, e.b));
|
||
|
ViewParent parent = this.F.getParent();
|
||
|
while (true) {
|
||
|
if (parent == null) {
|
||
|
nestedScrollView = null;
|
||
|
break;
|
||
|
}
|
||
|
if (parent instanceof NestedScrollView) {
|
||
|
nestedScrollView = (NestedScrollView) parent;
|
||
|
break;
|
||
|
}
|
||
|
parent = parent.getParent();
|
||
|
}
|
||
|
if (nestedScrollView == null || this.F.isNestedScrollingEnabled()) {
|
||
|
this.I = null;
|
||
|
} else {
|
||
|
this.I = nestedScrollView;
|
||
|
}
|
||
|
this.H = recyclerView.getOverScrollMode();
|
||
|
recyclerView.setOverScrollMode(2);
|
||
|
this.B = (int) (motionEvent.getX() + 0.5f);
|
||
|
this.C = (int) (motionEvent.getY() + 0.5f);
|
||
|
NestedScrollView nestedScrollView2 = this.I;
|
||
|
this.G = nestedScrollView2 != null ? nestedScrollView2.getScrollX() : 0;
|
||
|
NestedScrollView nestedScrollView3 = this.I;
|
||
|
this.E = nestedScrollView3 != null ? nestedScrollView3.getScrollY() : 0;
|
||
|
int i = this.C;
|
||
|
this.V = i;
|
||
|
this.aa = i;
|
||
|
this.Y = i;
|
||
|
int i2 = this.B;
|
||
|
this.W = i2;
|
||
|
this.U = i2;
|
||
|
this.ab = i2;
|
||
|
this.N = 0;
|
||
|
this.X = this.D;
|
||
|
this.T = obj;
|
||
|
this.F.getParent().requestDisallowInterceptTouchEvent(true);
|
||
|
HBt hBt = this.L;
|
||
|
if (!hBt.d && (c15703hqi = hBt.a.get()) != null && (recyclerView2 = c15703hqi.F) != null) {
|
||
|
ViewCompat.e(recyclerView2, hBt);
|
||
|
hBt.d = true;
|
||
|
}
|
||
|
qHQ qhq = this.P;
|
||
|
C16549pIo c16549pIo = this.m;
|
||
|
JuK juK = this.Z;
|
||
|
int i3 = this.X;
|
||
|
if (g.getItemId() == -1) {
|
||
|
throw new IllegalStateException("dragging target must provides valid ID");
|
||
|
}
|
||
|
iIq iiq2 = (iIq) ury.d(qhq, iIq.class, c);
|
||
|
qhq.b = iiq2;
|
||
|
if (iiq2 != null) {
|
||
|
qhq.e = c;
|
||
|
qhq.g = c;
|
||
|
qhq.f = c16549pIo;
|
||
|
qhq.i = g;
|
||
|
qhq.a = juK;
|
||
|
qhq.h = i3;
|
||
|
this.P.onBindViewHolder(g, c);
|
||
|
C16147leI c16147leI = new C16147leI(this.F, g, this.K);
|
||
|
this.l = c16147leI;
|
||
|
c16147leI.g = null;
|
||
|
C16147leI c16147leI2 = this.l;
|
||
|
hNx hnx = this.k;
|
||
|
c16147leI2.k = hnx.e;
|
||
|
c16147leI2.m = hnx.i;
|
||
|
c16147leI2.j = hnx.h;
|
||
|
c16147leI2.l = hnx.b;
|
||
|
c16147leI2.f = hnx.c;
|
||
|
c16147leI2.n = hnx.a;
|
||
|
c16147leI2.c = hnx.d;
|
||
|
this.l.a(this.m, this.B, this.C);
|
||
|
int b = BvX.b(this.F.x);
|
||
|
if (!this.b && (b == 1 || b == 0)) {
|
||
|
C15730iBR c15730iBR = new C15730iBR(this.F, g, this.m);
|
||
|
this.J = c15730iBR;
|
||
|
c15730iBR.g = this.S;
|
||
|
this.J.d();
|
||
|
C15730iBR c15730iBR2 = this.J;
|
||
|
int i4 = this.l.s;
|
||
|
int i5 = this.l.q;
|
||
|
c15730iBR2.f = i4;
|
||
|
c15730iBR2.j = i5;
|
||
|
}
|
||
|
EKR ekr = this.f9162o;
|
||
|
if (ekr != null && ekr.i) {
|
||
|
ekr.b.e(ekr);
|
||
|
ekr.b.d(ekr, -1);
|
||
|
}
|
||
|
qHQ qhq2 = this.P;
|
||
|
qhq2.c = true;
|
||
|
qhq2.b.b(qhq2.g);
|
||
|
qhq2.c = false;
|
||
|
if (this.z != null) {
|
||
|
int i6 = this.P.g;
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
throw new IllegalStateException("DraggableItemAdapter not found!");
|
||
|
}
|
||
|
|
||
|
final boolean e(RecyclerView.zJl zjl) {
|
||
|
int adapterPosition = zjl.getAdapterPosition();
|
||
|
int c = ury.c(this.F.g, this.P, null, adapterPosition, null);
|
||
|
if (c == -1) {
|
||
|
return false;
|
||
|
}
|
||
|
View view = zjl.itemView;
|
||
|
view.getTranslationX();
|
||
|
view.getTranslationY();
|
||
|
view.getLeft();
|
||
|
view.getTop();
|
||
|
iIq iiq = (iIq) ury.d(this.P, iIq.class, c);
|
||
|
return iiq != null && iiq.c((iIq) zjl, c) && zjl.getAdapterPosition() == adapterPosition;
|
||
|
}
|
||
|
|
||
|
final void NU_(RecyclerView recyclerView, MotionEvent motionEvent) {
|
||
|
this.B = (int) (motionEvent.getX() + 0.5f);
|
||
|
this.C = (int) (motionEvent.getY() + 0.5f);
|
||
|
NestedScrollView nestedScrollView = this.I;
|
||
|
this.G = nestedScrollView != null ? nestedScrollView.getScrollX() : 0;
|
||
|
NestedScrollView nestedScrollView2 = this.I;
|
||
|
this.E = nestedScrollView2 != null ? nestedScrollView2.getScrollY() : 0;
|
||
|
this.U = Math.min(this.U, this.B);
|
||
|
this.aa = Math.min(this.aa, this.C);
|
||
|
this.W = Math.max(this.W, this.B);
|
||
|
this.V = Math.max(this.V, this.C);
|
||
|
int d = BvX.d(this.F.x);
|
||
|
if (d == 0) {
|
||
|
int i = this.B;
|
||
|
NestedScrollView nestedScrollView3 = this.I;
|
||
|
if (nestedScrollView3 != null) {
|
||
|
i += nestedScrollView3.getScrollX() - this.G;
|
||
|
}
|
||
|
int i2 = this.ab;
|
||
|
int i3 = this.U;
|
||
|
int i4 = this.M;
|
||
|
if (i2 - i3 > i4 || this.W - i > i4) {
|
||
|
this.N |= 4;
|
||
|
}
|
||
|
if (this.W - i2 > i4 || i - i3 > i4) {
|
||
|
this.N |= 8;
|
||
|
}
|
||
|
} else if (d == 1) {
|
||
|
int i5 = this.C;
|
||
|
NestedScrollView nestedScrollView4 = this.I;
|
||
|
if (nestedScrollView4 != null) {
|
||
|
i5 += nestedScrollView4.getScrollY() - this.E;
|
||
|
}
|
||
|
int i6 = this.Y;
|
||
|
int i7 = this.aa;
|
||
|
int i8 = this.M;
|
||
|
if (i6 - i7 > i8 || this.V - i5 > i8) {
|
||
|
this.N = 1 | this.N;
|
||
|
}
|
||
|
if (this.V - i6 > i8 || i5 - i7 > i8) {
|
||
|
this.N |= 2;
|
||
|
}
|
||
|
}
|
||
|
C16147leI c16147leI = this.l;
|
||
|
int i9 = this.B;
|
||
|
NestedScrollView nestedScrollView5 = this.I;
|
||
|
if (nestedScrollView5 != null) {
|
||
|
i9 += nestedScrollView5.getScrollX() - this.G;
|
||
|
}
|
||
|
int i10 = this.C;
|
||
|
NestedScrollView nestedScrollView6 = this.I;
|
||
|
if (nestedScrollView6 != null) {
|
||
|
i10 += nestedScrollView6.getScrollY() - this.E;
|
||
|
}
|
||
|
if (c16147leI.d(i9, i10)) {
|
||
|
C15730iBR c15730iBR = this.J;
|
||
|
if (c15730iBR != null) {
|
||
|
int i11 = this.l.s;
|
||
|
int i12 = this.l.q;
|
||
|
c15730iBR.f = i11;
|
||
|
c15730iBR.j = i12;
|
||
|
}
|
||
|
b(recyclerView);
|
||
|
e();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
final void b(RecyclerView recyclerView) {
|
||
|
boolean z;
|
||
|
RecyclerView.zJl zjl = this.n;
|
||
|
Sts sts = this.ac;
|
||
|
C16549pIo c16549pIo = this.m;
|
||
|
int i = this.B;
|
||
|
NestedScrollView nestedScrollView = this.I;
|
||
|
if (nestedScrollView != null) {
|
||
|
i += nestedScrollView.getScrollX() - this.G;
|
||
|
}
|
||
|
int i2 = i;
|
||
|
int i3 = this.C;
|
||
|
NestedScrollView nestedScrollView2 = this.I;
|
||
|
if (nestedScrollView2 != null) {
|
||
|
i3 += nestedScrollView2.getScrollY() - this.E;
|
||
|
}
|
||
|
sts.a(recyclerView, zjl, c16549pIo, i2, i3, this.Z, this.K, this.b);
|
||
|
int i4 = this.P.g;
|
||
|
int i5 = this.P.e;
|
||
|
LWm d = d(this.af, sts, false);
|
||
|
if (d.e != -1) {
|
||
|
z = !this.b;
|
||
|
if (!z) {
|
||
|
z = this.P.b.e(i4, d.e);
|
||
|
}
|
||
|
if (!z) {
|
||
|
d = d(this.af, sts, true);
|
||
|
if (d.e != -1) {
|
||
|
z = this.P.b.e(i4, d.e);
|
||
|
}
|
||
|
}
|
||
|
} else {
|
||
|
z = false;
|
||
|
}
|
||
|
if (z && d.a == null) {
|
||
|
throw new IllegalStateException("bug check");
|
||
|
}
|
||
|
if (z) {
|
||
|
a(recyclerView, i5, zjl, d.a);
|
||
|
}
|
||
|
C15730iBR c15730iBR = this.J;
|
||
|
if (c15730iBR != null) {
|
||
|
c15730iBR.a(z ? d.a : null);
|
||
|
}
|
||
|
if (z) {
|
||
|
this.t.sendEmptyMessage(3);
|
||
|
}
|
||
|
d.a = null;
|
||
|
d.e = -1;
|
||
|
d.b = false;
|
||
|
sts.h = null;
|
||
|
sts.d = null;
|
||
|
sts.a = null;
|
||
|
}
|
||
|
|
||
|
final void e() {
|
||
|
if (this.z == null) {
|
||
|
return;
|
||
|
}
|
||
|
C16147leI c16147leI = this.l;
|
||
|
int i = c16147leI.s;
|
||
|
int i2 = c16147leI.i.b;
|
||
|
C16147leI c16147leI2 = this.l;
|
||
|
int i3 = c16147leI2.q;
|
||
|
int i4 = c16147leI2.i.h;
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: Removed duplicated region for block: B:37:0x00f5 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:40:0x010c */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:42:0x0111 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:45:? A[RETURN, SYNTHETIC] */
|
||
|
/*
|
||
|
Code decompiled incorrectly, please refer to instructions dump.
|
||
|
To view partially-correct add '--show-bad-code' argument
|
||
|
*/
|
||
|
private void a(androidx.recyclerview.widget.RecyclerView r19, int r20, androidx.recyclerview.widget.RecyclerView.zJl r21, androidx.recyclerview.widget.RecyclerView.zJl r22) {
|
||
|
/*
|
||
|
Method dump skipped, instructions count: 541
|
||
|
To view this dump add '--comments-level debug' option
|
||
|
*/
|
||
|
throw new UnsupportedOperationException("Method not decompiled: o.C15703hqi.a(androidx.recyclerview.widget.RecyclerView, int, androidx.recyclerview.widget.RecyclerView$zJl, androidx.recyclerview.widget.RecyclerView$zJl):void");
|
||
|
}
|
||
|
|
||
|
private static Integer c(View view, boolean z) {
|
||
|
if (view != null) {
|
||
|
return Integer.valueOf(z ? view.getTop() : view.getLeft());
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
/* renamed from: o.hqi$HBt */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static class HBt implements Runnable {
|
||
|
public final WeakReference<C15703hqi> a;
|
||
|
public boolean d;
|
||
|
|
||
|
public HBt(C15703hqi c15703hqi) {
|
||
|
this.a = new WeakReference<>(c15703hqi);
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:107:0x01e2, code lost:
|
||
|
|
||
|
if ((r9 & (r3 ? 8 : 2)) == 0) goto L131;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:149:0x02b3, code lost:
|
||
|
|
||
|
r2 = -r1.f;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:150:0x02c8, code lost:
|
||
|
|
||
|
r2 = r2 * 0.005f;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:169:0x02c6, code lost:
|
||
|
|
||
|
r2 = r1.f;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:194:0x01f3, code lost:
|
||
|
|
||
|
r6 = 0;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:200:0x01f0, code lost:
|
||
|
|
||
|
if ((r9 & (r3 ? 4 : 1)) != 0) goto L132;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:37:0x00bf, code lost:
|
||
|
|
||
|
if (((r3 ? 8 : 2) & r9) == 0) goto L49;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:61:0x00d0, code lost:
|
||
|
|
||
|
r4 = 0;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:67:0x00cd, code lost:
|
||
|
|
||
|
if (((r3 ? 4 : 1) & r9) != 0) goto L50;
|
||
|
*/
|
||
|
/* JADX WARN: Removed duplicated region for block: B:104:0x01d9 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:153:0x02d3 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:163:0x0325 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:196:0x01e5 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:204:0x01d5 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:207:0x01bd */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:208:0x01a4 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:83:0x0181 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:88:0x019d */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:90:0x01a7 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:97:0x01c3 */
|
||
|
@Override // java.lang.Runnable
|
||
|
/*
|
||
|
Code decompiled incorrectly, please refer to instructions dump.
|
||
|
To view partially-correct add '--show-bad-code' argument
|
||
|
*/
|
||
|
public final void run() {
|
||
|
/*
|
||
|
Method dump skipped, instructions count: 850
|
||
|
To view this dump add '--comments-level debug' option
|
||
|
*/
|
||
|
throw new UnsupportedOperationException("Method not decompiled: o.C15703hqi.HBt.run():void");
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* renamed from: o.hqi$IeS */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public static class IeS extends Handler {
|
||
|
public C15703hqi c;
|
||
|
MotionEvent d;
|
||
|
|
||
|
public IeS(C15703hqi c15703hqi) {
|
||
|
this.c = c15703hqi;
|
||
|
}
|
||
|
|
||
|
@Override // android.os.Handler
|
||
|
public final void handleMessage(Message message) {
|
||
|
int i = message.what;
|
||
|
if (i == 1) {
|
||
|
C15703hqi c15703hqi = this.c;
|
||
|
MotionEvent motionEvent = this.d;
|
||
|
if (c15703hqi.y) {
|
||
|
c15703hqi.NT_(c15703hqi.F, motionEvent, false);
|
||
|
return;
|
||
|
}
|
||
|
return;
|
||
|
}
|
||
|
if (i == 2) {
|
||
|
this.c.b(true);
|
||
|
return;
|
||
|
}
|
||
|
if (i == 3) {
|
||
|
C15703hqi c15703hqi2 = this.c;
|
||
|
RecyclerView.zJl b = c15703hqi2.F.b(c15703hqi2.m.c);
|
||
|
if (b != null) {
|
||
|
int width = b.itemView.getWidth();
|
||
|
int height = b.itemView.getHeight();
|
||
|
if (width == c15703hqi2.m.f && height == c15703hqi2.m.d) {
|
||
|
return;
|
||
|
}
|
||
|
C16549pIo c16549pIo = new C16549pIo(c15703hqi2.m, b);
|
||
|
c15703hqi2.m = c16549pIo;
|
||
|
c15703hqi2.l.a(c16549pIo, b);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:60:0x00e6, code lost:
|
||
|
|
||
|
if (r6 == r8) goto L59;
|
||
|
*/
|
||
|
/* JADX WARN: Removed duplicated region for block: B:13:0x0272 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:15:0x0277 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:26:0x02a1 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:30:0x02a3 */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:31:0x027a */
|
||
|
/*
|
||
|
Code decompiled incorrectly, please refer to instructions dump.
|
||
|
To view partially-correct add '--show-bad-code' argument
|
||
|
*/
|
||
|
private o.C15703hqi.LWm d(o.C15703hqi.LWm r18, o.C15703hqi.Sts r19, boolean r20) {
|
||
|
/*
|
||
|
Method dump skipped, instructions count: 679
|
||
|
To view this dump add '--comments-level debug' option
|
||
|
*/
|
||
|
throw new UnsupportedOperationException("Method not decompiled: o.C15703hqi.d(o.hqi$LWm, o.hqi$Sts, boolean):o.hqi$LWm");
|
||
|
}
|
||
|
|
||
|
final int c(RecyclerView.zJl zjl) {
|
||
|
if (zjl == null) {
|
||
|
return -1;
|
||
|
}
|
||
|
return ury.c(this.F.g, this.P, this.T, zjl.getAdapterPosition(), null);
|
||
|
}
|
||
|
}
|