82 lines
3.1 KiB
Java
82 lines
3.1 KiB
Java
|
package o;
|
||
|
|
||
|
import android.os.Bundle;
|
||
|
import androidx.lifecycle.SavedStateHandleController;
|
||
|
import java.util.HashSet;
|
||
|
import java.util.Iterator;
|
||
|
import o.C14821gNe;
|
||
|
import o.FNE;
|
||
|
import o.InterfaceC16541pFg;
|
||
|
import o.wdQ;
|
||
|
|
||
|
/* renamed from: o.gNe, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes.dex */
|
||
|
public final class C14821gNe {
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static SavedStateHandleController zs_(FNE fne, wdQ wdq, String str, Bundle bundle) {
|
||
|
SavedStateHandleController savedStateHandleController = new SavedStateHandleController(str, NER.zx_(fne.AH_(str), bundle));
|
||
|
savedStateHandleController.e(fne, wdq);
|
||
|
e(fne, wdq);
|
||
|
return savedStateHandleController;
|
||
|
}
|
||
|
|
||
|
/* renamed from: o.gNe$LWm */
|
||
|
/* loaded from: classes.dex */
|
||
|
public static final class LWm implements FNE.IeS {
|
||
|
LWm() {
|
||
|
}
|
||
|
|
||
|
@Override // o.FNE.IeS
|
||
|
public final void d(InterfaceC9254dgJ interfaceC9254dgJ) {
|
||
|
if (!(interfaceC9254dgJ instanceof InterfaceC0940Ryk)) {
|
||
|
throw new IllegalStateException("Internal error: OnRecreation should be registered only on components that implement ViewModelStoreOwner");
|
||
|
}
|
||
|
sUv viewModelStore = ((InterfaceC0940Ryk) interfaceC9254dgJ).getViewModelStore();
|
||
|
FNE savedStateRegistry = interfaceC9254dgJ.getSavedStateRegistry();
|
||
|
Iterator it = new HashSet(viewModelStore.e.keySet()).iterator();
|
||
|
while (it.hasNext()) {
|
||
|
C14821gNe.c(viewModelStore.e.get((String) it.next()), savedStateRegistry, interfaceC9254dgJ.getLifecycle());
|
||
|
}
|
||
|
if (new HashSet(viewModelStore.e.keySet()).isEmpty()) {
|
||
|
return;
|
||
|
}
|
||
|
savedStateRegistry.e(LWm.class);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static void c(VKL vkl, FNE fne, wdQ wdq) {
|
||
|
SavedStateHandleController savedStateHandleController = (SavedStateHandleController) vkl.getTag("androidx.lifecycle.savedstate.vm.tag");
|
||
|
if (savedStateHandleController == null || savedStateHandleController.c) {
|
||
|
return;
|
||
|
}
|
||
|
savedStateHandleController.e(fne, wdq);
|
||
|
e(fne, wdq);
|
||
|
}
|
||
|
|
||
|
private static void e(final FNE fne, final wdQ wdq) {
|
||
|
wdQ.IeS a = wdq.a();
|
||
|
if (a == wdQ.IeS.INITIALIZED || a.compareTo(wdQ.IeS.STARTED) >= 0) {
|
||
|
fne.e(LWm.class);
|
||
|
} else {
|
||
|
wdq.e(new InterfaceC3451axm(wdq, fne) { // from class: androidx.lifecycle.LegacySavedStateHandleController$1
|
||
|
final wdQ c;
|
||
|
final FNE e;
|
||
|
|
||
|
{
|
||
|
this.c = wdq;
|
||
|
this.e = fne;
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC3451axm
|
||
|
public final void c(InterfaceC16541pFg interfaceC16541pFg, wdQ.HBt hBt) {
|
||
|
if (hBt == wdQ.HBt.ON_START) {
|
||
|
this.c.a(this);
|
||
|
this.e.e(C14821gNe.LWm.class);
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
}
|