Rabbit-R1/original r1/smali/smali_classes2/androidx/lifecycle/LegacySavedStateHandleController$OnRecreation.smali
2024-05-21 17:08:36 -04:00

156 lines
4.3 KiB
Smali

.class public final Landroidx/lifecycle/LegacySavedStateHandleController$OnRecreation;
.super Ljava/lang/Object;
.source "LegacySavedStateHandleController.kt"
# interfaces
.implements Landroidx/savedstate/SavedStateRegistry$AutoRecreated;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/lifecycle/LegacySavedStateHandleController;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "OnRecreation"
.end annotation
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\u0008\u0000\u0018\u00002\u00020\u0001B\u0005\u00a2\u0006\u0002\u0010\u0002J\u0010\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0006H\u0016\u00a8\u0006\u0007"
}
d2 = {
"Landroidx/lifecycle/LegacySavedStateHandleController$OnRecreation;",
"Landroidx/savedstate/SavedStateRegistry$AutoRecreated;",
"()V",
"onRecreated",
"",
"owner",
"Landroidx/savedstate/SavedStateRegistryOwner;",
"lifecycle-viewmodel-savedstate_release"
}
k = 0x1
mv = {
0x1,
0x8,
0x0
}
xi = 0x30
.end annotation
# direct methods
.method public constructor <init>()V
.locals 0
.line 76
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public onRecreated(Landroidx/savedstate/SavedStateRegistryOwner;)V
.locals 4
const-string p0, "owner"
invoke-static {p1, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 78
instance-of p0, p1, Landroidx/lifecycle/ViewModelStoreOwner;
if-eqz p0, :cond_2
.line 82
move-object p0, p1
check-cast p0, Landroidx/lifecycle/ViewModelStoreOwner;
invoke-interface {p0}, Landroidx/lifecycle/ViewModelStoreOwner;->getViewModelStore()Landroidx/lifecycle/ViewModelStore;
move-result-object p0
.line 83
invoke-interface {p1}, Landroidx/savedstate/SavedStateRegistryOwner;->getSavedStateRegistry()Landroidx/savedstate/SavedStateRegistry;
move-result-object v0
.line 84
invoke-virtual {p0}, Landroidx/lifecycle/ViewModelStore;->keys()Ljava/util/Set;
move-result-object v1
invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v1
:goto_0
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_0
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/String;
.line 85
invoke-virtual {p0, v2}, Landroidx/lifecycle/ViewModelStore;->get(Ljava/lang/String;)Landroidx/lifecycle/ViewModel;
move-result-object v2
.line 86
invoke-static {v2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
invoke-interface {p1}, Landroidx/savedstate/SavedStateRegistryOwner;->getLifecycle()Landroidx/lifecycle/Lifecycle;
move-result-object v3
invoke-static {v2, v0, v3}, Landroidx/lifecycle/LegacySavedStateHandleController;->attachHandleIfNeeded(Landroidx/lifecycle/ViewModel;Landroidx/savedstate/SavedStateRegistry;Landroidx/lifecycle/Lifecycle;)V
goto :goto_0
.line 88
:cond_0
invoke-virtual {p0}, Landroidx/lifecycle/ViewModelStore;->keys()Ljava/util/Set;
move-result-object p0
check-cast p0, Ljava/util/Collection;
invoke-interface {p0}, Ljava/util/Collection;->isEmpty()Z
move-result p0
xor-int/lit8 p0, p0, 0x1
if-eqz p0, :cond_1
const-class p0, Landroidx/lifecycle/LegacySavedStateHandleController$OnRecreation;
.line 89
invoke-virtual {v0, p0}, Landroidx/savedstate/SavedStateRegistry;->runOnNextRecreation(Ljava/lang/Class;)V
:cond_1
return-void
.line 78
:cond_2
new-instance p0, Ljava/lang/IllegalStateException;
const-string p1, "Internal error: OnRecreation should be registered only on components that implement ViewModelStoreOwner"
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p0
.end method