117 lines
4.3 KiB
Java
117 lines
4.3 KiB
Java
package o;
|
|
|
|
import android.os.Bundle;
|
|
import androidx.lifecycle.SavedStateHandleAttacher;
|
|
import o.CWH;
|
|
import o.FNE;
|
|
import o.NER;
|
|
import o.VLM;
|
|
import o.wdQ;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class HLt {
|
|
public static final CWH.Sts<InterfaceC9254dgJ> a = new RVV();
|
|
public static final CWH.Sts<InterfaceC0940Ryk> b = new Sts();
|
|
public static final CWH.Sts<Bundle> e = new LWm();
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public static final <T extends InterfaceC9254dgJ & InterfaceC0940Ryk> void d(T t) {
|
|
C14957gcv.e(t, "");
|
|
wdQ.IeS a2 = t.getLifecycle().a();
|
|
C14957gcv.c(a2, "");
|
|
if (a2 != wdQ.IeS.INITIALIZED && a2 != wdQ.IeS.CREATED) {
|
|
throw new IllegalArgumentException("Failed requirement.".toString());
|
|
}
|
|
if (t.getSavedStateRegistry().a("androidx.lifecycle.internal.SavedStateHandlesProvider") == null) {
|
|
C7768cuZ c7768cuZ = new C7768cuZ(t.getSavedStateRegistry(), t);
|
|
t.getSavedStateRegistry().a("androidx.lifecycle.internal.SavedStateHandlesProvider", c7768cuZ);
|
|
t.getLifecycle().e(new SavedStateHandleAttacher(c7768cuZ));
|
|
}
|
|
}
|
|
|
|
public static final NER a(CWH cwh) {
|
|
C14957gcv.e(cwh, "");
|
|
InterfaceC9254dgJ interfaceC9254dgJ = (InterfaceC9254dgJ) cwh.d(a);
|
|
if (interfaceC9254dgJ == null) {
|
|
throw new IllegalArgumentException("CreationExtras must have a value by `SAVED_STATE_REGISTRY_OWNER_KEY`");
|
|
}
|
|
InterfaceC0940Ryk interfaceC0940Ryk = (InterfaceC0940Ryk) cwh.d(b);
|
|
if (interfaceC0940Ryk == null) {
|
|
throw new IllegalArgumentException("CreationExtras must have a value by `VIEW_MODEL_STORE_OWNER_KEY`");
|
|
}
|
|
Bundle bundle = (Bundle) cwh.d(e);
|
|
String str = (String) cwh.d(VLM.IeS.c);
|
|
if (str == null) {
|
|
throw new IllegalArgumentException("CreationExtras must have a value by `VIEW_MODEL_KEY`");
|
|
}
|
|
C14957gcv.e(interfaceC9254dgJ, "");
|
|
FNE.Sts a2 = interfaceC9254dgJ.getSavedStateRegistry().a("androidx.lifecycle.internal.SavedStateHandlesProvider");
|
|
C7768cuZ c7768cuZ = a2 instanceof C7768cuZ ? (C7768cuZ) a2 : null;
|
|
if (c7768cuZ != null) {
|
|
ntM b2 = b(interfaceC0940Ryk);
|
|
NER ner = b2.b.get(str);
|
|
if (ner != null) {
|
|
return ner;
|
|
}
|
|
NER.HBt hBt = NER.c;
|
|
C14957gcv.e(str, "");
|
|
c7768cuZ.e();
|
|
Bundle bundle2 = c7768cuZ.a;
|
|
Bundle bundle3 = bundle2 != null ? bundle2.getBundle(str) : null;
|
|
Bundle bundle4 = c7768cuZ.a;
|
|
if (bundle4 != null) {
|
|
bundle4.remove(str);
|
|
}
|
|
Bundle bundle5 = c7768cuZ.a;
|
|
if (bundle5 != null && bundle5.isEmpty()) {
|
|
c7768cuZ.a = null;
|
|
}
|
|
NER zz_ = NER.HBt.zz_(bundle3, bundle);
|
|
b2.b.put(str, zz_);
|
|
return zz_;
|
|
}
|
|
throw new IllegalStateException("enableSavedStateHandles() wasn't called prior to createSavedStateHandle() call");
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
/* loaded from: classes.dex */
|
|
public static final class IeS extends AbstractC14961gcz implements InterfaceC14894gbR<CWH, ntM> {
|
|
public static final IeS e = new IeS();
|
|
|
|
@Override // o.InterfaceC14894gbR
|
|
public final /* synthetic */ ntM invoke(CWH cwh) {
|
|
C14957gcv.e(cwh, "");
|
|
return new ntM();
|
|
}
|
|
|
|
IeS() {
|
|
super(1);
|
|
}
|
|
}
|
|
|
|
/* loaded from: classes.dex */
|
|
public static final class RVV implements CWH.Sts<InterfaceC9254dgJ> {
|
|
RVV() {
|
|
}
|
|
}
|
|
|
|
/* loaded from: classes.dex */
|
|
public static final class Sts implements CWH.Sts<InterfaceC0940Ryk> {
|
|
Sts() {
|
|
}
|
|
}
|
|
|
|
/* loaded from: classes.dex */
|
|
public static final class LWm implements CWH.Sts<Bundle> {
|
|
LWm() {
|
|
}
|
|
}
|
|
|
|
public static final ntM b(InterfaceC0940Ryk interfaceC0940Ryk) {
|
|
C14957gcv.e(interfaceC0940Ryk, "");
|
|
nkO nko = new nkO();
|
|
nko.c(C14929gcJ.c(ntM.class), IeS.e);
|
|
return (ntM) new VLM(interfaceC0940Ryk, nko.d()).d("androidx.lifecycle.internal.SavedStateHandlesVM", ntM.class);
|
|
}
|
|
}
|