what-the-bank/sources/o/Coc.java

63 lines
2.0 KiB
Java

package o;
import android.os.Bundle;
import androidx.lifecycle.SavedStateHandleController;
import o.VLM;
/* loaded from: classes.dex */
public abstract class Coc extends VLM.RVV implements VLM.LWm {
private FNE b;
private wdQ d;
private Bundle e;
protected abstract <T extends VKL> T b(Class<T> cls, NER ner);
public Coc() {
}
public Coc(InterfaceC9254dgJ interfaceC9254dgJ, Bundle bundle) {
this.b = interfaceC9254dgJ.getSavedStateRegistry();
this.d = interfaceC9254dgJ.getLifecycle();
this.e = bundle;
}
@Override // o.VLM.LWm
public final <T extends VKL> T create(Class<T> cls, CWH cwh) {
String str = (String) cwh.d(VLM.IeS.c);
if (str == null) {
throw new IllegalStateException("VIEW_MODEL_KEY must always be provided by ViewModelProvider");
}
if (this.b != null) {
return (T) a(str, cls);
}
return (T) b(cls, HLt.a(cwh));
}
private <T extends VKL> T a(String str, Class<T> cls) {
SavedStateHandleController zs_ = C14821gNe.zs_(this.b, this.d, str, this.e);
T t = (T) b(cls, zs_.d);
t.setTagIfAbsent("androidx.lifecycle.savedstate.vm.tag", zs_);
return t;
}
@Override // o.VLM.LWm
public final <T extends VKL> T create(Class<T> cls) {
String canonicalName = cls.getCanonicalName();
if (canonicalName == null) {
throw new IllegalArgumentException("Local and anonymous classes can not be ViewModels");
}
if (this.d == null) {
throw new UnsupportedOperationException("AbstractSavedStateViewModelFactory constructed with empty constructor supports only calls to create(modelClass: Class<T>, extras: CreationExtras).");
}
return (T) a(canonicalName, cls);
}
@Override // o.VLM.RVV
public final void e(VKL vkl) {
FNE fne = this.b;
if (fne != null) {
C14821gNe.c(vkl, fne, this.d);
}
}
}