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

190 lines
6.6 KiB
Smali

.class public final Landroidx/lifecycle/SavedStateHandleController;
.super Ljava/lang/Object;
.source "SavedStateHandleController.kt"
# interfaces
.implements Landroidx/lifecycle/LifecycleEventObserver;
# annotations
.annotation system Ldalvik/annotation/SourceDebugExtension;
value = "SMAP\nSavedStateHandleController.kt\nKotlin\n*S Kotlin\n*F\n+ 1 SavedStateHandleController.kt\nandroidx/lifecycle/SavedStateHandleController\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,41:1\n1#2:42\n*E\n"
.end annotation
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u0000@\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0004\n\u0002\u0010\u000b\n\u0002\u0008\u0003\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\u0008\u0000\u0018\u00002\u00020\u0001B\u0015\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u00a2\u0006\u0002\u0010\u0006J\u0016\u0010\r\u001a\u00020\u000e2\u0006\u0010\u000f\u001a\u00020\u00102\u0006\u0010\u0011\u001a\u00020\u0012J\u0018\u0010\u0013\u001a\u00020\u000e2\u0006\u0010\u0014\u001a\u00020\u00152\u0006\u0010\u0016\u001a\u00020\u0017H\u0016R\u0011\u0010\u0004\u001a\u00020\u0005\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u0007\u0010\u0008R\u001e\u0010\u000b\u001a\u00020\n2\u0006\u0010\t\u001a\u00020\n@BX\u0086\u000e\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u000b\u0010\u000cR\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u0018"
}
d2 = {
"Landroidx/lifecycle/SavedStateHandleController;",
"Landroidx/lifecycle/LifecycleEventObserver;",
"key",
"",
"handle",
"Landroidx/lifecycle/SavedStateHandle;",
"(Ljava/lang/String;Landroidx/lifecycle/SavedStateHandle;)V",
"getHandle",
"()Landroidx/lifecycle/SavedStateHandle;",
"<set-?>",
"",
"isAttached",
"()Z",
"attachToLifecycle",
"",
"registry",
"Landroidx/savedstate/SavedStateRegistry;",
"lifecycle",
"Landroidx/lifecycle/Lifecycle;",
"onStateChanged",
"source",
"Landroidx/lifecycle/LifecycleOwner;",
"event",
"Landroidx/lifecycle/Lifecycle$Event;",
"lifecycle-viewmodel-savedstate_release"
}
k = 0x1
mv = {
0x1,
0x8,
0x0
}
xi = 0x30
.end annotation
# instance fields
.field private final handle:Landroidx/lifecycle/SavedStateHandle;
.field private isAttached:Z
.field private final key:Ljava/lang/String;
# direct methods
.method public constructor <init>(Ljava/lang/String;Landroidx/lifecycle/SavedStateHandle;)V
.locals 1
const-string v0, "key"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "handle"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 20
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Landroidx/lifecycle/SavedStateHandleController;->key:Ljava/lang/String;
iput-object p2, p0, Landroidx/lifecycle/SavedStateHandleController;->handle:Landroidx/lifecycle/SavedStateHandle;
return-void
.end method
# virtual methods
.method public final attachToLifecycle(Landroidx/savedstate/SavedStateRegistry;Landroidx/lifecycle/Lifecycle;)V
.locals 2
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
iget-boolean v0, p0, Landroidx/lifecycle/SavedStateHandleController;->isAttached:Z
const/4 v1, 0x1
xor-int/2addr v0, v1
if-eqz v0, :cond_0
iput-boolean v1, p0, Landroidx/lifecycle/SavedStateHandleController;->isAttached:Z
.line 31
move-object v0, p0
check-cast v0, Landroidx/lifecycle/LifecycleObserver;
invoke-virtual {p2, v0}, Landroidx/lifecycle/Lifecycle;->addObserver(Landroidx/lifecycle/LifecycleObserver;)V
iget-object p2, p0, Landroidx/lifecycle/SavedStateHandleController;->key:Ljava/lang/String;
iget-object p0, p0, Landroidx/lifecycle/SavedStateHandleController;->handle:Landroidx/lifecycle/SavedStateHandle;
.line 32
invoke-virtual {p0}, Landroidx/lifecycle/SavedStateHandle;->savedStateProvider()Landroidx/savedstate/SavedStateRegistry$SavedStateProvider;
move-result-object p0
invoke-virtual {p1, p2, p0}, Landroidx/savedstate/SavedStateRegistry;->registerSavedStateProvider(Ljava/lang/String;Landroidx/savedstate/SavedStateRegistry$SavedStateProvider;)V
return-void
.line 29
:cond_0
new-instance p0, Ljava/lang/IllegalStateException;
const-string p1, "Already attached to lifecycleOwner"
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
.method public final getHandle()Landroidx/lifecycle/SavedStateHandle;
.locals 0
iget-object p0, p0, Landroidx/lifecycle/SavedStateHandleController;->handle:Landroidx/lifecycle/SavedStateHandle;
return-object p0
.end method
.method public final isAttached()Z
.locals 0
iget-boolean p0, p0, Landroidx/lifecycle/SavedStateHandleController;->isAttached:Z
return p0
.end method
.method public onStateChanged(Landroidx/lifecycle/LifecycleOwner;Landroidx/lifecycle/Lifecycle$Event;)V
.locals 1
const-string v0, "source"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "event"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 36
sget-object v0, Landroidx/lifecycle/Lifecycle$Event;->ON_DESTROY:Landroidx/lifecycle/Lifecycle$Event;
if-ne p2, v0, :cond_0
const/4 p2, 0x0
iput-boolean p2, p0, Landroidx/lifecycle/SavedStateHandleController;->isAttached:Z
.line 38
invoke-interface {p1}, Landroidx/lifecycle/LifecycleOwner;->getLifecycle()Landroidx/lifecycle/Lifecycle;
move-result-object p1
check-cast p0, Landroidx/lifecycle/LifecycleObserver;
invoke-virtual {p1, p0}, Landroidx/lifecycle/Lifecycle;->removeObserver(Landroidx/lifecycle/LifecycleObserver;)V
:cond_0
return-void
.end method