.class public final Landroidx/savedstate/SavedStateRegistryController; .super Ljava/lang/Object; .source "SavedStateRegistryController.kt" # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Landroidx/savedstate/SavedStateRegistryController$Companion; } .end annotation .annotation runtime Lkotlin/Metadata; d1 = { "\u00000\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0003\n\u0002\u0010\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0004\u0018\u0000 \u00122\u00020\u0001:\u0001\u0012B\u000f\u0008\u0002\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u00a2\u0006\u0002\u0010\u0004J\u0008\u0010\u000b\u001a\u00020\u000cH\u0007J\u0012\u0010\r\u001a\u00020\u000c2\u0008\u0010\u000e\u001a\u0004\u0018\u00010\u000fH\u0007J\u0010\u0010\u0010\u001a\u00020\u000c2\u0006\u0010\u0011\u001a\u00020\u000fH\u0007R\u000e\u0010\u0005\u001a\u00020\u0006X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u0011\u0010\u0007\u001a\u00020\u0008\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\t\u0010\n\u00a8\u0006\u0013" } d2 = { "Landroidx/savedstate/SavedStateRegistryController;", "", "owner", "Landroidx/savedstate/SavedStateRegistryOwner;", "(Landroidx/savedstate/SavedStateRegistryOwner;)V", "attached", "", "savedStateRegistry", "Landroidx/savedstate/SavedStateRegistry;", "getSavedStateRegistry", "()Landroidx/savedstate/SavedStateRegistry;", "performAttach", "", "performRestore", "savedState", "Landroid/os/Bundle;", "performSave", "outBundle", "Companion", "savedstate_release" } k = 0x1 mv = { 0x1, 0x8, 0x0 } xi = 0x30 .end annotation # static fields .field public static final Companion:Landroidx/savedstate/SavedStateRegistryController$Companion; # instance fields .field private attached:Z .field private final owner:Landroidx/savedstate/SavedStateRegistryOwner; .field private final savedStateRegistry:Landroidx/savedstate/SavedStateRegistry; # direct methods .method static constructor ()V .locals 2 new-instance v0, Landroidx/savedstate/SavedStateRegistryController$Companion; const/4 v1, 0x0 invoke-direct {v0, v1}, Landroidx/savedstate/SavedStateRegistryController$Companion;->(Lkotlin/jvm/internal/DefaultConstructorMarker;)V sput-object v0, Landroidx/savedstate/SavedStateRegistryController;->Companion:Landroidx/savedstate/SavedStateRegistryController$Companion; return-void .end method .method private constructor (Landroidx/savedstate/SavedStateRegistryOwner;)V .locals 0 .line 28 invoke-direct {p0}, Ljava/lang/Object;->()V iput-object p1, p0, Landroidx/savedstate/SavedStateRegistryController;->owner:Landroidx/savedstate/SavedStateRegistryOwner; .line 33 new-instance p1, Landroidx/savedstate/SavedStateRegistry; invoke-direct {p1}, Landroidx/savedstate/SavedStateRegistry;->()V iput-object p1, p0, Landroidx/savedstate/SavedStateRegistryController;->savedStateRegistry:Landroidx/savedstate/SavedStateRegistry; return-void .end method .method public synthetic constructor (Landroidx/savedstate/SavedStateRegistryOwner;Lkotlin/jvm/internal/DefaultConstructorMarker;)V .locals 0 invoke-direct {p0, p1}, Landroidx/savedstate/SavedStateRegistryController;->(Landroidx/savedstate/SavedStateRegistryOwner;)V return-void .end method .method public static final create(Landroidx/savedstate/SavedStateRegistryOwner;)Landroidx/savedstate/SavedStateRegistryController; .locals 1 .annotation runtime Lkotlin/jvm/JvmStatic; .end annotation sget-object v0, Landroidx/savedstate/SavedStateRegistryController;->Companion:Landroidx/savedstate/SavedStateRegistryController$Companion; invoke-virtual {v0, p0}, Landroidx/savedstate/SavedStateRegistryController$Companion;->create(Landroidx/savedstate/SavedStateRegistryOwner;)Landroidx/savedstate/SavedStateRegistryController; move-result-object p0 return-object p0 .end method # virtual methods .method public final getSavedStateRegistry()Landroidx/savedstate/SavedStateRegistry; .locals 0 iget-object p0, p0, Landroidx/savedstate/SavedStateRegistryController;->savedStateRegistry:Landroidx/savedstate/SavedStateRegistry; return-object p0 .end method .method public final performAttach()V .locals 3 iget-object v0, p0, Landroidx/savedstate/SavedStateRegistryController;->owner:Landroidx/savedstate/SavedStateRegistryOwner; .line 44 invoke-interface {v0}, Landroidx/savedstate/SavedStateRegistryOwner;->getLifecycle()Landroidx/lifecycle/Lifecycle; move-result-object v0 .line 45 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 .line 48 new-instance v1, Landroidx/savedstate/Recreator; iget-object v2, p0, Landroidx/savedstate/SavedStateRegistryController;->owner:Landroidx/savedstate/SavedStateRegistryOwner; invoke-direct {v1, v2}, Landroidx/savedstate/Recreator;->(Landroidx/savedstate/SavedStateRegistryOwner;)V check-cast v1, Landroidx/lifecycle/LifecycleObserver; invoke-virtual {v0, v1}, Landroidx/lifecycle/Lifecycle;->addObserver(Landroidx/lifecycle/LifecycleObserver;)V iget-object v1, p0, Landroidx/savedstate/SavedStateRegistryController;->savedStateRegistry:Landroidx/savedstate/SavedStateRegistry; .line 49 invoke-virtual {v1, v0}, Landroidx/savedstate/SavedStateRegistry;->performAttach$savedstate_release(Landroidx/lifecycle/Lifecycle;)V const/4 v0, 0x1 iput-boolean v0, p0, Landroidx/savedstate/SavedStateRegistryController;->attached:Z return-void .line 45 :cond_0 new-instance p0, Ljava/lang/IllegalStateException; const-string v0, "Restarter must be created only during owner\'s initialization stage" invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String; move-result-object v0 invoke-direct {p0, v0}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V throw p0 .end method .method public final performRestore(Landroid/os/Bundle;)V .locals 3 iget-boolean v0, p0, Landroidx/savedstate/SavedStateRegistryController;->attached:Z if-nez v0, :cond_0 .line 63 invoke-virtual {p0}, Landroidx/savedstate/SavedStateRegistryController;->performAttach()V :cond_0 iget-object v0, p0, Landroidx/savedstate/SavedStateRegistryController;->owner:Landroidx/savedstate/SavedStateRegistryOwner; .line 65 invoke-interface {v0}, Landroidx/savedstate/SavedStateRegistryOwner;->getLifecycle()Landroidx/lifecycle/Lifecycle; move-result-object v0 .line 66 invoke-virtual {v0}, Landroidx/lifecycle/Lifecycle;->getCurrentState()Landroidx/lifecycle/Lifecycle$State; move-result-object v1 sget-object v2, Landroidx/lifecycle/Lifecycle$State;->STARTED:Landroidx/lifecycle/Lifecycle$State; invoke-virtual {v1, v2}, Landroidx/lifecycle/Lifecycle$State;->isAtLeast(Landroidx/lifecycle/Lifecycle$State;)Z move-result v1 xor-int/lit8 v1, v1, 0x1 if-eqz v1, :cond_1 iget-object p0, p0, Landroidx/savedstate/SavedStateRegistryController;->savedStateRegistry:Landroidx/savedstate/SavedStateRegistry; .line 69 invoke-virtual {p0, p1}, Landroidx/savedstate/SavedStateRegistry;->performRestore$savedstate_release(Landroid/os/Bundle;)V return-void .line 67 :cond_1 new-instance p0, Ljava/lang/StringBuilder; const-string p1, "performRestore cannot be called when owner is " invoke-direct {p0, p1}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {v0}, Landroidx/lifecycle/Lifecycle;->getCurrentState()Landroidx/lifecycle/Lifecycle$State; move-result-object p1 invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object p0 invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p0 .line 66 new-instance p1, Ljava/lang/IllegalStateException; invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String; move-result-object p0 invoke-direct {p1, p0}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V throw p1 .end method .method public final performSave(Landroid/os/Bundle;)V .locals 1 const-string v0, "outBundle" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget-object p0, p0, Landroidx/savedstate/SavedStateRegistryController;->savedStateRegistry:Landroidx/savedstate/SavedStateRegistry; .line 81 invoke-virtual {p0, p1}, Landroidx/savedstate/SavedStateRegistry;->performSave(Landroid/os/Bundle;)V return-void .end method