what-the-bank/sources/com/google/android/gms/internal/vision/zzgr.java

106 lines
3.4 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.internal.vision;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/* loaded from: classes2.dex */
final class zzgr extends zzgp {
private static final Class<?> zzyp = Collections.unmodifiableList(Collections.emptyList()).getClass();
private zzgr() {
super();
}
/* JADX INFO: Access modifiers changed from: package-private */
@Override // com.google.android.gms.internal.vision.zzgp
public final <L> List<L> zza(Object obj, long j) {
return zza(obj, j, 10);
}
/* JADX INFO: Access modifiers changed from: package-private */
@Override // com.google.android.gms.internal.vision.zzgp
public final void zzb(Object obj, long j) {
Object unmodifiableList;
List list = (List) zziu.zzp(obj, j);
if (list instanceof zzgo) {
unmodifiableList = ((zzgo) list).zzfu();
} else {
if (zzyp.isAssignableFrom(list.getClass())) {
return;
}
if ((list instanceof zzhr) && (list instanceof zzge)) {
zzge zzgeVar = (zzge) list;
if (zzgeVar.zzch()) {
zzgeVar.zzci();
return;
}
return;
}
unmodifiableList = Collections.unmodifiableList(list);
}
zziu.zza(obj, j, unmodifiableList);
}
/* JADX WARN: Multi-variable type inference failed */
private static <L> List<L> zza(Object obj, long j, int i) {
zzgn zzgnVar;
List<L> arrayList;
List<L> zzc = zzc(obj, j);
if (zzc.isEmpty()) {
if (zzc instanceof zzgo) {
arrayList = new zzgn(i);
} else if ((zzc instanceof zzhr) && (zzc instanceof zzge)) {
arrayList = ((zzge) zzc).zzah(i);
} else {
arrayList = new ArrayList<>(i);
}
zziu.zza(obj, j, arrayList);
return arrayList;
}
if (zzyp.isAssignableFrom(zzc.getClass())) {
ArrayList arrayList2 = new ArrayList(zzc.size() + i);
arrayList2.addAll(zzc);
zziu.zza(obj, j, arrayList2);
zzgnVar = arrayList2;
} else if (zzc instanceof zzir) {
zzgn zzgnVar2 = new zzgn(zzc.size() + i);
zzgnVar2.addAll((zzir) zzc);
zziu.zza(obj, j, zzgnVar2);
zzgnVar = zzgnVar2;
} else {
if (!(zzc instanceof zzhr) || !(zzc instanceof zzge)) {
return zzc;
}
zzge zzgeVar = (zzge) zzc;
if (zzgeVar.zzch()) {
return zzc;
}
zzge zzah = zzgeVar.zzah(zzc.size() + i);
zziu.zza(obj, j, zzah);
return zzah;
}
return zzgnVar;
}
/* JADX INFO: Access modifiers changed from: package-private */
@Override // com.google.android.gms.internal.vision.zzgp
public final <E> void zza(Object obj, Object obj2, long j) {
List zzc = zzc(obj2, j);
List zza = zza(obj, j, zzc.size());
int size = zza.size();
int size2 = zzc.size();
if (size > 0 && size2 > 0) {
zza.addAll(zzc);
}
if (size > 0) {
zzc = zza;
}
zziu.zza(obj, j, zzc);
}
private static <E> List<E> zzc(Object obj, long j) {
return (List) zziu.zzp(obj, j);
}
}