108 lines
3.6 KiB
Java
108 lines
3.6 KiB
Java
package o;
|
|
|
|
import java.security.GeneralSecurityException;
|
|
import java.util.ArrayList;
|
|
import java.util.Collections;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import o.DJW;
|
|
import o.FdT;
|
|
import o.InterfaceC17129uEO;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class MWX {
|
|
public static final InterfaceC17129uEO.IeS b = new Sts(0);
|
|
|
|
/* loaded from: classes2.dex */
|
|
static class Sts implements InterfaceC17129uEO.IeS {
|
|
private Sts() {
|
|
}
|
|
|
|
/* synthetic */ Sts(byte b) {
|
|
this();
|
|
}
|
|
}
|
|
|
|
/* renamed from: o.MWX$2, reason: invalid class name */
|
|
/* loaded from: classes2.dex */
|
|
static /* synthetic */ class AnonymousClass2 {
|
|
static final int[] a;
|
|
|
|
static {
|
|
int[] iArr = new int[NzM.values().length];
|
|
a = iArr;
|
|
try {
|
|
iArr[NzM.ENABLED.ordinal()] = 1;
|
|
} catch (NoSuchFieldError unused) {
|
|
}
|
|
try {
|
|
a[NzM.DISABLED.ordinal()] = 2;
|
|
} catch (NoSuchFieldError unused2) {
|
|
}
|
|
try {
|
|
a[NzM.DESTROYED.ordinal()] = 3;
|
|
} catch (NoSuchFieldError unused3) {
|
|
}
|
|
}
|
|
}
|
|
|
|
public static <P> DJW d(FdT<P> fdT) {
|
|
C0189BJj c0189BJj;
|
|
DJW.IeS ieS = new DJW.IeS();
|
|
yiD yid = fdT.e;
|
|
if (ieS.d != null) {
|
|
ieS.b = yid;
|
|
Iterator<List<FdT.HBt<P>>> it = fdT.c.values().iterator();
|
|
while (it.hasNext()) {
|
|
for (FdT.HBt<P> hBt : it.next()) {
|
|
int i = AnonymousClass2.a[hBt.g.ordinal()];
|
|
if (i == 1) {
|
|
c0189BJj = C0189BJj.c;
|
|
} else if (i == 2) {
|
|
c0189BJj = C0189BJj.a;
|
|
} else if (i == 3) {
|
|
c0189BJj = C0189BJj.e;
|
|
} else {
|
|
throw new IllegalStateException("Unknown key status");
|
|
}
|
|
int i2 = hBt.d;
|
|
HeE e = hBt.a.e();
|
|
ArrayList<DJW.HBt> arrayList = ieS.d;
|
|
if (arrayList == null) {
|
|
throw new IllegalStateException("addEntry cannot be called after build()");
|
|
}
|
|
arrayList.add(new DJW.HBt(c0189BJj, i2, e, (byte) 0));
|
|
}
|
|
}
|
|
if (fdT.a != null) {
|
|
int i3 = fdT.a.d;
|
|
if (ieS.d == null) {
|
|
throw new IllegalStateException("setPrimaryKeyId cannot be called after build()");
|
|
}
|
|
ieS.c = Integer.valueOf(i3);
|
|
}
|
|
try {
|
|
if (ieS.d == null) {
|
|
throw new IllegalStateException("cannot call build() twice");
|
|
}
|
|
Integer num = ieS.c;
|
|
if (num != null) {
|
|
int intValue = num.intValue();
|
|
Iterator<DJW.HBt> it2 = ieS.d.iterator();
|
|
while (it2.hasNext()) {
|
|
if (it2.next().a == intValue) {
|
|
}
|
|
}
|
|
throw new GeneralSecurityException("primary key ID is not present in entries");
|
|
}
|
|
DJW djw = new DJW(ieS.b, Collections.unmodifiableList(ieS.d), ieS.c, (byte) 0);
|
|
ieS.d = null;
|
|
return djw;
|
|
} catch (GeneralSecurityException e2) {
|
|
throw new IllegalStateException(e2);
|
|
}
|
|
}
|
|
throw new IllegalStateException("setAnnotations cannot be called after build()");
|
|
}
|
|
}
|