288 lines
8.2 KiB
Java
288 lines
8.2 KiB
Java
package o;
|
|
|
|
import android.view.ViewGroup;
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
import androidx.recyclerview.widget.RecyclerView.zJl;
|
|
import java.util.Collections;
|
|
import java.util.List;
|
|
import o.vYn;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public class DDX<VH extends RecyclerView.zJl> extends RecyclerView.Sts<VH> implements FcI<VH>, vYn.RVV {
|
|
private static List<Object> c = Collections.emptyList();
|
|
private vYn a;
|
|
public RecyclerView.Sts<VH> d;
|
|
|
|
public void a() {
|
|
}
|
|
|
|
public DDX(RecyclerView.Sts<VH> sts) {
|
|
this.d = sts;
|
|
vYn vyn = new vYn(this, this.d);
|
|
this.a = vyn;
|
|
this.d.registerAdapterDataObserver(vyn);
|
|
super.setHasStableIds(this.d.hasStableIds());
|
|
}
|
|
|
|
@Override // o.FcI
|
|
public final void d(List<RecyclerView.Sts> list) {
|
|
RecyclerView.Sts<VH> sts = this.d;
|
|
if (sts != null) {
|
|
list.add(sts);
|
|
}
|
|
}
|
|
|
|
@Override // o.FcI
|
|
public final void c() {
|
|
vYn vyn;
|
|
a();
|
|
RecyclerView.Sts<VH> sts = this.d;
|
|
if (sts != null && (vyn = this.a) != null) {
|
|
sts.unregisterAdapterDataObserver(vyn);
|
|
}
|
|
this.d = null;
|
|
this.a = null;
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
|
public void onViewAttachedToWindow(VH vh) {
|
|
int itemViewType = vh.getItemViewType();
|
|
RecyclerView.Sts<VH> sts = this.d;
|
|
if (sts != 0) {
|
|
if (sts instanceof InterfaceC7784cup) {
|
|
((InterfaceC7784cup) sts).d(vh, itemViewType);
|
|
} else {
|
|
sts.onViewAttachedToWindow(vh);
|
|
}
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
|
public void onViewDetachedFromWindow(VH vh) {
|
|
int itemViewType = vh.getItemViewType();
|
|
RecyclerView.Sts<VH> sts = this.d;
|
|
if (sts != 0) {
|
|
if (sts instanceof InterfaceC7784cup) {
|
|
((InterfaceC7784cup) sts).a_(vh, itemViewType);
|
|
} else {
|
|
sts.onViewDetachedFromWindow(vh);
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
|
public void onViewRecycled(VH vh) {
|
|
b((DDX<VH>) vh, vh.getItemViewType());
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
|
public boolean onFailedToRecycleView(VH vh) {
|
|
boolean onFailedToRecycleView;
|
|
int itemViewType = vh.getItemViewType();
|
|
RecyclerView.Sts<VH> sts = this.d;
|
|
if (sts != 0) {
|
|
if (sts instanceof InterfaceC7784cup) {
|
|
onFailedToRecycleView = ((InterfaceC7784cup) sts).a(vh, itemViewType);
|
|
} else {
|
|
onFailedToRecycleView = sts.onFailedToRecycleView(vh);
|
|
}
|
|
if (onFailedToRecycleView) {
|
|
return true;
|
|
}
|
|
}
|
|
return super.onFailedToRecycleView(vh);
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
|
public void setHasStableIds(boolean z) {
|
|
super.setHasStableIds(z);
|
|
RecyclerView.Sts<VH> sts = this.d;
|
|
if (sts != null) {
|
|
sts.setHasStableIds(z);
|
|
}
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
|
public VH onCreateViewHolder(ViewGroup viewGroup, int i) {
|
|
return this.d.onCreateViewHolder(viewGroup, i);
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
|
public void onBindViewHolder(VH vh, int i) {
|
|
onBindViewHolder(vh, i, c);
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
|
public long getItemId(int i) {
|
|
return this.d.getItemId(i);
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
|
public int getItemViewType(int i) {
|
|
return this.d.getItemViewType(i);
|
|
}
|
|
|
|
@Override // o.FcI
|
|
public final int c(C16978sqI c16978sqI, int i) {
|
|
if (c16978sqI.e == this.d) {
|
|
return i;
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
public void e() {
|
|
notifyDataSetChanged();
|
|
}
|
|
|
|
public void b(int i, int i2) {
|
|
notifyItemRangeChanged(i, i2);
|
|
}
|
|
|
|
public void f(int i, int i2) {
|
|
notifyItemRangeInserted(i, i2);
|
|
}
|
|
|
|
public void j(int i, int i2) {
|
|
notifyItemRangeRemoved(i, i2);
|
|
}
|
|
|
|
public void d(int i, int i2, int i3) {
|
|
if (i3 != 1) {
|
|
StringBuilder sb = new StringBuilder("itemCount should be always 1 (actual: ");
|
|
sb.append(i3);
|
|
sb.append(")");
|
|
throw new IllegalStateException(sb.toString());
|
|
}
|
|
notifyItemMoved(i, i2);
|
|
}
|
|
|
|
@Override // o.vYn.RVV
|
|
public final void d() {
|
|
e();
|
|
}
|
|
|
|
@Override // o.vYn.RVV
|
|
public final void d(int i, int i2) {
|
|
b(i, i2);
|
|
}
|
|
|
|
@Override // o.vYn.RVV
|
|
public final void a(int i, int i2) {
|
|
f(i, i2);
|
|
}
|
|
|
|
@Override // o.vYn.RVV
|
|
public final void a_(int i, int i2) {
|
|
j(i, i2);
|
|
}
|
|
|
|
@Override // o.vYn.RVV
|
|
public final void b_(int i, int i2) {
|
|
d(i, i2, 1);
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
|
public int getItemCount() {
|
|
RecyclerView.Sts<VH> sts = this.d;
|
|
if (sts != null) {
|
|
return sts.getItemCount();
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
|
public void onAttachedToRecyclerView(RecyclerView recyclerView) {
|
|
RecyclerView.Sts<VH> sts = this.d;
|
|
if (sts != null) {
|
|
sts.onAttachedToRecyclerView(recyclerView);
|
|
}
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
|
public void onBindViewHolder(VH vh, int i, List<Object> list) {
|
|
RecyclerView.Sts<VH> sts = this.d;
|
|
if (sts != null) {
|
|
sts.onBindViewHolder(vh, i, list);
|
|
}
|
|
}
|
|
|
|
@Override // o.vYn.RVV
|
|
public final void e(int i, int i2, Object obj) {
|
|
notifyItemRangeChanged(i, i2, obj);
|
|
}
|
|
|
|
@Override // androidx.recyclerview.widget.RecyclerView.Sts
|
|
public void onDetachedFromRecyclerView(RecyclerView recyclerView) {
|
|
RecyclerView.Sts<VH> sts = this.d;
|
|
if (sts != null) {
|
|
sts.onDetachedFromRecyclerView(recyclerView);
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
@Override // o.InterfaceC7784cup
|
|
public final boolean a(VH vh, int i) {
|
|
boolean onFailedToRecycleView;
|
|
RecyclerView.Sts<VH> sts = this.d;
|
|
if (sts != 0) {
|
|
if (sts instanceof InterfaceC7784cup) {
|
|
onFailedToRecycleView = ((InterfaceC7784cup) sts).a(vh, i);
|
|
} else {
|
|
onFailedToRecycleView = sts.onFailedToRecycleView(vh);
|
|
}
|
|
if (onFailedToRecycleView) {
|
|
return true;
|
|
}
|
|
}
|
|
return super.onFailedToRecycleView(vh);
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
@Override // o.InterfaceC7784cup
|
|
public final void d(VH vh, int i) {
|
|
RecyclerView.Sts<VH> sts = this.d;
|
|
if (sts != 0) {
|
|
if (sts instanceof InterfaceC7784cup) {
|
|
((InterfaceC7784cup) sts).d(vh, i);
|
|
} else {
|
|
sts.onViewAttachedToWindow(vh);
|
|
}
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
@Override // o.InterfaceC7784cup
|
|
public final void a_(VH vh, int i) {
|
|
RecyclerView.Sts<VH> sts = this.d;
|
|
if (sts != 0) {
|
|
if (sts instanceof InterfaceC7784cup) {
|
|
((InterfaceC7784cup) sts).a_(vh, i);
|
|
} else {
|
|
sts.onViewDetachedFromWindow(vh);
|
|
}
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
@Override // o.InterfaceC7784cup
|
|
public void b(VH vh, int i) {
|
|
RecyclerView.Sts<VH> sts = this.d;
|
|
if (sts != 0) {
|
|
if (sts instanceof FcI) {
|
|
((FcI) sts).b(vh, i);
|
|
} else {
|
|
sts.onViewRecycled(vh);
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // o.FcI
|
|
public final void e(KBU kbu, int i) {
|
|
kbu.b = this.d;
|
|
kbu.e = i;
|
|
}
|
|
}
|