91 lines
3.0 KiB
Java
91 lines
3.0 KiB
Java
|
package com.google.android.gms.internal.firebase_ml;
|
||
|
|
||
|
import java.util.ArrayList;
|
||
|
import java.util.Collections;
|
||
|
import java.util.List;
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
final class zzva extends zzuy {
|
||
|
private static final Class<?> zzbqg = Collections.unmodifiableList(Collections.emptyList()).getClass();
|
||
|
|
||
|
private zzva() {
|
||
|
super();
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.android.gms.internal.firebase_ml.zzuy
|
||
|
public final void zzb(Object obj, long j) {
|
||
|
Object unmodifiableList;
|
||
|
List list = (List) zzxc.zzp(obj, j);
|
||
|
if (list instanceof zzux) {
|
||
|
unmodifiableList = ((zzux) list).zzrw();
|
||
|
} else {
|
||
|
if (zzbqg.isAssignableFrom(list.getClass())) {
|
||
|
return;
|
||
|
}
|
||
|
if ((list instanceof zzwa) && (list instanceof zzun)) {
|
||
|
zzun zzunVar = (zzun) list;
|
||
|
if (zzunVar.zzps()) {
|
||
|
zzunVar.zzpt();
|
||
|
return;
|
||
|
}
|
||
|
return;
|
||
|
}
|
||
|
unmodifiableList = Collections.unmodifiableList(list);
|
||
|
}
|
||
|
zzxc.zza(obj, j, unmodifiableList);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* JADX WARN: Multi-variable type inference failed */
|
||
|
@Override // com.google.android.gms.internal.firebase_ml.zzuy
|
||
|
public final <E> void zza(Object obj, Object obj2, long j) {
|
||
|
zzuw zzuwVar;
|
||
|
List zzc = zzc(obj2, j);
|
||
|
int size = zzc.size();
|
||
|
List zzc2 = zzc(obj, j);
|
||
|
if (zzc2.isEmpty()) {
|
||
|
if (zzc2 instanceof zzux) {
|
||
|
zzc2 = new zzuw(size);
|
||
|
} else if ((zzc2 instanceof zzwa) && (zzc2 instanceof zzun)) {
|
||
|
zzc2 = ((zzun) zzc2).zzck(size);
|
||
|
} else {
|
||
|
zzc2 = new ArrayList(size);
|
||
|
}
|
||
|
zzxc.zza(obj, j, zzc2);
|
||
|
} else {
|
||
|
if (zzbqg.isAssignableFrom(zzc2.getClass())) {
|
||
|
ArrayList arrayList = new ArrayList(zzc2.size() + size);
|
||
|
arrayList.addAll(zzc2);
|
||
|
zzxc.zza(obj, j, arrayList);
|
||
|
zzuwVar = arrayList;
|
||
|
} else if (zzc2 instanceof zzwz) {
|
||
|
zzuw zzuwVar2 = new zzuw(zzc2.size() + size);
|
||
|
zzuwVar2.addAll((zzwz) zzc2);
|
||
|
zzxc.zza(obj, j, zzuwVar2);
|
||
|
zzuwVar = zzuwVar2;
|
||
|
} else if ((zzc2 instanceof zzwa) && (zzc2 instanceof zzun)) {
|
||
|
zzun zzunVar = (zzun) zzc2;
|
||
|
if (!zzunVar.zzps()) {
|
||
|
zzc2 = zzunVar.zzck(zzc2.size() + size);
|
||
|
zzxc.zza(obj, j, zzc2);
|
||
|
}
|
||
|
}
|
||
|
zzc2 = zzuwVar;
|
||
|
}
|
||
|
int size2 = zzc2.size();
|
||
|
int size3 = zzc.size();
|
||
|
if (size2 > 0 && size3 > 0) {
|
||
|
zzc2.addAll(zzc);
|
||
|
}
|
||
|
if (size2 > 0) {
|
||
|
zzc = zzc2;
|
||
|
}
|
||
|
zzxc.zza(obj, j, zzc);
|
||
|
}
|
||
|
|
||
|
private static <E> List<E> zzc(Object obj, long j) {
|
||
|
return (List) zzxc.zzp(obj, j);
|
||
|
}
|
||
|
}
|