.class final Landroidx/fragment/app/FragmentManagerViewModel; .super Landroidx/lifecycle/ViewModel; .source "FragmentManagerViewModel.java" # static fields .field private static final FACTORY:Landroidx/lifecycle/ViewModelProvider$Factory; .field private static final TAG:Ljava/lang/String; = "FragmentManager" # instance fields .field private final mChildNonConfigs:Ljava/util/HashMap; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/HashMap<", "Ljava/lang/String;", "Landroidx/fragment/app/FragmentManagerViewModel;", ">;" } .end annotation .end field .field private mHasBeenCleared:Z .field private mHasSavedSnapshot:Z .field private mIsStateSaved:Z .field private final mRetainedFragments:Ljava/util/HashMap; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/HashMap<", "Ljava/lang/String;", "Landroidx/fragment/app/Fragment;", ">;" } .end annotation .end field .field private final mStateAutomaticallySaved:Z .field private final mViewModelStores:Ljava/util/HashMap; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/HashMap<", "Ljava/lang/String;", "Landroidx/lifecycle/ViewModelStore;", ">;" } .end annotation .end field # direct methods .method static constructor ()V .locals 1 .line 40 new-instance v0, Landroidx/fragment/app/FragmentManagerViewModel$1; invoke-direct {v0}, Landroidx/fragment/app/FragmentManagerViewModel$1;->()V sput-object v0, Landroidx/fragment/app/FragmentManagerViewModel;->FACTORY:Landroidx/lifecycle/ViewModelProvider$Factory; return-void .end method .method constructor (Z)V .locals 1 .line 86 invoke-direct {p0}, Landroidx/lifecycle/ViewModel;->()V .line 57 new-instance v0, Ljava/util/HashMap; invoke-direct {v0}, Ljava/util/HashMap;->()V iput-object v0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mRetainedFragments:Ljava/util/HashMap; .line 58 new-instance v0, Ljava/util/HashMap; invoke-direct {v0}, Ljava/util/HashMap;->()V iput-object v0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mChildNonConfigs:Ljava/util/HashMap; .line 59 new-instance v0, Ljava/util/HashMap; invoke-direct {v0}, Ljava/util/HashMap;->()V iput-object v0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mViewModelStores:Ljava/util/HashMap; const/4 v0, 0x0 iput-boolean v0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mHasBeenCleared:Z iput-boolean v0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mHasSavedSnapshot:Z iput-boolean v0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mIsStateSaved:Z iput-boolean p1, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mStateAutomaticallySaved:Z return-void .end method .method private clearNonConfigStateInternal(Ljava/lang/String;)V .locals 1 iget-object v0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mChildNonConfigs:Ljava/util/HashMap; .line 202 invoke-virtual {v0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 check-cast v0, Landroidx/fragment/app/FragmentManagerViewModel; if-eqz v0, :cond_0 .line 204 invoke-virtual {v0}, Landroidx/fragment/app/FragmentManagerViewModel;->onCleared()V iget-object v0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mChildNonConfigs:Ljava/util/HashMap; .line 205 invoke-virtual {v0, p1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object; :cond_0 iget-object v0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mViewModelStores:Ljava/util/HashMap; .line 208 invoke-virtual {v0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 check-cast v0, Landroidx/lifecycle/ViewModelStore; if-eqz v0, :cond_1 .line 210 invoke-virtual {v0}, Landroidx/lifecycle/ViewModelStore;->clear()V iget-object p0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mViewModelStores:Ljava/util/HashMap; .line 211 invoke-virtual {p0, p1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object; :cond_1 return-void .end method .method static getInstance(Landroidx/lifecycle/ViewModelStore;)Landroidx/fragment/app/FragmentManagerViewModel; .locals 2 .line 52 new-instance v0, Landroidx/lifecycle/ViewModelProvider; sget-object v1, Landroidx/fragment/app/FragmentManagerViewModel;->FACTORY:Landroidx/lifecycle/ViewModelProvider$Factory; invoke-direct {v0, p0, v1}, Landroidx/lifecycle/ViewModelProvider;->(Landroidx/lifecycle/ViewModelStore;Landroidx/lifecycle/ViewModelProvider$Factory;)V const-class p0, Landroidx/fragment/app/FragmentManagerViewModel; .line 54 invoke-virtual {v0, p0}, Landroidx/lifecycle/ViewModelProvider;->get(Ljava/lang/Class;)Landroidx/lifecycle/ViewModel; move-result-object p0 check-cast p0, Landroidx/fragment/app/FragmentManagerViewModel; return-object p0 .end method # virtual methods .method addRetainedFragment(Landroidx/fragment/app/Fragment;)V .locals 4 iget-boolean v0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mIsStateSaved:Z const-string v1, "FragmentManager" const/4 v2, 0x2 if-eqz v0, :cond_1 .line 113 invoke-static {v2}, Landroidx/fragment/app/FragmentManager;->isLoggingEnabled(I)Z move-result p0 if-eqz p0, :cond_0 const-string p0, "Ignoring addRetainedFragment as the state is already saved" .line 114 invoke-static {v1, p0}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I :cond_0 return-void :cond_1 iget-object v0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mRetainedFragments:Ljava/util/HashMap; .line 118 iget-object v3, p1, Landroidx/fragment/app/Fragment;->mWho:Ljava/lang/String; invoke-virtual {v0, v3}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z move-result v0 if-eqz v0, :cond_2 return-void :cond_2 iget-object p0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mRetainedFragments:Ljava/util/HashMap; .line 121 iget-object v0, p1, Landroidx/fragment/app/Fragment;->mWho:Ljava/lang/String; invoke-virtual {p0, v0, p1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; .line 122 invoke-static {v2}, Landroidx/fragment/app/FragmentManager;->isLoggingEnabled(I)Z move-result p0 if-eqz p0, :cond_3 .line 123 new-instance p0, Ljava/lang/StringBuilder; const-string v0, "Updating retained Fragments: Added " invoke-direct {p0, v0}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V 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 invoke-static {v1, p0}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I :cond_3 return-void .end method .method clearNonConfigState(Landroidx/fragment/app/Fragment;)V .locals 2 const/4 v0, 0x3 .line 187 invoke-static {v0}, Landroidx/fragment/app/FragmentManager;->isLoggingEnabled(I)Z move-result v0 if-eqz v0, :cond_0 .line 188 new-instance v0, Ljava/lang/StringBuilder; const-string v1, "Clearing non-config state for " invoke-direct {v0, v1}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object v0 invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 const-string v1, "FragmentManager" invoke-static {v1, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 190 :cond_0 iget-object p1, p1, Landroidx/fragment/app/Fragment;->mWho:Ljava/lang/String; invoke-direct {p0, p1}, Landroidx/fragment/app/FragmentManagerViewModel;->clearNonConfigStateInternal(Ljava/lang/String;)V return-void .end method .method clearNonConfigState(Ljava/lang/String;)V .locals 2 const/4 v0, 0x3 .line 194 invoke-static {v0}, Landroidx/fragment/app/FragmentManager;->isLoggingEnabled(I)Z move-result v0 if-eqz v0, :cond_0 .line 195 new-instance v0, Ljava/lang/StringBuilder; const-string v1, "Clearing non-config state for saved state of Fragment " invoke-direct {v0, v1}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 const-string v1, "FragmentManager" invoke-static {v1, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 197 :cond_0 invoke-direct {p0, p1}, Landroidx/fragment/app/FragmentManagerViewModel;->clearNonConfigStateInternal(Ljava/lang/String;)V return-void .end method .method public equals(Ljava/lang/Object;)Z .locals 4 const/4 v0, 0x1 if-ne p0, p1, :cond_0 return v0 :cond_0 const/4 v1, 0x0 if-eqz p1, :cond_3 .line 286 invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class; move-result-object v2 invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class; move-result-object v3 if-eq v2, v3, :cond_1 goto :goto_1 .line 288 :cond_1 check-cast p1, Landroidx/fragment/app/FragmentManagerViewModel; iget-object v2, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mRetainedFragments:Ljava/util/HashMap; .line 290 iget-object v3, p1, Landroidx/fragment/app/FragmentManagerViewModel;->mRetainedFragments:Ljava/util/HashMap; invoke-virtual {v2, v3}, Ljava/util/HashMap;->equals(Ljava/lang/Object;)Z move-result v2 if-eqz v2, :cond_2 iget-object v2, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mChildNonConfigs:Ljava/util/HashMap; iget-object v3, p1, Landroidx/fragment/app/FragmentManagerViewModel;->mChildNonConfigs:Ljava/util/HashMap; .line 291 invoke-virtual {v2, v3}, Ljava/util/HashMap;->equals(Ljava/lang/Object;)Z move-result v2 if-eqz v2, :cond_2 iget-object p0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mViewModelStores:Ljava/util/HashMap; iget-object p1, p1, Landroidx/fragment/app/FragmentManagerViewModel;->mViewModelStores:Ljava/util/HashMap; .line 292 invoke-virtual {p0, p1}, Ljava/util/HashMap;->equals(Ljava/lang/Object;)Z move-result p0 if-eqz p0, :cond_2 goto :goto_0 :cond_2 move v0, v1 :goto_0 return v0 :cond_3 :goto_1 return v1 .end method .method findRetainedFragmentByWho(Ljava/lang/String;)Landroidx/fragment/app/Fragment; .locals 0 iget-object p0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mRetainedFragments:Ljava/util/HashMap; .line 129 invoke-virtual {p0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object p0 check-cast p0, Landroidx/fragment/app/Fragment; return-object p0 .end method .method getChildNonConfig(Landroidx/fragment/app/Fragment;)Landroidx/fragment/app/FragmentManagerViewModel; .locals 2 iget-object v0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mChildNonConfigs:Ljava/util/HashMap; .line 168 iget-object v1, p1, Landroidx/fragment/app/Fragment;->mWho:Ljava/lang/String; invoke-virtual {v0, v1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 check-cast v0, Landroidx/fragment/app/FragmentManagerViewModel; if-nez v0, :cond_0 .line 170 new-instance v0, Landroidx/fragment/app/FragmentManagerViewModel; iget-boolean v1, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mStateAutomaticallySaved:Z invoke-direct {v0, v1}, Landroidx/fragment/app/FragmentManagerViewModel;->(Z)V iget-object p0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mChildNonConfigs:Ljava/util/HashMap; .line 171 iget-object p1, p1, Landroidx/fragment/app/Fragment;->mWho:Ljava/lang/String; invoke-virtual {p0, p1, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; :cond_0 return-object v0 .end method .method getRetainedFragments()Ljava/util/Collection; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "()", "Ljava/util/Collection<", "Landroidx/fragment/app/Fragment;", ">;" } .end annotation .line 134 new-instance v0, Ljava/util/ArrayList; iget-object p0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mRetainedFragments:Ljava/util/HashMap; invoke-virtual {p0}, Ljava/util/HashMap;->values()Ljava/util/Collection; move-result-object p0 invoke-direct {v0, p0}, Ljava/util/ArrayList;->(Ljava/util/Collection;)V return-object v0 .end method .method getSnapshot()Landroidx/fragment/app/FragmentManagerNonConfig; .locals 5 .annotation runtime Ljava/lang/Deprecated; .end annotation iget-object v0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mRetainedFragments:Ljava/util/HashMap; .line 260 invoke-virtual {v0}, Ljava/util/HashMap;->isEmpty()Z move-result v0 const/4 v1, 0x0 if-eqz v0, :cond_0 iget-object v0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mChildNonConfigs:Ljava/util/HashMap; invoke-virtual {v0}, Ljava/util/HashMap;->isEmpty()Z move-result v0 if-eqz v0, :cond_0 iget-object v0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mViewModelStores:Ljava/util/HashMap; .line 261 invoke-virtual {v0}, Ljava/util/HashMap;->isEmpty()Z move-result v0 if-eqz v0, :cond_0 return-object v1 .line 264 :cond_0 new-instance v0, Ljava/util/HashMap; invoke-direct {v0}, Ljava/util/HashMap;->()V iget-object v2, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mChildNonConfigs:Ljava/util/HashMap; .line 265 invoke-virtual {v2}, Ljava/util/HashMap;->entrySet()Ljava/util/Set; move-result-object v2 invoke-interface {v2}, Ljava/util/Set;->iterator()Ljava/util/Iterator; move-result-object v2 :cond_1 :goto_0 invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z move-result v3 if-eqz v3, :cond_2 invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v3 check-cast v3, Ljava/util/Map$Entry; .line 266 invoke-interface {v3}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object; move-result-object v4 check-cast v4, Landroidx/fragment/app/FragmentManagerViewModel; invoke-virtual {v4}, Landroidx/fragment/app/FragmentManagerViewModel;->getSnapshot()Landroidx/fragment/app/FragmentManagerNonConfig; move-result-object v4 if-eqz v4, :cond_1 .line 268 invoke-interface {v3}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object; move-result-object v3 check-cast v3, Ljava/lang/String; invoke-virtual {v0, v3, v4}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; goto :goto_0 :cond_2 const/4 v2, 0x1 iput-boolean v2, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mHasSavedSnapshot:Z iget-object v2, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mRetainedFragments:Ljava/util/HashMap; .line 273 invoke-virtual {v2}, Ljava/util/HashMap;->isEmpty()Z move-result v2 if-eqz v2, :cond_3 invoke-virtual {v0}, Ljava/util/HashMap;->isEmpty()Z move-result v2 if-eqz v2, :cond_3 iget-object v2, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mViewModelStores:Ljava/util/HashMap; .line 274 invoke-virtual {v2}, Ljava/util/HashMap;->isEmpty()Z move-result v2 if-eqz v2, :cond_3 return-object v1 .line 277 :cond_3 new-instance v1, Landroidx/fragment/app/FragmentManagerNonConfig; new-instance v2, Ljava/util/ArrayList; iget-object v3, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mRetainedFragments:Ljava/util/HashMap; .line 278 invoke-virtual {v3}, Ljava/util/HashMap;->values()Ljava/util/Collection; move-result-object v3 invoke-direct {v2, v3}, Ljava/util/ArrayList;->(Ljava/util/Collection;)V new-instance v3, Ljava/util/HashMap; iget-object p0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mViewModelStores:Ljava/util/HashMap; invoke-direct {v3, p0}, Ljava/util/HashMap;->(Ljava/util/Map;)V invoke-direct {v1, v2, v0, v3}, Landroidx/fragment/app/FragmentManagerNonConfig;->(Ljava/util/Collection;Ljava/util/Map;Ljava/util/Map;)V return-object v1 .end method .method getViewModelStore(Landroidx/fragment/app/Fragment;)Landroidx/lifecycle/ViewModelStore; .locals 2 iget-object v0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mViewModelStores:Ljava/util/HashMap; .line 178 iget-object v1, p1, Landroidx/fragment/app/Fragment;->mWho:Ljava/lang/String; invoke-virtual {v0, v1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 check-cast v0, Landroidx/lifecycle/ViewModelStore; if-nez v0, :cond_0 .line 180 new-instance v0, Landroidx/lifecycle/ViewModelStore; invoke-direct {v0}, Landroidx/lifecycle/ViewModelStore;->()V iget-object p0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mViewModelStores:Ljava/util/HashMap; .line 181 iget-object p1, p1, Landroidx/fragment/app/Fragment;->mWho:Ljava/lang/String; invoke-virtual {p0, p1, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; :cond_0 return-object v0 .end method .method public hashCode()I .locals 2 iget-object v0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mRetainedFragments:Ljava/util/HashMap; .line 297 invoke-virtual {v0}, Ljava/util/HashMap;->hashCode()I move-result v0 mul-int/lit8 v0, v0, 0x1f iget-object v1, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mChildNonConfigs:Ljava/util/HashMap; .line 298 invoke-virtual {v1}, Ljava/util/HashMap;->hashCode()I move-result v1 add-int/2addr v0, v1 mul-int/lit8 v0, v0, 0x1f iget-object p0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mViewModelStores:Ljava/util/HashMap; .line 299 invoke-virtual {p0}, Ljava/util/HashMap;->hashCode()I move-result p0 add-int/2addr v0, p0 return v0 .end method .method isCleared()Z .locals 0 iget-boolean p0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mHasBeenCleared:Z return p0 .end method .method protected onCleared()V .locals 2 const/4 v0, 0x3 .line 101 invoke-static {v0}, Landroidx/fragment/app/FragmentManager;->isLoggingEnabled(I)Z move-result v0 if-eqz v0, :cond_0 .line 102 new-instance v0, Ljava/lang/StringBuilder; const-string v1, "onCleared called for " invoke-direct {v0, v1}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object v0 invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 const-string v1, "FragmentManager" invoke-static {v1, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I :cond_0 const/4 v0, 0x1 iput-boolean v0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mHasBeenCleared:Z return-void .end method .method removeRetainedFragment(Landroidx/fragment/app/Fragment;)V .locals 3 iget-boolean v0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mIsStateSaved:Z const-string v1, "FragmentManager" const/4 v2, 0x2 if-eqz v0, :cond_1 .line 155 invoke-static {v2}, Landroidx/fragment/app/FragmentManager;->isLoggingEnabled(I)Z move-result p0 if-eqz p0, :cond_0 const-string p0, "Ignoring removeRetainedFragment as the state is already saved" .line 156 invoke-static {v1, p0}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I :cond_0 return-void :cond_1 iget-object p0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mRetainedFragments:Ljava/util/HashMap; .line 160 iget-object v0, p1, Landroidx/fragment/app/Fragment;->mWho:Ljava/lang/String; invoke-virtual {p0, v0}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object; move-result-object p0 if-eqz p0, :cond_2 .line 161 invoke-static {v2}, Landroidx/fragment/app/FragmentManager;->isLoggingEnabled(I)Z move-result p0 if-eqz p0, :cond_2 .line 162 new-instance p0, Ljava/lang/StringBuilder; const-string v0, "Updating retained Fragments: Removed " invoke-direct {p0, v0}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V 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 invoke-static {v1, p0}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I :cond_2 return-void .end method .method restoreFromSnapshot(Landroidx/fragment/app/FragmentManagerNonConfig;)V .locals 4 .annotation runtime Ljava/lang/Deprecated; .end annotation iget-object v0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mRetainedFragments:Ljava/util/HashMap; .line 223 invoke-virtual {v0}, Ljava/util/HashMap;->clear()V iget-object v0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mChildNonConfigs:Ljava/util/HashMap; .line 224 invoke-virtual {v0}, Ljava/util/HashMap;->clear()V iget-object v0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mViewModelStores:Ljava/util/HashMap; .line 225 invoke-virtual {v0}, Ljava/util/HashMap;->clear()V if-eqz p1, :cond_3 .line 227 invoke-virtual {p1}, Landroidx/fragment/app/FragmentManagerNonConfig;->getFragments()Ljava/util/Collection; move-result-object v0 if-eqz v0, :cond_1 .line 229 invoke-interface {v0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator; move-result-object v0 :cond_0 :goto_0 invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z move-result v1 if-eqz v1, :cond_1 invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v1 check-cast v1, Landroidx/fragment/app/Fragment; if-eqz v1, :cond_0 iget-object v2, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mRetainedFragments:Ljava/util/HashMap; .line 231 iget-object v3, v1, Landroidx/fragment/app/Fragment;->mWho:Ljava/lang/String; invoke-virtual {v2, v3, v1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; goto :goto_0 .line 235 :cond_1 invoke-virtual {p1}, Landroidx/fragment/app/FragmentManagerNonConfig;->getChildNonConfigs()Ljava/util/Map; move-result-object v0 if-eqz v0, :cond_2 .line 238 invoke-interface {v0}, Ljava/util/Map;->entrySet()Ljava/util/Set; move-result-object v0 invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator; move-result-object v0 :goto_1 invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z move-result v1 if-eqz v1, :cond_2 invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v1 check-cast v1, Ljava/util/Map$Entry; .line 239 new-instance v2, Landroidx/fragment/app/FragmentManagerViewModel; iget-boolean v3, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mStateAutomaticallySaved:Z invoke-direct {v2, v3}, Landroidx/fragment/app/FragmentManagerViewModel;->(Z)V .line 241 invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object; move-result-object v3 check-cast v3, Landroidx/fragment/app/FragmentManagerNonConfig; invoke-virtual {v2, v3}, Landroidx/fragment/app/FragmentManagerViewModel;->restoreFromSnapshot(Landroidx/fragment/app/FragmentManagerNonConfig;)V iget-object v3, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mChildNonConfigs:Ljava/util/HashMap; .line 242 invoke-interface {v1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object; move-result-object v1 check-cast v1, Ljava/lang/String; invoke-virtual {v3, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; goto :goto_1 .line 245 :cond_2 invoke-virtual {p1}, Landroidx/fragment/app/FragmentManagerNonConfig;->getViewModelStores()Ljava/util/Map; move-result-object p1 if-eqz p1, :cond_3 iget-object v0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mViewModelStores:Ljava/util/HashMap; .line 247 invoke-virtual {v0, p1}, Ljava/util/HashMap;->putAll(Ljava/util/Map;)V :cond_3 const/4 p1, 0x0 iput-boolean p1, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mHasSavedSnapshot:Z return-void .end method .method setIsStateSaved(Z)V .locals 0 iput-boolean p1, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mIsStateSaved:Z return-void .end method .method shouldDestroy(Landroidx/fragment/app/Fragment;)Z .locals 1 iget-object v0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mRetainedFragments:Ljava/util/HashMap; .line 138 iget-object p1, p1, Landroidx/fragment/app/Fragment;->mWho:Ljava/lang/String; invoke-virtual {v0, p1}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z move-result p1 const/4 v0, 0x1 if-nez p1, :cond_0 return v0 :cond_0 iget-boolean p1, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mStateAutomaticallySaved:Z if-eqz p1, :cond_1 iget-boolean p0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mHasBeenCleared:Z return p0 :cond_1 iget-boolean p0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mHasSavedSnapshot:Z xor-int/2addr p0, v0 return p0 .end method .method public toString()Ljava/lang/String; .locals 4 .line 306 new-instance v0, Ljava/lang/StringBuilder; const-string v1, "FragmentManagerViewModel{" invoke-direct {v0, v1}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V .line 307 invoke-static {p0}, Ljava/lang/System;->identityHashCode(Ljava/lang/Object;)I move-result v1 invoke-static {v1}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String; move-result-object v1 invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; const-string v1, "} Fragments (" .line 308 invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; iget-object v1, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mRetainedFragments:Ljava/util/HashMap; .line 309 invoke-virtual {v1}, Ljava/util/HashMap;->values()Ljava/util/Collection; move-result-object v1 invoke-interface {v1}, Ljava/util/Collection;->iterator()Ljava/util/Iterator; move-result-object v1 .line 310 :cond_0 :goto_0 invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z move-result v2 const-string v3, ", " if-eqz v2, :cond_1 .line 311 invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v2 invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; .line 312 invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z move-result v2 if-eqz v2, :cond_0 .line 313 invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; goto :goto_0 :cond_1 const-string v1, ") Child Non Config (" .line 316 invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; iget-object v1, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mChildNonConfigs:Ljava/util/HashMap; .line 317 invoke-virtual {v1}, Ljava/util/HashMap;->keySet()Ljava/util/Set; move-result-object v1 invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator; move-result-object v1 .line 318 :cond_2 :goto_1 invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z move-result v2 if-eqz v2, :cond_3 .line 319 invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v2 check-cast v2, Ljava/lang/String; invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; .line 320 invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z move-result v2 if-eqz v2, :cond_2 .line 321 invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; goto :goto_1 :cond_3 const-string v1, ") ViewModelStores (" .line 324 invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; iget-object p0, p0, Landroidx/fragment/app/FragmentManagerViewModel;->mViewModelStores:Ljava/util/HashMap; .line 325 invoke-virtual {p0}, Ljava/util/HashMap;->keySet()Ljava/util/Set; move-result-object p0 invoke-interface {p0}, Ljava/util/Set;->iterator()Ljava/util/Iterator; move-result-object p0 .line 326 :cond_4 :goto_2 invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z move-result v1 if-eqz v1, :cond_5 .line 327 invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v1 check-cast v1, Ljava/lang/String; invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; .line 328 invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z move-result v1 if-eqz v1, :cond_4 .line 329 invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; goto :goto_2 :cond_5 const/16 p0, 0x29 .line 332 invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder; .line 333 invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p0 return-object p0 .end method