apkfuckery/com.discord/smali/androidx/savedstate/SavedStateRegistryController.smali

119 lines
4.1 KiB
Smali
Raw Normal View History

2019-10-07 23:23:22 +00:00
.class public final Landroidx/savedstate/SavedStateRegistryController;
.super Ljava/lang/Object;
.source "SavedStateRegistryController.java"
# instance fields
2019-12-06 03:29:40 +00:00
.field public final mOwner:Landroidx/savedstate/SavedStateRegistryOwner;
2019-10-07 23:23:22 +00:00
2019-12-06 03:29:40 +00:00
.field public final mRegistry:Landroidx/savedstate/SavedStateRegistry;
2019-10-07 23:23:22 +00:00
# direct methods
2019-12-06 03:29:40 +00:00
.method public constructor <init>(Landroidx/savedstate/SavedStateRegistryOwner;)V
2019-10-07 23:23:22 +00:00
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Landroidx/savedstate/SavedStateRegistryController;->mOwner:Landroidx/savedstate/SavedStateRegistryOwner;
new-instance p1, Landroidx/savedstate/SavedStateRegistry;
invoke-direct {p1}, Landroidx/savedstate/SavedStateRegistry;-><init>()V
iput-object p1, p0, Landroidx/savedstate/SavedStateRegistryController;->mRegistry:Landroidx/savedstate/SavedStateRegistry;
return-void
.end method
.method public static create(Landroidx/savedstate/SavedStateRegistryOwner;)Landroidx/savedstate/SavedStateRegistryController;
.locals 1
2019-12-06 03:29:40 +00:00
.param p0 # Landroidx/savedstate/SavedStateRegistryOwner;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Landroidx/annotation/NonNull;
.end annotation
2019-10-07 23:23:22 +00:00
new-instance v0, Landroidx/savedstate/SavedStateRegistryController;
invoke-direct {v0, p0}, Landroidx/savedstate/SavedStateRegistryController;-><init>(Landroidx/savedstate/SavedStateRegistryOwner;)V
return-object v0
.end method
# virtual methods
2019-12-06 03:29:40 +00:00
.method public getSavedStateRegistry()Landroidx/savedstate/SavedStateRegistry;
2019-10-07 23:23:22 +00:00
.locals 1
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/NonNull;
.end annotation
2019-10-07 23:23:22 +00:00
iget-object v0, p0, Landroidx/savedstate/SavedStateRegistryController;->mRegistry:Landroidx/savedstate/SavedStateRegistry;
return-object v0
.end method
2019-12-06 03:29:40 +00:00
.method public performRestore(Landroid/os/Bundle;)V
2019-10-07 23:23:22 +00:00
.locals 3
2019-12-06 03:29:40 +00:00
.param p1 # Landroid/os/Bundle;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.annotation build Landroidx/annotation/MainThread;
.end annotation
2019-10-07 23:23:22 +00:00
iget-object v0, p0, Landroidx/savedstate/SavedStateRegistryController;->mOwner:Landroidx/savedstate/SavedStateRegistryOwner;
2019-12-06 03:29:40 +00:00
invoke-interface {v0}, Landroidx/lifecycle/LifecycleOwner;->getLifecycle()Landroidx/lifecycle/Lifecycle;
2019-10-07 23:23:22 +00:00
move-result-object v0
invoke-virtual {v0}, Landroidx/lifecycle/Lifecycle;->getCurrentState()Landroidx/lifecycle/Lifecycle$State;
move-result-object v1
sget-object v2, Landroidx/lifecycle/Lifecycle$State;->INITIALIZED:Landroidx/lifecycle/Lifecycle$State;
if-ne v1, v2, :cond_0
new-instance v1, Landroidx/savedstate/Recreator;
iget-object v2, p0, Landroidx/savedstate/SavedStateRegistryController;->mOwner:Landroidx/savedstate/SavedStateRegistryOwner;
invoke-direct {v1, v2}, Landroidx/savedstate/Recreator;-><init>(Landroidx/savedstate/SavedStateRegistryOwner;)V
invoke-virtual {v0, v1}, Landroidx/lifecycle/Lifecycle;->addObserver(Landroidx/lifecycle/LifecycleObserver;)V
iget-object v1, p0, Landroidx/savedstate/SavedStateRegistryController;->mRegistry:Landroidx/savedstate/SavedStateRegistry;
invoke-virtual {v1, v0, p1}, Landroidx/savedstate/SavedStateRegistry;->performRestore(Landroidx/lifecycle/Lifecycle;Landroid/os/Bundle;)V
return-void
:cond_0
new-instance p1, Ljava/lang/IllegalStateException;
const-string v0, "Restarter must be created only during owner\'s initialization stage"
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.end method
2019-12-06 03:29:40 +00:00
.method public performSave(Landroid/os/Bundle;)V
2019-10-07 23:23:22 +00:00
.locals 1
2019-12-06 03:29:40 +00:00
.param p1 # Landroid/os/Bundle;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Landroidx/annotation/MainThread;
.end annotation
2019-10-07 23:23:22 +00:00
iget-object v0, p0, Landroidx/savedstate/SavedStateRegistryController;->mRegistry:Landroidx/savedstate/SavedStateRegistry;
invoke-virtual {v0, p1}, Landroidx/savedstate/SavedStateRegistry;->performSave(Landroid/os/Bundle;)V
return-void
.end method