140 lines
3.7 KiB
Java
140 lines
3.7 KiB
Java
package o;
|
|
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
import o.RDy;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class Zfp {
|
|
public final DFj<RecyclerView.zJl, HBt> d = new DFj<>();
|
|
public final C0667Ltg<RecyclerView.zJl> b = new C0667Ltg<>();
|
|
|
|
/* loaded from: classes.dex */
|
|
public interface RVV {
|
|
void a(RecyclerView.zJl zjl, RecyclerView.jbe.Sts sts, RecyclerView.jbe.Sts sts2);
|
|
|
|
void d(RecyclerView.zJl zjl);
|
|
|
|
void d(RecyclerView.zJl zjl, RecyclerView.jbe.Sts sts, RecyclerView.jbe.Sts sts2);
|
|
|
|
void e(RecyclerView.zJl zjl, RecyclerView.jbe.Sts sts, RecyclerView.jbe.Sts sts2);
|
|
}
|
|
|
|
public final void c(RecyclerView.zJl zjl, RecyclerView.jbe.Sts sts) {
|
|
HBt hBt = this.d.get(zjl);
|
|
if (hBt == null) {
|
|
hBt = HBt.b();
|
|
this.d.put(zjl, hBt);
|
|
}
|
|
hBt.a = sts;
|
|
hBt.d |= 4;
|
|
}
|
|
|
|
public final boolean c(RecyclerView.zJl zjl) {
|
|
HBt hBt = this.d.get(zjl);
|
|
return (hBt == null || (hBt.d & 1) == 0) ? false : true;
|
|
}
|
|
|
|
public final void b(RecyclerView.zJl zjl, RecyclerView.jbe.Sts sts) {
|
|
HBt hBt = this.d.get(zjl);
|
|
if (hBt == null) {
|
|
hBt = HBt.b();
|
|
this.d.put(zjl, hBt);
|
|
}
|
|
hBt.b = sts;
|
|
hBt.d |= 8;
|
|
}
|
|
|
|
public final void e(RecyclerView.zJl zjl) {
|
|
HBt hBt = this.d.get(zjl);
|
|
if (hBt == null) {
|
|
hBt = HBt.b();
|
|
this.d.put(zjl, hBt);
|
|
}
|
|
hBt.d |= 1;
|
|
}
|
|
|
|
public final void b(RecyclerView.zJl zjl) {
|
|
C0667Ltg<RecyclerView.zJl> c0667Ltg = this.b;
|
|
if (c0667Ltg.b) {
|
|
c0667Ltg.c();
|
|
}
|
|
int i = c0667Ltg.a - 1;
|
|
while (true) {
|
|
if (i < 0) {
|
|
break;
|
|
}
|
|
C0667Ltg<RecyclerView.zJl> c0667Ltg2 = this.b;
|
|
if (c0667Ltg2.b) {
|
|
c0667Ltg2.c();
|
|
}
|
|
if (zjl == c0667Ltg2.c[i]) {
|
|
C0667Ltg<RecyclerView.zJl> c0667Ltg3 = this.b;
|
|
Object[] objArr = c0667Ltg3.c;
|
|
Object obj = objArr[i];
|
|
Object obj2 = C0667Ltg.d;
|
|
if (obj != obj2) {
|
|
objArr[i] = obj2;
|
|
c0667Ltg3.b = true;
|
|
}
|
|
} else {
|
|
i--;
|
|
}
|
|
}
|
|
HBt remove = this.d.remove(zjl);
|
|
if (remove != null) {
|
|
HBt.e(remove);
|
|
}
|
|
}
|
|
|
|
/* loaded from: classes.dex */
|
|
public static class HBt {
|
|
private static RDy.Sts<HBt> e = new RDy.RVV(20);
|
|
public RecyclerView.jbe.Sts a;
|
|
public RecyclerView.jbe.Sts b;
|
|
public int d;
|
|
|
|
private HBt() {
|
|
}
|
|
|
|
public static HBt b() {
|
|
HBt d = e.d();
|
|
return d == null ? new HBt() : d;
|
|
}
|
|
|
|
public static void e(HBt hBt) {
|
|
hBt.d = 0;
|
|
hBt.a = null;
|
|
hBt.b = null;
|
|
e.d(hBt);
|
|
}
|
|
|
|
public static void a() {
|
|
do {
|
|
} while (e.d() != null);
|
|
}
|
|
}
|
|
|
|
public final RecyclerView.jbe.Sts e(RecyclerView.zJl zjl, int i) {
|
|
HBt hBt;
|
|
RecyclerView.jbe.Sts sts;
|
|
DFj<RecyclerView.zJl, HBt> dFj = this.d;
|
|
int d = zjl == null ? dFj.d() : dFj.c(zjl, zjl.hashCode());
|
|
if (d < 0 || (hBt = (HBt) this.d.e[(d << 1) + 1]) == null || (hBt.d & i) == 0) {
|
|
return null;
|
|
}
|
|
hBt.d &= ~i;
|
|
if (i == 4) {
|
|
sts = hBt.a;
|
|
} else if (i == 8) {
|
|
sts = hBt.b;
|
|
} else {
|
|
throw new IllegalArgumentException("Must provide flag PRE or POST");
|
|
}
|
|
if ((hBt.d & 12) == 0) {
|
|
this.d.c(d);
|
|
HBt.e(hBt);
|
|
}
|
|
return sts;
|
|
}
|
|
}
|