.class Landroidx/fragment/app/FragmentStore; .super Ljava/lang/Object; .source "FragmentStore.java" # static fields .field private static final TAG:Ljava/lang/String; = "FragmentManager" # instance fields .field private final mActive:Ljava/util/HashMap; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/HashMap<", "Ljava/lang/String;", "Landroidx/fragment/app/FragmentStateManager;", ">;" } .end annotation .end field .field private final mAdded:Ljava/util/ArrayList; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/ArrayList<", "Landroidx/fragment/app/Fragment;", ">;" } .end annotation .end field .field private mNonConfig:Landroidx/fragment/app/FragmentManagerViewModel; .field private final mSavedState:Ljava/util/HashMap; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/HashMap<", "Ljava/lang/String;", "Landroid/os/Bundle;", ">;" } .end annotation .end field # direct methods .method constructor ()V .locals 1 .line 35 invoke-direct {p0}, Ljava/lang/Object;->()V .line 38 new-instance v0, Ljava/util/ArrayList; invoke-direct {v0}, Ljava/util/ArrayList;->()V iput-object v0, p0, Landroidx/fragment/app/FragmentStore;->mAdded:Ljava/util/ArrayList; .line 39 new-instance v0, Ljava/util/HashMap; invoke-direct {v0}, Ljava/util/HashMap;->()V iput-object v0, p0, Landroidx/fragment/app/FragmentStore;->mActive:Ljava/util/HashMap; .line 40 new-instance v0, Ljava/util/HashMap; invoke-direct {v0}, Ljava/util/HashMap;->()V iput-object v0, p0, Landroidx/fragment/app/FragmentStore;->mSavedState:Ljava/util/HashMap; return-void .end method # virtual methods .method addFragment(Landroidx/fragment/app/Fragment;)V .locals 2 iget-object v0, p0, Landroidx/fragment/app/FragmentStore;->mAdded:Ljava/util/ArrayList; .line 92 invoke-virtual {v0, p1}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z move-result v0 if-nez v0, :cond_0 iget-object v0, p0, Landroidx/fragment/app/FragmentStore;->mAdded:Ljava/util/ArrayList; .line 95 monitor-enter v0 :try_start_0 iget-object p0, p0, Landroidx/fragment/app/FragmentStore;->mAdded:Ljava/util/ArrayList; .line 96 invoke-virtual {p0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z .line 97 monitor-exit v0 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 const/4 p0, 0x1 .line 98 iput-boolean p0, p1, Landroidx/fragment/app/Fragment;->mAdded:Z return-void :catchall_0 move-exception p0 .line 97 :try_start_1 monitor-exit v0 :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 throw p0 .line 93 :cond_0 new-instance p0, Ljava/lang/IllegalStateException; new-instance v0, Ljava/lang/StringBuilder; const-string v1, "Fragment already added: " 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 p1 invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V throw p0 .end method .method burpActive()V .locals 1 iget-object p0, p0, Landroidx/fragment/app/FragmentStore;->mActive:Ljava/util/HashMap; .line 177 invoke-virtual {p0}, Ljava/util/HashMap;->values()Ljava/util/Collection; move-result-object p0 const/4 v0, 0x0 .line 180 invoke-static {v0}, Ljava/util/Collections;->singleton(Ljava/lang/Object;)Ljava/util/Set; move-result-object v0 invoke-interface {p0, v0}, Ljava/util/Collection;->removeAll(Ljava/util/Collection;)Z return-void .end method .method containsActiveFragment(Ljava/lang/String;)Z .locals 0 iget-object p0, p0, Landroidx/fragment/app/FragmentStore;->mActive:Ljava/util/HashMap; .line 332 invoke-virtual {p0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object p0 if-eqz p0, :cond_0 const/4 p0, 0x1 goto :goto_0 :cond_0 const/4 p0, 0x0 :goto_0 return p0 .end method .method dispatchStateChange(I)V .locals 1 iget-object p0, p0, Landroidx/fragment/app/FragmentStore;->mActive:Ljava/util/HashMap; .line 102 invoke-virtual {p0}, Ljava/util/HashMap;->values()Ljava/util/Collection; move-result-object p0 invoke-interface {p0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator; move-result-object p0 :cond_0 :goto_0 invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_1 invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Landroidx/fragment/app/FragmentStateManager; if-eqz v0, :cond_0 .line 104 invoke-virtual {v0, p1}, Landroidx/fragment/app/FragmentStateManager;->setFragmentManagerState(I)V goto :goto_0 :cond_1 return-void .end method .method dump(Ljava/lang/String;Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V .locals 3 .line 412 new-instance v0, Ljava/lang/StringBuilder; invoke-direct {v0}, Ljava/lang/StringBuilder;->()V invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 const-string v1, " " invoke-virtual {v0, v1}, 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 iget-object v1, p0, Landroidx/fragment/app/FragmentStore;->mActive:Ljava/util/HashMap; .line 414 invoke-virtual {v1}, Ljava/util/HashMap;->isEmpty()Z move-result v1 if-nez v1, :cond_1 .line 415 invoke-virtual {p3, p1}, Ljava/io/PrintWriter;->print(Ljava/lang/String;)V const-string v1, "Active Fragments:" .line 416 invoke-virtual {p3, v1}, Ljava/io/PrintWriter;->println(Ljava/lang/String;)V iget-object v1, p0, Landroidx/fragment/app/FragmentStore;->mActive:Ljava/util/HashMap; .line 417 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 :goto_0 invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z move-result v2 if-eqz v2, :cond_1 invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v2 check-cast v2, Landroidx/fragment/app/FragmentStateManager; .line 418 invoke-virtual {p3, p1}, Ljava/io/PrintWriter;->print(Ljava/lang/String;)V if-eqz v2, :cond_0 .line 420 invoke-virtual {v2}, Landroidx/fragment/app/FragmentStateManager;->getFragment()Landroidx/fragment/app/Fragment; move-result-object v2 .line 421 invoke-virtual {p3, v2}, Ljava/io/PrintWriter;->println(Ljava/lang/Object;)V .line 422 invoke-virtual {v2, v0, p2, p3, p4}, Landroidx/fragment/app/Fragment;->dump(Ljava/lang/String;Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V goto :goto_0 :cond_0 const-string v2, "null" .line 424 invoke-virtual {p3, v2}, Ljava/io/PrintWriter;->println(Ljava/lang/String;)V goto :goto_0 :cond_1 iget-object p2, p0, Landroidx/fragment/app/FragmentStore;->mAdded:Ljava/util/ArrayList; .line 429 invoke-virtual {p2}, Ljava/util/ArrayList;->size()I move-result p2 if-lez p2, :cond_2 .line 431 invoke-virtual {p3, p1}, Ljava/io/PrintWriter;->print(Ljava/lang/String;)V const-string p4, "Added Fragments:" invoke-virtual {p3, p4}, Ljava/io/PrintWriter;->println(Ljava/lang/String;)V const/4 p4, 0x0 :goto_1 if-ge p4, p2, :cond_2 iget-object v0, p0, Landroidx/fragment/app/FragmentStore;->mAdded:Ljava/util/ArrayList; .line 433 invoke-virtual {v0, p4}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object; move-result-object v0 check-cast v0, Landroidx/fragment/app/Fragment; .line 434 invoke-virtual {p3, p1}, Ljava/io/PrintWriter;->print(Ljava/lang/String;)V const-string v1, " #" .line 435 invoke-virtual {p3, v1}, Ljava/io/PrintWriter;->print(Ljava/lang/String;)V .line 436 invoke-virtual {p3, p4}, Ljava/io/PrintWriter;->print(I)V const-string v1, ": " .line 437 invoke-virtual {p3, v1}, Ljava/io/PrintWriter;->print(Ljava/lang/String;)V .line 438 invoke-virtual {v0}, Landroidx/fragment/app/Fragment;->toString()Ljava/lang/String; move-result-object v0 invoke-virtual {p3, v0}, Ljava/io/PrintWriter;->println(Ljava/lang/String;)V add-int/lit8 p4, p4, 0x1 goto :goto_1 :cond_2 return-void .end method .method findActiveFragment(Ljava/lang/String;)Landroidx/fragment/app/Fragment; .locals 0 iget-object p0, p0, Landroidx/fragment/app/FragmentStore;->mActive:Ljava/util/HashMap; .line 355 invoke-virtual {p0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object p0 check-cast p0, Landroidx/fragment/app/FragmentStateManager; if-eqz p0, :cond_0 .line 357 invoke-virtual {p0}, Landroidx/fragment/app/FragmentStateManager;->getFragment()Landroidx/fragment/app/Fragment; move-result-object p0 return-object p0 :cond_0 const/4 p0, 0x0 return-object p0 .end method .method findFragmentById(I)Landroidx/fragment/app/Fragment; .locals 3 iget-object v0, p0, Landroidx/fragment/app/FragmentStore;->mAdded:Ljava/util/ArrayList; .line 288 invoke-virtual {v0}, Ljava/util/ArrayList;->size()I move-result v0 add-int/lit8 v0, v0, -0x1 :goto_0 if-ltz v0, :cond_1 iget-object v1, p0, Landroidx/fragment/app/FragmentStore;->mAdded:Ljava/util/ArrayList; .line 289 invoke-virtual {v1, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object; move-result-object v1 check-cast v1, Landroidx/fragment/app/Fragment; if-eqz v1, :cond_0 .line 290 iget v2, v1, Landroidx/fragment/app/Fragment;->mFragmentId:I if-ne v2, p1, :cond_0 return-object v1 :cond_0 add-int/lit8 v0, v0, -0x1 goto :goto_0 :cond_1 iget-object p0, p0, Landroidx/fragment/app/FragmentStore;->mActive:Ljava/util/HashMap; .line 295 invoke-virtual {p0}, Ljava/util/HashMap;->values()Ljava/util/Collection; move-result-object p0 invoke-interface {p0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator; move-result-object p0 :cond_2 invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_3 invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Landroidx/fragment/app/FragmentStateManager; if-eqz v0, :cond_2 .line 297 invoke-virtual {v0}, Landroidx/fragment/app/FragmentStateManager;->getFragment()Landroidx/fragment/app/Fragment; move-result-object v0 .line 298 iget v1, v0, Landroidx/fragment/app/Fragment;->mFragmentId:I if-ne v1, p1, :cond_2 return-object v0 :cond_3 const/4 p0, 0x0 return-object p0 .end method .method findFragmentByTag(Ljava/lang/String;)Landroidx/fragment/app/Fragment; .locals 3 if-eqz p1, :cond_1 iget-object v0, p0, Landroidx/fragment/app/FragmentStore;->mAdded:Ljava/util/ArrayList; .line 310 invoke-virtual {v0}, Ljava/util/ArrayList;->size()I move-result v0 add-int/lit8 v0, v0, -0x1 :goto_0 if-ltz v0, :cond_1 iget-object v1, p0, Landroidx/fragment/app/FragmentStore;->mAdded:Ljava/util/ArrayList; .line 311 invoke-virtual {v1, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object; move-result-object v1 check-cast v1, Landroidx/fragment/app/Fragment; if-eqz v1, :cond_0 .line 312 iget-object v2, v1, Landroidx/fragment/app/Fragment;->mTag:Ljava/lang/String; invoke-virtual {p1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v2 if-eqz v2, :cond_0 return-object v1 :cond_0 add-int/lit8 v0, v0, -0x1 goto :goto_0 :cond_1 if-eqz p1, :cond_3 iget-object p0, p0, Landroidx/fragment/app/FragmentStore;->mActive:Ljava/util/HashMap; .line 319 invoke-virtual {p0}, Ljava/util/HashMap;->values()Ljava/util/Collection; move-result-object p0 invoke-interface {p0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator; move-result-object p0 :cond_2 invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_3 invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Landroidx/fragment/app/FragmentStateManager; if-eqz v0, :cond_2 .line 321 invoke-virtual {v0}, Landroidx/fragment/app/FragmentStateManager;->getFragment()Landroidx/fragment/app/Fragment; move-result-object v0 .line 322 iget-object v1, v0, Landroidx/fragment/app/Fragment;->mTag:Ljava/lang/String; invoke-virtual {p1, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v1 if-eqz v1, :cond_2 return-object v0 :cond_3 const/4 p0, 0x0 return-object p0 .end method .method findFragmentByWho(Ljava/lang/String;)Landroidx/fragment/app/Fragment; .locals 1 iget-object p0, p0, Landroidx/fragment/app/FragmentStore;->mActive:Ljava/util/HashMap; .line 342 invoke-virtual {p0}, Ljava/util/HashMap;->values()Ljava/util/Collection; move-result-object p0 invoke-interface {p0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator; move-result-object p0 :cond_0 invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_1 invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Landroidx/fragment/app/FragmentStateManager; if-eqz v0, :cond_0 .line 344 invoke-virtual {v0}, Landroidx/fragment/app/FragmentStateManager;->getFragment()Landroidx/fragment/app/Fragment; move-result-object v0 .line 345 invoke-virtual {v0, p1}, Landroidx/fragment/app/Fragment;->findFragmentByWho(Ljava/lang/String;)Landroidx/fragment/app/Fragment; move-result-object v0 if-eqz v0, :cond_0 return-object v0 :cond_1 const/4 p0, 0x0 return-object p0 .end method .method findFragmentIndexInContainer(Landroidx/fragment/app/Fragment;)I .locals 5 .line 380 iget-object v0, p1, Landroidx/fragment/app/Fragment;->mContainer:Landroid/view/ViewGroup; const/4 v1, -0x1 if-nez v0, :cond_0 return v1 :cond_0 iget-object v2, p0, Landroidx/fragment/app/FragmentStore;->mAdded:Ljava/util/ArrayList; .line 385 invoke-virtual {v2, p1}, Ljava/util/ArrayList;->indexOf(Ljava/lang/Object;)I move-result p1 add-int/lit8 v2, p1, -0x1 :goto_0 if-ltz v2, :cond_2 iget-object v3, p0, Landroidx/fragment/app/FragmentStore;->mAdded:Ljava/util/ArrayList; .line 388 invoke-virtual {v3, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object; move-result-object v3 check-cast v3, Landroidx/fragment/app/Fragment; .line 389 iget-object v4, v3, Landroidx/fragment/app/Fragment;->mContainer:Landroid/view/ViewGroup; if-ne v4, v0, :cond_1 iget-object v4, v3, Landroidx/fragment/app/Fragment;->mView:Landroid/view/View; if-eqz v4, :cond_1 .line 391 iget-object p0, v3, Landroidx/fragment/app/Fragment;->mView:Landroid/view/View; invoke-virtual {v0, p0}, Landroid/view/ViewGroup;->indexOfChild(Landroid/view/View;)I move-result p0 add-int/lit8 p0, p0, 0x1 return p0 :cond_1 add-int/lit8 v2, v2, -0x1 goto :goto_0 :cond_2 :goto_1 add-int/lit8 p1, p1, 0x1 iget-object v2, p0, Landroidx/fragment/app/FragmentStore;->mAdded:Ljava/util/ArrayList; .line 397 invoke-virtual {v2}, Ljava/util/ArrayList;->size()I move-result v2 if-ge p1, v2, :cond_4 iget-object v2, p0, Landroidx/fragment/app/FragmentStore;->mAdded:Ljava/util/ArrayList; .line 398 invoke-virtual {v2, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object; move-result-object v2 check-cast v2, Landroidx/fragment/app/Fragment; .line 399 iget-object v3, v2, Landroidx/fragment/app/Fragment;->mContainer:Landroid/view/ViewGroup; if-ne v3, v0, :cond_3 iget-object v3, v2, Landroidx/fragment/app/Fragment;->mView:Landroid/view/View; if-eqz v3, :cond_3 .line 402 iget-object p0, v2, Landroidx/fragment/app/Fragment;->mView:Landroid/view/View; invoke-virtual {v0, p0}, Landroid/view/ViewGroup;->indexOfChild(Landroid/view/View;)I move-result p0 return p0 :cond_3 goto :goto_1 :cond_4 return v1 .end method .method getActiveFragmentCount()I .locals 0 iget-object p0, p0, Landroidx/fragment/app/FragmentStore;->mActive:Ljava/util/HashMap; .line 282 invoke-virtual {p0}, Ljava/util/HashMap;->size()I move-result p0 return p0 .end method .method getActiveFragmentStateManagers()Ljava/util/List; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "()", "Ljava/util/List<", "Landroidx/fragment/app/FragmentStateManager;", ">;" } .end annotation .line 248 new-instance v0, Ljava/util/ArrayList; invoke-direct {v0}, Ljava/util/ArrayList;->()V iget-object p0, p0, Landroidx/fragment/app/FragmentStore;->mActive:Ljava/util/HashMap; .line 249 invoke-virtual {p0}, Ljava/util/HashMap;->values()Ljava/util/Collection; move-result-object p0 invoke-interface {p0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator; move-result-object p0 :cond_0 :goto_0 invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z move-result v1 if-eqz v1, :cond_1 invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v1 check-cast v1, Landroidx/fragment/app/FragmentStateManager; if-eqz v1, :cond_0 .line 251 invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z goto :goto_0 :cond_1 return-object v0 .end method .method getActiveFragments()Ljava/util/List; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "()", "Ljava/util/List<", "Landroidx/fragment/app/Fragment;", ">;" } .end annotation .line 270 new-instance v0, Ljava/util/ArrayList; invoke-direct {v0}, Ljava/util/ArrayList;->()V iget-object p0, p0, Landroidx/fragment/app/FragmentStore;->mActive:Ljava/util/HashMap; .line 271 invoke-virtual {p0}, Ljava/util/HashMap;->values()Ljava/util/Collection; move-result-object p0 invoke-interface {p0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator; move-result-object p0 :goto_0 invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z move-result v1 if-eqz v1, :cond_1 invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v1 check-cast v1, Landroidx/fragment/app/FragmentStateManager; if-eqz v1, :cond_0 .line 273 invoke-virtual {v1}, Landroidx/fragment/app/FragmentStateManager;->getFragment()Landroidx/fragment/app/Fragment; move-result-object v1 invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z goto :goto_0 :cond_0 const/4 v1, 0x0 .line 275 invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z goto :goto_0 :cond_1 return-object v0 .end method .method getAllSavedState()Ljava/util/HashMap; .locals 0 .annotation system Ldalvik/annotation/Signature; value = { "()", "Ljava/util/HashMap<", "Ljava/lang/String;", "Landroid/os/Bundle;", ">;" } .end annotation iget-object p0, p0, Landroidx/fragment/app/FragmentStore;->mSavedState:Ljava/util/HashMap; return-object p0 .end method .method getFragmentStateManager(Ljava/lang/String;)Landroidx/fragment/app/FragmentStateManager; .locals 0 iget-object p0, p0, Landroidx/fragment/app/FragmentStore;->mActive:Ljava/util/HashMap; .line 337 invoke-virtual {p0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object p0 check-cast p0, Landroidx/fragment/app/FragmentStateManager; return-object p0 .end method .method getFragments()Ljava/util/List; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "()", "Ljava/util/List<", "Landroidx/fragment/app/Fragment;", ">;" } .end annotation iget-object v0, p0, Landroidx/fragment/app/FragmentStore;->mAdded:Ljava/util/ArrayList; .line 260 invoke-virtual {v0}, Ljava/util/ArrayList;->isEmpty()Z move-result v0 if-eqz v0, :cond_0 .line 261 invoke-static {}, Ljava/util/Collections;->emptyList()Ljava/util/List; move-result-object p0 return-object p0 :cond_0 iget-object v0, p0, Landroidx/fragment/app/FragmentStore;->mAdded:Ljava/util/ArrayList; .line 263 monitor-enter v0 .line 264 :try_start_0 new-instance v1, Ljava/util/ArrayList; iget-object p0, p0, Landroidx/fragment/app/FragmentStore;->mAdded:Ljava/util/ArrayList; invoke-direct {v1, p0}, Ljava/util/ArrayList;->(Ljava/util/Collection;)V monitor-exit v0 return-object v1 :catchall_0 move-exception p0 .line 265 monitor-exit v0 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 throw p0 .end method .method getNonConfig()Landroidx/fragment/app/FragmentManagerViewModel; .locals 0 iget-object p0, p0, Landroidx/fragment/app/FragmentStore;->mNonConfig:Landroidx/fragment/app/FragmentManagerViewModel; return-object p0 .end method .method getSavedState(Ljava/lang/String;)Landroid/os/Bundle; .locals 0 iget-object p0, p0, Landroidx/fragment/app/FragmentStore;->mSavedState:Ljava/util/HashMap; .line 185 invoke-virtual {p0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object p0 check-cast p0, Landroid/os/Bundle; return-object p0 .end method .method makeActive(Landroidx/fragment/app/FragmentStateManager;)V .locals 3 .line 73 invoke-virtual {p1}, Landroidx/fragment/app/FragmentStateManager;->getFragment()Landroidx/fragment/app/Fragment; move-result-object v0 .line 74 iget-object v1, v0, Landroidx/fragment/app/Fragment;->mWho:Ljava/lang/String; invoke-virtual {p0, v1}, Landroidx/fragment/app/FragmentStore;->containsActiveFragment(Ljava/lang/String;)Z move-result v1 if-eqz v1, :cond_0 return-void :cond_0 iget-object v1, p0, Landroidx/fragment/app/FragmentStore;->mActive:Ljava/util/HashMap; .line 77 iget-object v2, v0, Landroidx/fragment/app/Fragment;->mWho:Ljava/lang/String; invoke-virtual {v1, v2, p1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; .line 78 iget-boolean p1, v0, Landroidx/fragment/app/Fragment;->mRetainInstanceChangedWhileDetached:Z if-eqz p1, :cond_2 .line 79 iget-boolean p1, v0, Landroidx/fragment/app/Fragment;->mRetainInstance:Z if-eqz p1, :cond_1 iget-object p0, p0, Landroidx/fragment/app/FragmentStore;->mNonConfig:Landroidx/fragment/app/FragmentManagerViewModel; .line 80 invoke-virtual {p0, v0}, Landroidx/fragment/app/FragmentManagerViewModel;->addRetainedFragment(Landroidx/fragment/app/Fragment;)V goto :goto_0 :cond_1 iget-object p0, p0, Landroidx/fragment/app/FragmentStore;->mNonConfig:Landroidx/fragment/app/FragmentManagerViewModel; .line 82 invoke-virtual {p0, v0}, Landroidx/fragment/app/FragmentManagerViewModel;->removeRetainedFragment(Landroidx/fragment/app/Fragment;)V :goto_0 const/4 p0, 0x0 .line 84 iput-boolean p0, v0, Landroidx/fragment/app/Fragment;->mRetainInstanceChangedWhileDetached:Z :cond_2 const/4 p0, 0x2 .line 86 invoke-static {p0}, Landroidx/fragment/app/FragmentManager;->isLoggingEnabled(I)Z move-result p0 if-eqz p0, :cond_3 .line 87 new-instance p0, Ljava/lang/StringBuilder; const-string p1, "Added fragment to active set " invoke-direct {p0, p1}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {p0, v0}, 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 const-string p1, "FragmentManager" invoke-static {p1, p0}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I :cond_3 return-void .end method .method makeInactive(Landroidx/fragment/app/FragmentStateManager;)V .locals 3 .line 148 invoke-virtual {p1}, Landroidx/fragment/app/FragmentStateManager;->getFragment()Landroidx/fragment/app/Fragment; move-result-object v0 .line 150 iget-boolean v1, v0, Landroidx/fragment/app/Fragment;->mRetainInstance:Z if-eqz v1, :cond_0 iget-object v1, p0, Landroidx/fragment/app/FragmentStore;->mNonConfig:Landroidx/fragment/app/FragmentManagerViewModel; .line 151 invoke-virtual {v1, v0}, Landroidx/fragment/app/FragmentManagerViewModel;->removeRetainedFragment(Landroidx/fragment/app/Fragment;)V :cond_0 iget-object v1, p0, Landroidx/fragment/app/FragmentStore;->mActive:Ljava/util/HashMap; .line 154 iget-object v2, v0, Landroidx/fragment/app/Fragment;->mWho:Ljava/lang/String; invoke-virtual {v1, v2}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v1 if-eq v1, p1, :cond_1 return-void :cond_1 iget-object p0, p0, Landroidx/fragment/app/FragmentStore;->mActive:Ljava/util/HashMap; .line 160 iget-object p1, v0, Landroidx/fragment/app/Fragment;->mWho:Ljava/lang/String; const/4 v1, 0x0 invoke-virtual {p0, p1, v1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; move-result-object p0 check-cast p0, Landroidx/fragment/app/FragmentStateManager; if-nez p0, :cond_2 return-void :cond_2 const/4 p0, 0x2 .line 166 invoke-static {p0}, Landroidx/fragment/app/FragmentManager;->isLoggingEnabled(I)Z move-result p0 if-eqz p0, :cond_3 .line 167 new-instance p0, Ljava/lang/StringBuilder; const-string p1, "Removed fragment from active set " invoke-direct {p0, p1}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {p0, v0}, 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 const-string p1, "FragmentManager" invoke-static {p1, p0}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I :cond_3 return-void .end method .method moveToExpectedState()V .locals 5 iget-object v0, p0, Landroidx/fragment/app/FragmentStore;->mAdded:Ljava/util/ArrayList; .line 111 invoke-virtual {v0}, Ljava/util/ArrayList;->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; iget-object v2, p0, Landroidx/fragment/app/FragmentStore;->mActive:Ljava/util/HashMap; .line 112 iget-object v1, v1, Landroidx/fragment/app/Fragment;->mWho:Ljava/lang/String; invoke-virtual {v2, v1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v1 check-cast v1, Landroidx/fragment/app/FragmentStateManager; if-eqz v1, :cond_0 .line 114 invoke-virtual {v1}, Landroidx/fragment/app/FragmentStateManager;->moveToExpectedState()V goto :goto_0 :cond_1 iget-object v0, p0, Landroidx/fragment/app/FragmentStore;->mActive:Ljava/util/HashMap; .line 120 invoke-virtual {v0}, Ljava/util/HashMap;->values()Ljava/util/Collection; move-result-object v0 invoke-interface {v0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator; move-result-object v0 :cond_2 :goto_1 invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z move-result v1 if-eqz v1, :cond_4 invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v1 check-cast v1, Landroidx/fragment/app/FragmentStateManager; if-eqz v1, :cond_2 .line 122 invoke-virtual {v1}, Landroidx/fragment/app/FragmentStateManager;->moveToExpectedState()V .line 124 invoke-virtual {v1}, Landroidx/fragment/app/FragmentStateManager;->getFragment()Landroidx/fragment/app/Fragment; move-result-object v2 .line 125 iget-boolean v3, v2, Landroidx/fragment/app/Fragment;->mRemoving:Z if-eqz v3, :cond_2 invoke-virtual {v2}, Landroidx/fragment/app/Fragment;->isInBackStack()Z move-result v3 if-nez v3, :cond_2 .line 127 iget-boolean v3, v2, Landroidx/fragment/app/Fragment;->mBeingSaved:Z if-eqz v3, :cond_3 iget-object v3, p0, Landroidx/fragment/app/FragmentStore;->mSavedState:Ljava/util/HashMap; iget-object v4, v2, Landroidx/fragment/app/Fragment;->mWho:Ljava/lang/String; invoke-virtual {v3, v4}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z move-result v3 if-nez v3, :cond_3 .line 132 iget-object v2, v2, Landroidx/fragment/app/Fragment;->mWho:Ljava/lang/String; invoke-virtual {v1}, Landroidx/fragment/app/FragmentStateManager;->saveState()Landroid/os/Bundle; move-result-object v3 invoke-virtual {p0, v2, v3}, Landroidx/fragment/app/FragmentStore;->setSavedState(Ljava/lang/String;Landroid/os/Bundle;)Landroid/os/Bundle; .line 134 :cond_3 invoke-virtual {p0, v1}, Landroidx/fragment/app/FragmentStore;->makeInactive(Landroidx/fragment/app/FragmentStateManager;)V goto :goto_1 :cond_4 return-void .end method .method removeFragment(Landroidx/fragment/app/Fragment;)V .locals 1 iget-object v0, p0, Landroidx/fragment/app/FragmentStore;->mAdded:Ljava/util/ArrayList; .line 141 monitor-enter v0 :try_start_0 iget-object p0, p0, Landroidx/fragment/app/FragmentStore;->mAdded:Ljava/util/ArrayList; .line 142 invoke-virtual {p0, p1}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z .line 143 monitor-exit v0 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 const/4 p0, 0x0 .line 144 iput-boolean p0, p1, Landroidx/fragment/app/Fragment;->mAdded:Z return-void :catchall_0 move-exception p0 .line 143 :try_start_1 monitor-exit v0 :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 throw p0 .end method .method resetActiveFragments()V .locals 0 iget-object p0, p0, Landroidx/fragment/app/FragmentStore;->mActive:Ljava/util/HashMap; .line 53 invoke-virtual {p0}, Ljava/util/HashMap;->clear()V return-void .end method .method restoreAddedFragments(Ljava/util/List;)V .locals 4 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/List<", "Ljava/lang/String;", ">;)V" } .end annotation iget-object v0, p0, Landroidx/fragment/app/FragmentStore;->mAdded:Ljava/util/ArrayList; .line 57 invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V if-eqz p1, :cond_2 .line 59 invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator; move-result-object p1 :goto_0 invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_2 invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/lang/String; .line 60 invoke-virtual {p0, v0}, Landroidx/fragment/app/FragmentStore;->findActiveFragment(Ljava/lang/String;)Landroidx/fragment/app/Fragment; move-result-object v1 if-eqz v1, :cond_1 const/4 v2, 0x2 .line 64 invoke-static {v2}, Landroidx/fragment/app/FragmentManager;->isLoggingEnabled(I)Z move-result v2 if-eqz v2, :cond_0 .line 65 new-instance v2, Ljava/lang/StringBuilder; const-string v3, "restoreSaveState: added (" invoke-direct {v2, v3}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 const-string v2, "): " invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 invoke-virtual {v0, v1}, 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 v2, "FragmentManager" invoke-static {v2, v0}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I .line 67 :cond_0 invoke-virtual {p0, v1}, Landroidx/fragment/app/FragmentStore;->addFragment(Landroidx/fragment/app/Fragment;)V goto :goto_0 .line 62 :cond_1 new-instance p0, Ljava/lang/IllegalStateException; new-instance p1, Ljava/lang/StringBuilder; const-string v1, "No instantiated fragment for (" invoke-direct {p1, v1}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p1 const-string v0, ")" invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p1 invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V throw p0 :cond_2 return-void .end method .method restoreSaveState(Ljava/util/HashMap;)V .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/HashMap<", "Ljava/lang/String;", "Landroid/os/Bundle;", ">;)V" } .end annotation iget-object v0, p0, Landroidx/fragment/app/FragmentStore;->mSavedState:Ljava/util/HashMap; .line 201 invoke-virtual {v0}, Ljava/util/HashMap;->clear()V iget-object p0, p0, Landroidx/fragment/app/FragmentStore;->mSavedState:Ljava/util/HashMap; .line 202 invoke-virtual {p0, p1}, Ljava/util/HashMap;->putAll(Ljava/util/Map;)V return-void .end method .method saveActiveFragments()Ljava/util/ArrayList; .locals 5 .annotation system Ldalvik/annotation/Signature; value = { "()", "Ljava/util/ArrayList<", "Ljava/lang/String;", ">;" } .end annotation .line 212 new-instance v0, Ljava/util/ArrayList; iget-object v1, p0, Landroidx/fragment/app/FragmentStore;->mActive:Ljava/util/HashMap; invoke-virtual {v1}, Ljava/util/HashMap;->size()I move-result v1 invoke-direct {v0, v1}, Ljava/util/ArrayList;->(I)V iget-object v1, p0, Landroidx/fragment/app/FragmentStore;->mActive:Ljava/util/HashMap; .line 213 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 :cond_0 :goto_0 invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z move-result v2 if-eqz v2, :cond_1 invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v2 check-cast v2, Landroidx/fragment/app/FragmentStateManager; if-eqz v2, :cond_0 .line 215 invoke-virtual {v2}, Landroidx/fragment/app/FragmentStateManager;->getFragment()Landroidx/fragment/app/Fragment; move-result-object v3 .line 217 iget-object v4, v3, Landroidx/fragment/app/Fragment;->mWho:Ljava/lang/String; invoke-virtual {v2}, Landroidx/fragment/app/FragmentStateManager;->saveState()Landroid/os/Bundle; move-result-object v2 invoke-virtual {p0, v4, v2}, Landroidx/fragment/app/FragmentStore;->setSavedState(Ljava/lang/String;Landroid/os/Bundle;)Landroid/os/Bundle; .line 218 iget-object v2, v3, Landroidx/fragment/app/Fragment;->mWho:Ljava/lang/String; invoke-virtual {v0, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z const/4 v2, 0x2 .line 220 invoke-static {v2}, Landroidx/fragment/app/FragmentManager;->isLoggingEnabled(I)Z move-result v2 if-eqz v2, :cond_0 .line 221 new-instance v2, Ljava/lang/StringBuilder; const-string v4, "Saved state of " invoke-direct {v2, v4}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object v2 const-string v4, ": " invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 iget-object v3, v3, Landroidx/fragment/app/Fragment;->mSavedFragmentState:Landroid/os/Bundle; invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object v2 invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v2 const-string v3, "FragmentManager" invoke-static {v3, v2}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I goto :goto_0 :cond_1 return-object v0 .end method .method saveAddedFragments()Ljava/util/ArrayList; .locals 6 .annotation system Ldalvik/annotation/Signature; value = { "()", "Ljava/util/ArrayList<", "Ljava/lang/String;", ">;" } .end annotation iget-object v0, p0, Landroidx/fragment/app/FragmentStore;->mAdded:Ljava/util/ArrayList; .line 230 monitor-enter v0 :try_start_0 iget-object v1, p0, Landroidx/fragment/app/FragmentStore;->mAdded:Ljava/util/ArrayList; .line 231 invoke-virtual {v1}, Ljava/util/ArrayList;->isEmpty()Z move-result v1 if-eqz v1, :cond_0 .line 232 monitor-exit v0 const/4 p0, 0x0 return-object p0 .line 234 :cond_0 new-instance v1, Ljava/util/ArrayList; iget-object v2, p0, Landroidx/fragment/app/FragmentStore;->mAdded:Ljava/util/ArrayList; invoke-virtual {v2}, Ljava/util/ArrayList;->size()I move-result v2 invoke-direct {v1, v2}, Ljava/util/ArrayList;->(I)V iget-object p0, p0, Landroidx/fragment/app/FragmentStore;->mAdded:Ljava/util/ArrayList; .line 235 invoke-virtual {p0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator; move-result-object p0 :cond_1 :goto_0 invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z move-result v2 if-eqz v2, :cond_2 invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v2 check-cast v2, Landroidx/fragment/app/Fragment; .line 236 iget-object v3, v2, Landroidx/fragment/app/Fragment;->mWho:Ljava/lang/String; invoke-virtual {v1, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z const/4 v3, 0x2 .line 237 invoke-static {v3}, Landroidx/fragment/app/FragmentManager;->isLoggingEnabled(I)Z move-result v3 if-eqz v3, :cond_1 const-string v3, "FragmentManager" .line 238 new-instance v4, Ljava/lang/StringBuilder; invoke-direct {v4}, Ljava/lang/StringBuilder;->()V const-string v5, "saveAllState: adding fragment (" invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v4 iget-object v5, v2, Landroidx/fragment/app/Fragment;->mWho:Ljava/lang/String; invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v4 const-string v5, "): " invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v4 invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object v2 invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v2 invoke-static {v3, v2}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I goto :goto_0 .line 242 :cond_2 monitor-exit v0 return-object v1 :catchall_0 move-exception p0 .line 243 monitor-exit v0 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 throw p0 .end method .method setNonConfig(Landroidx/fragment/app/FragmentManagerViewModel;)V .locals 0 iput-object p1, p0, Landroidx/fragment/app/FragmentStore;->mNonConfig:Landroidx/fragment/app/FragmentManagerViewModel; return-void .end method .method setSavedState(Ljava/lang/String;Landroid/os/Bundle;)Landroid/os/Bundle; .locals 0 if-eqz p2, :cond_0 iget-object p0, p0, Landroidx/fragment/app/FragmentStore;->mSavedState:Ljava/util/HashMap; .line 194 invoke-virtual {p0, p1, p2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; move-result-object p0 check-cast p0, Landroid/os/Bundle; return-object p0 :cond_0 iget-object p0, p0, Landroidx/fragment/app/FragmentStore;->mSavedState:Ljava/util/HashMap; .line 196 invoke-virtual {p0, p1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object; move-result-object p0 check-cast p0, Landroid/os/Bundle; return-object p0 .end method