272 lines
8.1 KiB
Java
272 lines
8.1 KiB
Java
package o;
|
|
|
|
import android.content.Context;
|
|
import android.graphics.PointF;
|
|
import android.util.DisplayMetrics;
|
|
import android.view.View;
|
|
import android.view.animation.DecelerateInterpolator;
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
|
import org.bouncycastle.asn1.cmp.PKIFailureInfo;
|
|
|
|
/* renamed from: o.eAB, reason: case insensitive filesystem */
|
|
/* loaded from: classes5.dex */
|
|
public final class C10297eAB extends gxT {
|
|
private RecyclerView a;
|
|
private MSs b;
|
|
private MSs d;
|
|
|
|
@Override // o.gxT
|
|
public final void a(RecyclerView recyclerView) {
|
|
this.a = recyclerView;
|
|
super.a(recyclerView);
|
|
}
|
|
|
|
@Override // o.gxT
|
|
public final int[] c(RecyclerView.tOB tob, View view) {
|
|
int i;
|
|
C14957gcv.e(tob, "");
|
|
C14957gcv.e(view, "");
|
|
if (tob.d()) {
|
|
MSs d = d(tob);
|
|
i = (d != null ? d.c(view) : 0) - (d != null ? d.i() : 0);
|
|
} else {
|
|
i = 0;
|
|
}
|
|
if (tob.c()) {
|
|
MSs c = c(tob);
|
|
r1 = (c != null ? c.c(view) : 0) - (c != null ? c.i() : 0);
|
|
}
|
|
return new int[]{i, r1};
|
|
}
|
|
|
|
@Override // o.gxT
|
|
public final View b(RecyclerView.tOB tob) {
|
|
if (tob != null && tob.c()) {
|
|
return e(tob, c(tob));
|
|
}
|
|
if (tob == null || !tob.d()) {
|
|
return null;
|
|
}
|
|
return e(tob, d(tob));
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
@Override // o.gxT
|
|
public final int b(RecyclerView.tOB tob, int i, int i2) {
|
|
int r;
|
|
MSs c;
|
|
PointF Hy_;
|
|
if (tob == 0 || (r = tob.r()) == 0) {
|
|
return -1;
|
|
}
|
|
if (tob.d()) {
|
|
c = d(tob);
|
|
} else {
|
|
c = tob.c() ? c(tob) : null;
|
|
}
|
|
if (c == null) {
|
|
return -1;
|
|
}
|
|
int i_ = tob.i_();
|
|
boolean z = false;
|
|
int i3 = Integer.MAX_VALUE;
|
|
int i4 = PKIFailureInfo.systemUnavail;
|
|
View view = null;
|
|
View view2 = null;
|
|
for (int i5 = 0; i5 < i_; i5++) {
|
|
View f = tob.f(i5);
|
|
if (f != null) {
|
|
int c2 = (c != null ? c.c(f) : 0) - (c != null ? c.i() : 0);
|
|
if (c2 <= 0 && c2 > i4) {
|
|
view2 = f;
|
|
i4 = c2;
|
|
}
|
|
if (c2 >= 0 && c2 < i3) {
|
|
view = f;
|
|
i3 = c2;
|
|
}
|
|
}
|
|
}
|
|
boolean z2 = !tob.d() ? i2 <= 0 : i <= 0;
|
|
if (z2 && view != null) {
|
|
return RecyclerView.tOB.f(view);
|
|
}
|
|
if (!z2 && view2 != null) {
|
|
return RecyclerView.tOB.f(view2);
|
|
}
|
|
View view3 = z2 ? view2 : null;
|
|
if (view3 != null) {
|
|
view = view3;
|
|
} else if (view == null) {
|
|
return -1;
|
|
}
|
|
int f2 = RecyclerView.tOB.f(view);
|
|
int r2 = tob.r();
|
|
if ((tob instanceof RecyclerView.CeN.RVV) && (Hy_ = ((RecyclerView.CeN.RVV) tob).Hy_(r2 - 1)) != null && (Hy_.x < BitmapDescriptorFactory.HUE_RED || Hy_.y < BitmapDescriptorFactory.HUE_RED)) {
|
|
z = true;
|
|
}
|
|
int i6 = f2 + (z == z2 ? -1 : 1);
|
|
if (i6 < 0 || i6 >= r) {
|
|
return -1;
|
|
}
|
|
return i6;
|
|
}
|
|
|
|
@Override // o.gxT
|
|
public final C11786els e(RecyclerView.tOB tob) {
|
|
RecyclerView recyclerView;
|
|
C14957gcv.e(tob, "");
|
|
if ((tob instanceof RecyclerView.CeN.RVV) && (recyclerView = this.a) != null) {
|
|
return new Sts(recyclerView, this, recyclerView.getContext());
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/* renamed from: o.eAB$Sts */
|
|
/* loaded from: classes5.dex */
|
|
public static final class Sts extends C11786els {
|
|
private RecyclerView a;
|
|
private C10297eAB l;
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
Sts(RecyclerView recyclerView, C10297eAB c10297eAB, Context context) {
|
|
super(context);
|
|
this.a = recyclerView;
|
|
this.l = c10297eAB;
|
|
}
|
|
|
|
@Override // o.C11786els, androidx.recyclerview.widget.RecyclerView.CeN
|
|
public final void b(View view, RecyclerView.AcL acL, RecyclerView.CeN.IeS ieS) {
|
|
C14957gcv.e(view, "");
|
|
C14957gcv.e(acL, "");
|
|
C14957gcv.e(ieS, "");
|
|
super.b(view, acL, ieS);
|
|
RecyclerView.tOB tob = this.a.x;
|
|
if (tob == null) {
|
|
return;
|
|
}
|
|
int[] c = this.l.c(tob, view);
|
|
int i = c[0];
|
|
int i2 = c[1];
|
|
int ceil = (int) Math.ceil(c(Math.max(Math.abs(i), Math.abs(i2))) / 0.3356d);
|
|
if (ceil > 0) {
|
|
DecelerateInterpolator decelerateInterpolator = this.b;
|
|
ieS.e = i;
|
|
ieS.d = i2;
|
|
ieS.a = ceil;
|
|
ieS.c = decelerateInterpolator;
|
|
ieS.b = true;
|
|
}
|
|
}
|
|
|
|
@Override // o.C11786els
|
|
public final float aoq_(DisplayMetrics displayMetrics) {
|
|
return 100.0f / (displayMetrics != null ? displayMetrics.densityDpi : 1);
|
|
}
|
|
|
|
@Override // o.C11786els
|
|
public final int c(int i) {
|
|
return Math.min(100, super.c(i));
|
|
}
|
|
}
|
|
|
|
private static View e(RecyclerView.tOB tob, MSs mSs) {
|
|
int i_ = tob.i_();
|
|
View view = null;
|
|
if (i_ == 0) {
|
|
return null;
|
|
}
|
|
int i = mSs != null ? mSs.i() : 0;
|
|
int i2 = Integer.MAX_VALUE;
|
|
for (int i3 = 0; i3 < i_; i3++) {
|
|
View f = tob.f(i3);
|
|
int abs = Math.abs((mSs != null ? mSs.c(f) : 0) - i);
|
|
if (abs < i2) {
|
|
view = f;
|
|
i2 = abs;
|
|
}
|
|
}
|
|
return view;
|
|
}
|
|
|
|
/* JADX WARN: Code restructure failed: missing block: B:6:0x0010, code lost:
|
|
|
|
if (o.C14957gcv.b(r0 != null ? r0.a() : null, r2) == false) goto L9;
|
|
*/
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
private final o.MSs c(androidx.recyclerview.widget.RecyclerView.tOB r2) {
|
|
/*
|
|
r1 = this;
|
|
o.MSs r0 = r1.b
|
|
if (r0 == 0) goto L12
|
|
if (r0 == 0) goto Lb
|
|
androidx.recyclerview.widget.RecyclerView$tOB r0 = r0.a()
|
|
goto Lc
|
|
Lb:
|
|
r0 = 0
|
|
Lc:
|
|
boolean r0 = o.C14957gcv.b(r0, r2)
|
|
if (r0 != 0) goto L19
|
|
L12:
|
|
o.MSs$3 r0 = new o.MSs$3
|
|
r0.<init>(r2)
|
|
r1.b = r0
|
|
L19:
|
|
o.MSs r2 = r1.b
|
|
return r2
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: o.C10297eAB.c(androidx.recyclerview.widget.RecyclerView$tOB):o.MSs");
|
|
}
|
|
|
|
/* JADX WARN: Code restructure failed: missing block: B:6:0x0010, code lost:
|
|
|
|
if (o.C14957gcv.b(r0 != null ? r0.a() : null, r2) == false) goto L9;
|
|
*/
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
private final o.MSs d(androidx.recyclerview.widget.RecyclerView.tOB r2) {
|
|
/*
|
|
r1 = this;
|
|
o.MSs r0 = r1.d
|
|
if (r0 == 0) goto L12
|
|
if (r0 == 0) goto Lb
|
|
androidx.recyclerview.widget.RecyclerView$tOB r0 = r0.a()
|
|
goto Lc
|
|
Lb:
|
|
r0 = 0
|
|
Lc:
|
|
boolean r0 = o.C14957gcv.b(r0, r2)
|
|
if (r0 != 0) goto L19
|
|
L12:
|
|
o.MSs$4 r0 = new o.MSs$4
|
|
r0.<init>(r2)
|
|
r1.d = r0
|
|
L19:
|
|
o.MSs r2 = r1.d
|
|
return r2
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: o.C10297eAB.d(androidx.recyclerview.widget.RecyclerView$tOB):o.MSs");
|
|
}
|
|
|
|
/* renamed from: o.eAB$HBt */
|
|
/* loaded from: classes5.dex */
|
|
public static final class HBt {
|
|
private HBt() {
|
|
}
|
|
|
|
public /* synthetic */ HBt(byte b) {
|
|
this();
|
|
}
|
|
}
|
|
|
|
static {
|
|
new HBt((byte) 0);
|
|
}
|
|
}
|