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

213 lines
7.9 KiB
Smali

.class public final Landroidx/lifecycle/LegacySavedStateHandleController;
.super Ljava/lang/Object;
.source "LegacySavedStateHandleController.kt"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/lifecycle/LegacySavedStateHandleController$OnRecreation;
}
.end annotation
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u0000:\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0008\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0003\u0008\u00c0\u0002\u0018\u00002\u00020\u0001:\u0001\u0013B\u0007\u0008\u0002\u00a2\u0006\u0002\u0010\u0002J \u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\u00082\u0006\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\u000cH\u0007J,\u0010\r\u001a\u00020\u000e2\u0006\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\u000c2\u0008\u0010\u000f\u001a\u0004\u0018\u00010\u00042\u0008\u0010\u0010\u001a\u0004\u0018\u00010\u0011H\u0007J\u0018\u0010\u0012\u001a\u00020\u00062\u0006\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\u000cH\u0002R\u000e\u0010\u0003\u001a\u00020\u0004X\u0086T\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u0014"
}
d2 = {
"Landroidx/lifecycle/LegacySavedStateHandleController;",
"",
"()V",
"TAG_SAVED_STATE_HANDLE_CONTROLLER",
"",
"attachHandleIfNeeded",
"",
"viewModel",
"Landroidx/lifecycle/ViewModel;",
"registry",
"Landroidx/savedstate/SavedStateRegistry;",
"lifecycle",
"Landroidx/lifecycle/Lifecycle;",
"create",
"Landroidx/lifecycle/SavedStateHandleController;",
"key",
"defaultArgs",
"Landroid/os/Bundle;",
"tryToAddRecreator",
"OnRecreation",
"lifecycle-viewmodel-savedstate_release"
}
k = 0x1
mv = {
0x1,
0x8,
0x0
}
xi = 0x30
.end annotation
# static fields
.field public static final INSTANCE:Landroidx/lifecycle/LegacySavedStateHandleController;
.field public static final TAG_SAVED_STATE_HANDLE_CONTROLLER:Ljava/lang/String; = "androidx.lifecycle.savedstate.vm.tag"
# direct methods
.method static constructor <clinit>()V
.locals 1
new-instance v0, Landroidx/lifecycle/LegacySavedStateHandleController;
invoke-direct {v0}, Landroidx/lifecycle/LegacySavedStateHandleController;-><init>()V
sput-object v0, Landroidx/lifecycle/LegacySavedStateHandleController;->INSTANCE:Landroidx/lifecycle/LegacySavedStateHandleController;
return-void
.end method
.method private constructor <init>()V
.locals 0
.line 23
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static final attachHandleIfNeeded(Landroidx/lifecycle/ViewModel;Landroidx/savedstate/SavedStateRegistry;Landroidx/lifecycle/Lifecycle;)V
.locals 1
.annotation runtime Lkotlin/jvm/JvmStatic;
.end annotation
const-string v0, "viewModel"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "registry"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "lifecycle"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "androidx.lifecycle.savedstate.vm.tag"
.line 47
invoke-virtual {p0, v0}, Landroidx/lifecycle/ViewModel;->getTag(Ljava/lang/String;)Ljava/lang/Object;
move-result-object p0
check-cast p0, Landroidx/lifecycle/SavedStateHandleController;
if-eqz p0, :cond_0
.line 50
invoke-virtual {p0}, Landroidx/lifecycle/SavedStateHandleController;->isAttached()Z
move-result v0
if-nez v0, :cond_0
.line 51
invoke-virtual {p0, p1, p2}, Landroidx/lifecycle/SavedStateHandleController;->attachToLifecycle(Landroidx/savedstate/SavedStateRegistry;Landroidx/lifecycle/Lifecycle;)V
sget-object p0, Landroidx/lifecycle/LegacySavedStateHandleController;->INSTANCE:Landroidx/lifecycle/LegacySavedStateHandleController;
.line 52
invoke-direct {p0, p1, p2}, Landroidx/lifecycle/LegacySavedStateHandleController;->tryToAddRecreator(Landroidx/savedstate/SavedStateRegistry;Landroidx/lifecycle/Lifecycle;)V
:cond_0
return-void
.end method
.method public static final create(Landroidx/savedstate/SavedStateRegistry;Landroidx/lifecycle/Lifecycle;Ljava/lang/String;Landroid/os/Bundle;)Landroidx/lifecycle/SavedStateHandleController;
.locals 2
.annotation runtime Lkotlin/jvm/JvmStatic;
.end annotation
const-string v0, "registry"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "lifecycle"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 33
invoke-static {p2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
invoke-virtual {p0, p2}, Landroidx/savedstate/SavedStateRegistry;->consumeRestoredStateForKey(Ljava/lang/String;)Landroid/os/Bundle;
move-result-object v0
.line 34
sget-object v1, Landroidx/lifecycle/SavedStateHandle;->Companion:Landroidx/lifecycle/SavedStateHandle$Companion;
invoke-virtual {v1, v0, p3}, Landroidx/lifecycle/SavedStateHandle$Companion;->createHandle(Landroid/os/Bundle;Landroid/os/Bundle;)Landroidx/lifecycle/SavedStateHandle;
move-result-object p3
.line 35
new-instance v0, Landroidx/lifecycle/SavedStateHandleController;
invoke-direct {v0, p2, p3}, Landroidx/lifecycle/SavedStateHandleController;-><init>(Ljava/lang/String;Landroidx/lifecycle/SavedStateHandle;)V
.line 36
invoke-virtual {v0, p0, p1}, Landroidx/lifecycle/SavedStateHandleController;->attachToLifecycle(Landroidx/savedstate/SavedStateRegistry;Landroidx/lifecycle/Lifecycle;)V
sget-object p2, Landroidx/lifecycle/LegacySavedStateHandleController;->INSTANCE:Landroidx/lifecycle/LegacySavedStateHandleController;
.line 37
invoke-direct {p2, p0, p1}, Landroidx/lifecycle/LegacySavedStateHandleController;->tryToAddRecreator(Landroidx/savedstate/SavedStateRegistry;Landroidx/lifecycle/Lifecycle;)V
return-object v0
.end method
.method private final tryToAddRecreator(Landroidx/savedstate/SavedStateRegistry;Landroidx/lifecycle/Lifecycle;)V
.locals 1
.line 57
invoke-virtual {p2}, Landroidx/lifecycle/Lifecycle;->getCurrentState()Landroidx/lifecycle/Lifecycle$State;
move-result-object p0
.line 58
sget-object v0, Landroidx/lifecycle/Lifecycle$State;->INITIALIZED:Landroidx/lifecycle/Lifecycle$State;
if-eq p0, v0, :cond_1
.line 59
sget-object v0, Landroidx/lifecycle/Lifecycle$State;->STARTED:Landroidx/lifecycle/Lifecycle$State;
invoke-virtual {p0, v0}, Landroidx/lifecycle/Lifecycle$State;->isAtLeast(Landroidx/lifecycle/Lifecycle$State;)Z
move-result p0
if-eqz p0, :cond_0
goto :goto_0
.line 62
:cond_0
new-instance p0, Landroidx/lifecycle/LegacySavedStateHandleController$tryToAddRecreator$1;
invoke-direct {p0, p2, p1}, Landroidx/lifecycle/LegacySavedStateHandleController$tryToAddRecreator$1;-><init>(Landroidx/lifecycle/Lifecycle;Landroidx/savedstate/SavedStateRegistry;)V
check-cast p0, Landroidx/lifecycle/LifecycleObserver;
invoke-virtual {p2, p0}, Landroidx/lifecycle/Lifecycle;->addObserver(Landroidx/lifecycle/LifecycleObserver;)V
goto :goto_1
.line 60
:cond_1
:goto_0
const-class p0, Landroidx/lifecycle/LegacySavedStateHandleController$OnRecreation;
invoke-virtual {p1, p0}, Landroidx/savedstate/SavedStateRegistry;->runOnNextRecreation(Ljava/lang/Class;)V
:goto_1
return-void
.end method