295 lines
9.7 KiB
Java
295 lines
9.7 KiB
Java
|
package o;
|
||
|
|
||
|
import android.app.Application;
|
||
|
import java.lang.reflect.InvocationTargetException;
|
||
|
import o.CWH;
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public final class VLM {
|
||
|
private final LWm a;
|
||
|
private final sUv c;
|
||
|
private final CWH d;
|
||
|
|
||
|
private VLM(sUv suv, LWm lWm, CWH cwh) {
|
||
|
C14957gcv.e(suv, "");
|
||
|
C14957gcv.e(lWm, "");
|
||
|
C14957gcv.e(cwh, "");
|
||
|
this.c = suv;
|
||
|
this.a = lWm;
|
||
|
this.d = cwh;
|
||
|
}
|
||
|
|
||
|
private /* synthetic */ VLM(sUv suv, LWm lWm, byte b) {
|
||
|
this(suv, lWm, CWH.RVV.b);
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public interface LWm {
|
||
|
default <T extends VKL> T create(Class<T> cls) {
|
||
|
C14957gcv.e(cls, "");
|
||
|
throw new UnsupportedOperationException("Factory.create(String) is unsupported. This Factory requires `CreationExtras` to be passed into `create` method.");
|
||
|
}
|
||
|
|
||
|
default <T extends VKL> T create(Class<T> cls, CWH cwh) {
|
||
|
C14957gcv.e(cls, "");
|
||
|
C14957gcv.e(cwh, "");
|
||
|
return (T) create(cls);
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public static final class IeS {
|
||
|
static final IeS e = new IeS();
|
||
|
|
||
|
private IeS() {
|
||
|
}
|
||
|
}
|
||
|
|
||
|
static {
|
||
|
IeS ieS = IeS.e;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: Illegal instructions before constructor call */
|
||
|
/*
|
||
|
Code decompiled incorrectly, please refer to instructions dump.
|
||
|
To view partially-correct add '--show-bad-code' argument
|
||
|
*/
|
||
|
public VLM(o.InterfaceC0940Ryk r4) {
|
||
|
/*
|
||
|
r3 = this;
|
||
|
java.lang.String r0 = ""
|
||
|
o.C14957gcv.e(r4, r0)
|
||
|
o.sUv r1 = r4.getViewModelStore()
|
||
|
o.C14957gcv.c(r1, r0)
|
||
|
o.VLM$Sts$IeS r2 = o.VLM.Sts.e
|
||
|
o.C14957gcv.e(r4, r0)
|
||
|
boolean r2 = r4 instanceof o.GvH
|
||
|
if (r2 == 0) goto L20
|
||
|
r2 = r4
|
||
|
o.GvH r2 = (o.GvH) r2
|
||
|
o.VLM$LWm r2 = r2.getDefaultViewModelProviderFactory()
|
||
|
o.C14957gcv.c(r2, r0)
|
||
|
goto L3a
|
||
|
L20:
|
||
|
o.VLM$IeS$RVV r0 = o.VLM.IeS.b
|
||
|
o.VLM$IeS r0 = o.VLM.IeS.d()
|
||
|
if (r0 != 0) goto L30
|
||
|
o.VLM$IeS r0 = new o.VLM$IeS
|
||
|
r0.<init>()
|
||
|
o.VLM.IeS.e(r0)
|
||
|
L30:
|
||
|
o.VLM$IeS r0 = o.VLM.IeS.d()
|
||
|
o.C14957gcv.e(r0)
|
||
|
r2 = r0
|
||
|
o.VLM$LWm r2 = (o.VLM.LWm) r2
|
||
|
L3a:
|
||
|
o.CWH r4 = o.REL.d(r4)
|
||
|
r3.<init>(r1, r2, r4)
|
||
|
return
|
||
|
*/
|
||
|
throw new UnsupportedOperationException("Method not decompiled: o.VLM.<init>(o.Ryk):void");
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: Illegal instructions before constructor call */
|
||
|
/*
|
||
|
Code decompiled incorrectly, please refer to instructions dump.
|
||
|
To view partially-correct add '--show-bad-code' argument
|
||
|
*/
|
||
|
public VLM(o.InterfaceC0940Ryk r3, o.VLM.LWm r4) {
|
||
|
/*
|
||
|
r2 = this;
|
||
|
java.lang.String r0 = ""
|
||
|
o.C14957gcv.e(r3, r0)
|
||
|
o.C14957gcv.e(r4, r0)
|
||
|
o.sUv r1 = r3.getViewModelStore()
|
||
|
o.C14957gcv.c(r1, r0)
|
||
|
o.CWH r3 = o.REL.d(r3)
|
||
|
r2.<init>(r1, r4, r3)
|
||
|
return
|
||
|
*/
|
||
|
throw new UnsupportedOperationException("Method not decompiled: o.VLM.<init>(o.Ryk, o.VLM$LWm):void");
|
||
|
}
|
||
|
|
||
|
public final <T extends VKL> T b(Class<T> cls) {
|
||
|
C14957gcv.e(cls, "");
|
||
|
String canonicalName = cls.getCanonicalName();
|
||
|
if (canonicalName == null) {
|
||
|
throw new IllegalArgumentException("Local and anonymous classes can not be ViewModels");
|
||
|
}
|
||
|
return (T) d("androidx.lifecycle.ViewModelProvider.DefaultKey:".concat(String.valueOf(canonicalName)), cls);
|
||
|
}
|
||
|
|
||
|
public final <T extends VKL> T d(String str, Class<T> cls) {
|
||
|
T t;
|
||
|
C14957gcv.e(str, "");
|
||
|
C14957gcv.e(cls, "");
|
||
|
T t2 = (T) this.c.e.get(str);
|
||
|
if (cls.isInstance(t2)) {
|
||
|
Object obj = this.a;
|
||
|
RVV rvv = obj instanceof RVV ? (RVV) obj : null;
|
||
|
if (rvv != null) {
|
||
|
C14957gcv.c(t2, "");
|
||
|
rvv.e(t2);
|
||
|
}
|
||
|
if (t2 != null) {
|
||
|
return t2;
|
||
|
}
|
||
|
throw new NullPointerException("null cannot be cast to non-null type T of androidx.lifecycle.ViewModelProvider.get");
|
||
|
}
|
||
|
CVP cvp = new CVP(this.d);
|
||
|
CWH.Sts<String> sts = IeS.c;
|
||
|
C14957gcv.e(sts, "");
|
||
|
cvp.d.put(sts, str);
|
||
|
try {
|
||
|
t = (T) this.a.create(cls, cvp);
|
||
|
} catch (AbstractMethodError unused) {
|
||
|
t = (T) this.a.create(cls);
|
||
|
}
|
||
|
VKL put = this.c.e.put(str, t);
|
||
|
if (put != null) {
|
||
|
put.onCleared();
|
||
|
}
|
||
|
return t;
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public static class IeS implements LWm {
|
||
|
private static IeS a;
|
||
|
public static final RVV b = new RVV(0);
|
||
|
public static final CWH.Sts<String> c = RVV.C0096RVV.d;
|
||
|
|
||
|
@Override // o.VLM.LWm
|
||
|
public <T extends VKL> T create(Class<T> cls) {
|
||
|
C14957gcv.e(cls, "");
|
||
|
try {
|
||
|
T newInstance = cls.newInstance();
|
||
|
C14957gcv.c(newInstance, "");
|
||
|
return newInstance;
|
||
|
} catch (IllegalAccessException e) {
|
||
|
throw new RuntimeException("Cannot create an instance of ".concat(String.valueOf(cls)), e);
|
||
|
} catch (InstantiationException e2) {
|
||
|
throw new RuntimeException("Cannot create an instance of ".concat(String.valueOf(cls)), e2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public static final class RVV {
|
||
|
private RVV() {
|
||
|
}
|
||
|
|
||
|
/* renamed from: o.VLM$IeS$RVV$RVV, reason: collision with other inner class name */
|
||
|
/* loaded from: classes.dex */
|
||
|
static final class C0096RVV implements CWH.Sts<String> {
|
||
|
public static final C0096RVV d = new C0096RVV();
|
||
|
|
||
|
private C0096RVV() {
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public /* synthetic */ RVV(byte b) {
|
||
|
this();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public static class Sts extends IeS {
|
||
|
private static Sts d;
|
||
|
private final Application j;
|
||
|
public static final IeS e = new IeS(0);
|
||
|
public static final CWH.Sts<Application> a = IeS.RVV.c;
|
||
|
|
||
|
private Sts(Application application, byte b) {
|
||
|
this.j = application;
|
||
|
}
|
||
|
|
||
|
public Sts() {
|
||
|
this(null, (byte) 0);
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
|
||
|
public Sts(Application application) {
|
||
|
this(application, (byte) 0);
|
||
|
C14957gcv.e(application, "");
|
||
|
}
|
||
|
|
||
|
@Override // o.VLM.LWm
|
||
|
public final <T extends VKL> T create(Class<T> cls, CWH cwh) {
|
||
|
C14957gcv.e(cls, "");
|
||
|
C14957gcv.e(cwh, "");
|
||
|
if (this.j != null) {
|
||
|
return (T) create(cls);
|
||
|
}
|
||
|
Application application = (Application) cwh.d(a);
|
||
|
if (application != null) {
|
||
|
return (T) zB_(cls, application);
|
||
|
}
|
||
|
if (XRU.class.isAssignableFrom(cls)) {
|
||
|
throw new IllegalArgumentException("CreationExtras must have an application by `APPLICATION_KEY`");
|
||
|
}
|
||
|
return (T) super.create(cls);
|
||
|
}
|
||
|
|
||
|
@Override // o.VLM.IeS, o.VLM.LWm
|
||
|
public final <T extends VKL> T create(Class<T> cls) {
|
||
|
C14957gcv.e(cls, "");
|
||
|
Application application = this.j;
|
||
|
if (application == null) {
|
||
|
throw new UnsupportedOperationException("AndroidViewModelFactory constructed with empty constructor works only with create(modelClass: Class<T>, extras: CreationExtras).");
|
||
|
}
|
||
|
return (T) zB_(cls, application);
|
||
|
}
|
||
|
|
||
|
private final <T extends VKL> T zB_(Class<T> cls, Application application) {
|
||
|
if (XRU.class.isAssignableFrom(cls)) {
|
||
|
try {
|
||
|
T newInstance = cls.getConstructor(Application.class).newInstance(application);
|
||
|
C14957gcv.c(newInstance, "");
|
||
|
return newInstance;
|
||
|
} catch (IllegalAccessException e2) {
|
||
|
throw new RuntimeException("Cannot create an instance of ".concat(String.valueOf(cls)), e2);
|
||
|
} catch (InstantiationException e3) {
|
||
|
throw new RuntimeException("Cannot create an instance of ".concat(String.valueOf(cls)), e3);
|
||
|
} catch (NoSuchMethodException e4) {
|
||
|
throw new RuntimeException("Cannot create an instance of ".concat(String.valueOf(cls)), e4);
|
||
|
} catch (InvocationTargetException e5) {
|
||
|
throw new RuntimeException("Cannot create an instance of ".concat(String.valueOf(cls)), e5);
|
||
|
}
|
||
|
}
|
||
|
return (T) super.create(cls);
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public static final class IeS {
|
||
|
private IeS() {
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
static final class RVV implements CWH.Sts<Application> {
|
||
|
public static final RVV c = new RVV();
|
||
|
|
||
|
private RVV() {
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public /* synthetic */ IeS(byte b) {
|
||
|
this();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public static class RVV {
|
||
|
public void e(VKL vkl) {
|
||
|
C14957gcv.e(vkl, "");
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
|
||
|
public VLM(sUv suv, LWm lWm) {
|
||
|
this(suv, lWm, (byte) 0);
|
||
|
C14957gcv.e(suv, "");
|
||
|
C14957gcv.e(lWm, "");
|
||
|
}
|
||
|
}
|