apkfuckery/com.discord/smali/androidx/fragment/app/FragmentStatePagerAdapter.smali

751 lines
23 KiB
Smali
Raw Normal View History

2019-07-24 11:27:29 +00:00
.class public abstract Landroidx/fragment/app/FragmentStatePagerAdapter;
.super Landroidx/viewpager/widget/PagerAdapter;
.source "FragmentStatePagerAdapter.java"
# static fields
2019-10-07 23:23:22 +00:00
.field public static final BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT:I = 0x1
.field public static final BEHAVIOR_SET_USER_VISIBLE_HINT:I = 0x0
.annotation runtime Ljava/lang/Deprecated;
.end annotation
.end field
2019-12-06 03:29:40 +00:00
.field public static final DEBUG:Z = false
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public static final TAG:Ljava/lang/String; = "FragmentStatePagerAdapt"
2019-07-24 11:27:29 +00:00
# instance fields
2019-12-06 03:29:40 +00:00
.field public final mBehavior:I
2019-10-07 23:23:22 +00:00
2019-12-06 03:29:40 +00:00
.field public mCurTransaction:Landroidx/fragment/app/FragmentTransaction;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public mCurrentPrimaryItem:Landroidx/fragment/app/Fragment;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public final mFragmentManager:Landroidx/fragment/app/FragmentManager;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public mFragments:Ljava/util/ArrayList;
2019-07-24 11:27:29 +00:00
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList<",
"Landroidx/fragment/app/Fragment;",
">;"
}
.end annotation
.end field
2019-12-06 03:29:40 +00:00
.field public mSavedState:Ljava/util/ArrayList;
2019-07-24 11:27:29 +00:00
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList<",
"Landroidx/fragment/app/Fragment$SavedState;",
">;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Landroidx/fragment/app/FragmentManager;)V
2019-10-07 23:23:22 +00:00
.locals 1
2019-12-06 03:29:40 +00:00
.param p1 # Landroidx/fragment/app/FragmentManager;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
2019-10-07 23:23:22 +00:00
.annotation runtime Ljava/lang/Deprecated;
.end annotation
const/4 v0, 0x0
invoke-direct {p0, p1, v0}, Landroidx/fragment/app/FragmentStatePagerAdapter;-><init>(Landroidx/fragment/app/FragmentManager;I)V
return-void
.end method
.method public constructor <init>(Landroidx/fragment/app/FragmentManager;I)V
2019-07-24 11:27:29 +00:00
.locals 2
2019-12-06 03:29:40 +00:00
.param p1 # Landroidx/fragment/app/FragmentManager;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
2019-07-24 11:27:29 +00:00
invoke-direct {p0}, Landroidx/viewpager/widget/PagerAdapter;-><init>()V
const/4 v0, 0x0
iput-object v0, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mCurTransaction:Landroidx/fragment/app/FragmentTransaction;
new-instance v1, Ljava/util/ArrayList;
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
iput-object v1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mSavedState:Ljava/util/ArrayList;
new-instance v1, Ljava/util/ArrayList;
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
iput-object v1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mFragments:Ljava/util/ArrayList;
iput-object v0, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mCurrentPrimaryItem:Landroidx/fragment/app/Fragment;
iput-object p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mFragmentManager:Landroidx/fragment/app/FragmentManager;
2019-10-07 23:23:22 +00:00
iput p2, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mBehavior:I
2019-07-24 11:27:29 +00:00
return-void
.end method
# virtual methods
.method public destroyItem(Landroid/view/ViewGroup;ILjava/lang/Object;)V
.locals 2
2019-12-06 03:29:40 +00:00
.param p1 # Landroid/view/ViewGroup;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p3 # Ljava/lang/Object;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
2019-07-24 11:27:29 +00:00
check-cast p3, Landroidx/fragment/app/Fragment;
iget-object p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mCurTransaction:Landroidx/fragment/app/FragmentTransaction;
if-nez p1, :cond_0
iget-object p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mFragmentManager:Landroidx/fragment/app/FragmentManager;
invoke-virtual {p1}, Landroidx/fragment/app/FragmentManager;->beginTransaction()Landroidx/fragment/app/FragmentTransaction;
move-result-object p1
iput-object p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mCurTransaction:Landroidx/fragment/app/FragmentTransaction;
:cond_0
:goto_0
iget-object p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mSavedState:Ljava/util/ArrayList;
invoke-virtual {p1}, Ljava/util/ArrayList;->size()I
move-result p1
const/4 v0, 0x0
if-gt p1, p2, :cond_1
iget-object p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mSavedState:Ljava/util/ArrayList;
invoke-virtual {p1, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto :goto_0
:cond_1
iget-object p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mSavedState:Ljava/util/ArrayList;
invoke-virtual {p3}, Landroidx/fragment/app/Fragment;->isAdded()Z
move-result v1
if-eqz v1, :cond_2
iget-object v1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mFragmentManager:Landroidx/fragment/app/FragmentManager;
invoke-virtual {v1, p3}, Landroidx/fragment/app/FragmentManager;->saveFragmentInstanceState(Landroidx/fragment/app/Fragment;)Landroidx/fragment/app/Fragment$SavedState;
move-result-object v1
goto :goto_1
:cond_2
move-object v1, v0
:goto_1
invoke-virtual {p1, p2, v1}, Ljava/util/ArrayList;->set(ILjava/lang/Object;)Ljava/lang/Object;
iget-object p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mFragments:Ljava/util/ArrayList;
invoke-virtual {p1, p2, v0}, Ljava/util/ArrayList;->set(ILjava/lang/Object;)Ljava/lang/Object;
iget-object p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mCurTransaction:Landroidx/fragment/app/FragmentTransaction;
invoke-virtual {p1, p3}, Landroidx/fragment/app/FragmentTransaction;->remove(Landroidx/fragment/app/Fragment;)Landroidx/fragment/app/FragmentTransaction;
2019-10-07 23:23:22 +00:00
iget-object p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mCurrentPrimaryItem:Landroidx/fragment/app/Fragment;
if-ne p3, p1, :cond_3
iput-object v0, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mCurrentPrimaryItem:Landroidx/fragment/app/Fragment;
:cond_3
2019-07-24 11:27:29 +00:00
return-void
.end method
.method public finishUpdate(Landroid/view/ViewGroup;)V
.locals 0
2019-12-06 03:29:40 +00:00
.param p1 # Landroid/view/ViewGroup;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
2019-07-24 11:27:29 +00:00
iget-object p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mCurTransaction:Landroidx/fragment/app/FragmentTransaction;
if-eqz p1, :cond_0
invoke-virtual {p1}, Landroidx/fragment/app/FragmentTransaction;->commitNowAllowingStateLoss()V
const/4 p1, 0x0
iput-object p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mCurTransaction:Landroidx/fragment/app/FragmentTransaction;
:cond_0
return-void
.end method
.method public abstract getItem(I)Landroidx/fragment/app/Fragment;
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/NonNull;
.end annotation
2019-07-24 11:27:29 +00:00
.end method
.method public instantiateItem(Landroid/view/ViewGroup;I)Ljava/lang/Object;
.locals 3
2019-12-06 03:29:40 +00:00
.param p1 # Landroid/view/ViewGroup;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Landroidx/annotation/NonNull;
.end annotation
2019-07-24 11:27:29 +00:00
iget-object v0, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mFragments:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
move-result v0
if-le v0, p2, :cond_0
iget-object v0, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mFragments:Ljava/util/ArrayList;
invoke-virtual {v0, p2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroidx/fragment/app/Fragment;
if-eqz v0, :cond_0
return-object v0
:cond_0
iget-object v0, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mCurTransaction:Landroidx/fragment/app/FragmentTransaction;
if-nez v0, :cond_1
iget-object v0, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mFragmentManager:Landroidx/fragment/app/FragmentManager;
invoke-virtual {v0}, Landroidx/fragment/app/FragmentManager;->beginTransaction()Landroidx/fragment/app/FragmentTransaction;
move-result-object v0
iput-object v0, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mCurTransaction:Landroidx/fragment/app/FragmentTransaction;
:cond_1
invoke-virtual {p0, p2}, Landroidx/fragment/app/FragmentStatePagerAdapter;->getItem(I)Landroidx/fragment/app/Fragment;
move-result-object v0
iget-object v1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mSavedState:Ljava/util/ArrayList;
invoke-virtual {v1}, Ljava/util/ArrayList;->size()I
move-result v1
if-le v1, p2, :cond_2
iget-object v1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mSavedState:Ljava/util/ArrayList;
invoke-virtual {v1, p2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroidx/fragment/app/Fragment$SavedState;
if-eqz v1, :cond_2
invoke-virtual {v0, v1}, Landroidx/fragment/app/Fragment;->setInitialSavedState(Landroidx/fragment/app/Fragment$SavedState;)V
:cond_2
:goto_0
iget-object v1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mFragments:Ljava/util/ArrayList;
invoke-virtual {v1}, Ljava/util/ArrayList;->size()I
move-result v1
if-gt v1, p2, :cond_3
iget-object v1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mFragments:Ljava/util/ArrayList;
const/4 v2, 0x0
invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto :goto_0
:cond_3
const/4 v1, 0x0
invoke-virtual {v0, v1}, Landroidx/fragment/app/Fragment;->setMenuVisibility(Z)V
2019-10-07 23:23:22 +00:00
iget v2, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mBehavior:I
if-nez v2, :cond_4
2019-07-24 11:27:29 +00:00
invoke-virtual {v0, v1}, Landroidx/fragment/app/Fragment;->setUserVisibleHint(Z)V
2019-10-07 23:23:22 +00:00
:cond_4
2019-07-24 11:27:29 +00:00
iget-object v1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mFragments:Ljava/util/ArrayList;
invoke-virtual {v1, p2, v0}, Ljava/util/ArrayList;->set(ILjava/lang/Object;)Ljava/lang/Object;
iget-object p2, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mCurTransaction:Landroidx/fragment/app/FragmentTransaction;
invoke-virtual {p1}, Landroid/view/ViewGroup;->getId()I
move-result p1
invoke-virtual {p2, p1, v0}, Landroidx/fragment/app/FragmentTransaction;->add(ILandroidx/fragment/app/Fragment;)Landroidx/fragment/app/FragmentTransaction;
2019-10-07 23:23:22 +00:00
iget p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mBehavior:I
const/4 p2, 0x1
if-ne p1, p2, :cond_5
iget-object p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mCurTransaction:Landroidx/fragment/app/FragmentTransaction;
sget-object p2, Landroidx/lifecycle/Lifecycle$State;->STARTED:Landroidx/lifecycle/Lifecycle$State;
invoke-virtual {p1, v0, p2}, Landroidx/fragment/app/FragmentTransaction;->setMaxLifecycle(Landroidx/fragment/app/Fragment;Landroidx/lifecycle/Lifecycle$State;)Landroidx/fragment/app/FragmentTransaction;
:cond_5
2019-07-24 11:27:29 +00:00
return-object v0
.end method
.method public isViewFromObject(Landroid/view/View;Ljava/lang/Object;)Z
.locals 0
2019-12-06 03:29:40 +00:00
.param p1 # Landroid/view/View;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Ljava/lang/Object;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
2019-07-24 11:27:29 +00:00
check-cast p2, Landroidx/fragment/app/Fragment;
invoke-virtual {p2}, Landroidx/fragment/app/Fragment;->getView()Landroid/view/View;
move-result-object p2
if-ne p2, p1, :cond_0
const/4 p1, 0x1
2019-12-06 03:29:40 +00:00
goto :goto_0
2019-07-24 11:27:29 +00:00
:cond_0
const/4 p1, 0x0
2019-12-06 03:29:40 +00:00
:goto_0
2019-07-24 11:27:29 +00:00
return p1
.end method
.method public restoreState(Landroid/os/Parcelable;Ljava/lang/ClassLoader;)V
.locals 5
2019-12-06 03:29:40 +00:00
.param p1 # Landroid/os/Parcelable;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.param p2 # Ljava/lang/ClassLoader;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
2019-07-24 11:27:29 +00:00
if-eqz p1, :cond_4
check-cast p1, Landroid/os/Bundle;
invoke-virtual {p1, p2}, Landroid/os/Bundle;->setClassLoader(Ljava/lang/ClassLoader;)V
const-string p2, "states"
invoke-virtual {p1, p2}, Landroid/os/Bundle;->getParcelableArray(Ljava/lang/String;)[Landroid/os/Parcelable;
move-result-object p2
iget-object v0, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mSavedState:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V
iget-object v0, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mFragments:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V
const/4 v0, 0x0
if-eqz p2, :cond_0
const/4 v1, 0x0
:goto_0
array-length v2, p2
if-ge v1, v2, :cond_0
iget-object v2, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mSavedState:Ljava/util/ArrayList;
aget-object v3, p2, v1
check-cast v3, Landroidx/fragment/app/Fragment$SavedState;
invoke-virtual {v2, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
add-int/lit8 v1, v1, 0x1
goto :goto_0
:cond_0
invoke-virtual {p1}, Landroid/os/Bundle;->keySet()Ljava/util/Set;
move-result-object p2
invoke-interface {p2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object p2
:cond_1
:goto_1
invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_4
invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/lang/String;
const-string v2, "f"
invoke-virtual {v1, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v2
if-eqz v2, :cond_1
const/4 v2, 0x1
invoke-virtual {v1, v2}, Ljava/lang/String;->substring(I)Ljava/lang/String;
move-result-object v2
invoke-static {v2}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v2
iget-object v3, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mFragmentManager:Landroidx/fragment/app/FragmentManager;
invoke-virtual {v3, p1, v1}, Landroidx/fragment/app/FragmentManager;->getFragment(Landroid/os/Bundle;Ljava/lang/String;)Landroidx/fragment/app/Fragment;
move-result-object v3
if-eqz v3, :cond_3
:goto_2
iget-object v1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mFragments:Ljava/util/ArrayList;
invoke-virtual {v1}, Ljava/util/ArrayList;->size()I
move-result v1
if-gt v1, v2, :cond_2
iget-object v1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mFragments:Ljava/util/ArrayList;
const/4 v4, 0x0
invoke-virtual {v1, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto :goto_2
:cond_2
invoke-virtual {v3, v0}, Landroidx/fragment/app/Fragment;->setMenuVisibility(Z)V
iget-object v1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mFragments:Ljava/util/ArrayList;
invoke-virtual {v1, v2, v3}, Ljava/util/ArrayList;->set(ILjava/lang/Object;)Ljava/lang/Object;
goto :goto_1
:cond_3
2019-12-06 03:29:40 +00:00
new-instance v2, Ljava/lang/StringBuilder;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "Bad fragment at key "
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
2019-07-24 11:27:29 +00:00
move-result-object v1
const-string v2, "FragmentStatePagerAdapt"
invoke-static {v2, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_1
:cond_4
return-void
.end method
.method public saveState()Landroid/os/Parcelable;
.locals 5
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/Nullable;
.end annotation
2019-07-24 11:27:29 +00:00
iget-object v0, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mSavedState:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
move-result v0
if-lez v0, :cond_0
new-instance v0, Landroid/os/Bundle;
invoke-direct {v0}, Landroid/os/Bundle;-><init>()V
iget-object v1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mSavedState:Ljava/util/ArrayList;
invoke-virtual {v1}, Ljava/util/ArrayList;->size()I
move-result v1
new-array v1, v1, [Landroidx/fragment/app/Fragment$SavedState;
iget-object v2, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mSavedState:Ljava/util/ArrayList;
invoke-virtual {v2, v1}, Ljava/util/ArrayList;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
const-string v2, "states"
invoke-virtual {v0, v2, v1}, Landroid/os/Bundle;->putParcelableArray(Ljava/lang/String;[Landroid/os/Parcelable;)V
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
const/4 v1, 0x0
:goto_1
iget-object v2, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mFragments:Ljava/util/ArrayList;
invoke-virtual {v2}, Ljava/util/ArrayList;->size()I
move-result v2
if-ge v1, v2, :cond_3
iget-object v2, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mFragments:Ljava/util/ArrayList;
invoke-virtual {v2, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v2
check-cast v2, Landroidx/fragment/app/Fragment;
if-eqz v2, :cond_2
invoke-virtual {v2}, Landroidx/fragment/app/Fragment;->isAdded()Z
move-result v3
if-eqz v3, :cond_2
if-nez v0, :cond_1
new-instance v0, Landroid/os/Bundle;
invoke-direct {v0}, Landroid/os/Bundle;-><init>()V
:cond_1
2019-12-06 03:29:40 +00:00
const-string v3, "f"
2019-07-24 11:27:29 +00:00
2020-05-11 19:22:21 +00:00
invoke-static {v3, v1}, Lf/e/b/a/a;->a(Ljava/lang/String;I)Ljava/lang/String;
2019-07-24 11:27:29 +00:00
move-result-object v3
iget-object v4, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mFragmentManager:Landroidx/fragment/app/FragmentManager;
invoke-virtual {v4, v0, v3, v2}, Landroidx/fragment/app/FragmentManager;->putFragment(Landroid/os/Bundle;Ljava/lang/String;Landroidx/fragment/app/Fragment;)V
:cond_2
add-int/lit8 v1, v1, 0x1
goto :goto_1
:cond_3
return-object v0
.end method
.method public setPrimaryItem(Landroid/view/ViewGroup;ILjava/lang/Object;)V
2019-10-07 23:23:22 +00:00
.locals 2
2019-12-06 03:29:40 +00:00
.param p1 # Landroid/view/ViewGroup;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p3 # Ljava/lang/Object;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
2019-07-24 11:27:29 +00:00
check-cast p3, Landroidx/fragment/app/Fragment;
iget-object p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mCurrentPrimaryItem:Landroidx/fragment/app/Fragment;
2019-10-07 23:23:22 +00:00
if-eq p3, p1, :cond_5
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
const/4 p2, 0x1
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
if-eqz p1, :cond_2
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
const/4 v0, 0x0
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
invoke-virtual {p1, v0}, Landroidx/fragment/app/Fragment;->setMenuVisibility(Z)V
iget p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mBehavior:I
if-ne p1, p2, :cond_1
iget-object p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mCurTransaction:Landroidx/fragment/app/FragmentTransaction;
if-nez p1, :cond_0
iget-object p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mFragmentManager:Landroidx/fragment/app/FragmentManager;
invoke-virtual {p1}, Landroidx/fragment/app/FragmentManager;->beginTransaction()Landroidx/fragment/app/FragmentTransaction;
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
move-result-object p1
iput-object p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mCurTransaction:Landroidx/fragment/app/FragmentTransaction;
2019-07-24 11:27:29 +00:00
:cond_0
2019-10-07 23:23:22 +00:00
iget-object p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mCurTransaction:Landroidx/fragment/app/FragmentTransaction;
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
iget-object v0, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mCurrentPrimaryItem:Landroidx/fragment/app/Fragment;
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
sget-object v1, Landroidx/lifecycle/Lifecycle$State;->STARTED:Landroidx/lifecycle/Lifecycle$State;
2019-07-24 11:27:29 +00:00
2019-10-07 23:23:22 +00:00
invoke-virtual {p1, v0, v1}, Landroidx/fragment/app/FragmentTransaction;->setMaxLifecycle(Landroidx/fragment/app/Fragment;Landroidx/lifecycle/Lifecycle$State;)Landroidx/fragment/app/FragmentTransaction;
goto :goto_0
2019-07-24 11:27:29 +00:00
:cond_1
2019-10-07 23:23:22 +00:00
iget-object p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mCurrentPrimaryItem:Landroidx/fragment/app/Fragment;
invoke-virtual {p1, v0}, Landroidx/fragment/app/Fragment;->setUserVisibleHint(Z)V
:cond_2
:goto_0
invoke-virtual {p3, p2}, Landroidx/fragment/app/Fragment;->setMenuVisibility(Z)V
iget p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mBehavior:I
if-ne p1, p2, :cond_4
iget-object p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mCurTransaction:Landroidx/fragment/app/FragmentTransaction;
if-nez p1, :cond_3
iget-object p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mFragmentManager:Landroidx/fragment/app/FragmentManager;
invoke-virtual {p1}, Landroidx/fragment/app/FragmentManager;->beginTransaction()Landroidx/fragment/app/FragmentTransaction;
move-result-object p1
iput-object p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mCurTransaction:Landroidx/fragment/app/FragmentTransaction;
:cond_3
iget-object p1, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mCurTransaction:Landroidx/fragment/app/FragmentTransaction;
sget-object p2, Landroidx/lifecycle/Lifecycle$State;->RESUMED:Landroidx/lifecycle/Lifecycle$State;
invoke-virtual {p1, p3, p2}, Landroidx/fragment/app/FragmentTransaction;->setMaxLifecycle(Landroidx/fragment/app/Fragment;Landroidx/lifecycle/Lifecycle$State;)Landroidx/fragment/app/FragmentTransaction;
goto :goto_1
:cond_4
invoke-virtual {p3, p2}, Landroidx/fragment/app/Fragment;->setUserVisibleHint(Z)V
:goto_1
iput-object p3, p0, Landroidx/fragment/app/FragmentStatePagerAdapter;->mCurrentPrimaryItem:Landroidx/fragment/app/Fragment;
:cond_5
2019-07-24 11:27:29 +00:00
return-void
.end method
.method public startUpdate(Landroid/view/ViewGroup;)V
.locals 2
2019-12-06 03:29:40 +00:00
.param p1 # Landroid/view/ViewGroup;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
2019-07-24 11:27:29 +00:00
invoke-virtual {p1}, Landroid/view/ViewGroup;->getId()I
move-result p1
const/4 v0, -0x1
if-eq p1, v0, :cond_0
return-void
:cond_0
new-instance p1, Ljava/lang/IllegalStateException;
new-instance v0, Ljava/lang/StringBuilder;
2019-12-06 03:29:40 +00:00
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
2019-07-24 11:27:29 +00:00
const-string v1, "ViewPager with adapter "
2019-12-06 03:29:40 +00:00
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
2019-07-24 11:27:29 +00:00
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v1, " requires a view id"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.end method