152 lines
4.5 KiB
Smali
152 lines
4.5 KiB
Smali
.class public Landroidx/lifecycle/ViewModelProviders;
|
|
.super Ljava/lang/Object;
|
|
.source "ViewModelProviders.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Landroidx/lifecycle/ViewModelProviders$DefaultFactory;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static of(Landroidx/fragment/app/Fragment;)Landroidx/lifecycle/ViewModelProvider;
|
|
.locals 1
|
|
.param p0 # Landroidx/fragment/app/Fragment;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/MainThread;
|
|
.end annotation
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
.line 1
|
|
new-instance v0, Landroidx/lifecycle/ViewModelProvider;
|
|
|
|
invoke-direct {v0, p0}, Landroidx/lifecycle/ViewModelProvider;-><init>(Landroidx/lifecycle/ViewModelStoreOwner;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static of(Landroidx/fragment/app/Fragment;Landroidx/lifecycle/ViewModelProvider$Factory;)Landroidx/lifecycle/ViewModelProvider;
|
|
.locals 1
|
|
.param p0 # Landroidx/fragment/app/Fragment;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p1 # Landroidx/lifecycle/ViewModelProvider$Factory;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/MainThread;
|
|
.end annotation
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 3
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getDefaultViewModelProviderFactory()Landroidx/lifecycle/ViewModelProvider$Factory;
|
|
|
|
move-result-object p1
|
|
|
|
.line 4
|
|
:cond_0
|
|
new-instance v0, Landroidx/lifecycle/ViewModelProvider;
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getViewModelStore()Landroidx/lifecycle/ViewModelStore;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0, p1}, Landroidx/lifecycle/ViewModelProvider;-><init>(Landroidx/lifecycle/ViewModelStore;Landroidx/lifecycle/ViewModelProvider$Factory;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static of(Landroidx/fragment/app/FragmentActivity;)Landroidx/lifecycle/ViewModelProvider;
|
|
.locals 1
|
|
.param p0 # Landroidx/fragment/app/FragmentActivity;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/MainThread;
|
|
.end annotation
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
.line 2
|
|
new-instance v0, Landroidx/lifecycle/ViewModelProvider;
|
|
|
|
invoke-direct {v0, p0}, Landroidx/lifecycle/ViewModelProvider;-><init>(Landroidx/lifecycle/ViewModelStoreOwner;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static of(Landroidx/fragment/app/FragmentActivity;Landroidx/lifecycle/ViewModelProvider$Factory;)Landroidx/lifecycle/ViewModelProvider;
|
|
.locals 1
|
|
.param p0 # Landroidx/fragment/app/FragmentActivity;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p1 # Landroidx/lifecycle/ViewModelProvider$Factory;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/MainThread;
|
|
.end annotation
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 5
|
|
invoke-virtual {p0}, Landroidx/activity/ComponentActivity;->getDefaultViewModelProviderFactory()Landroidx/lifecycle/ViewModelProvider$Factory;
|
|
|
|
move-result-object p1
|
|
|
|
.line 6
|
|
:cond_0
|
|
new-instance v0, Landroidx/lifecycle/ViewModelProvider;
|
|
|
|
invoke-virtual {p0}, Landroidx/activity/ComponentActivity;->getViewModelStore()Landroidx/lifecycle/ViewModelStore;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0, p1}, Landroidx/lifecycle/ViewModelProvider;-><init>(Landroidx/lifecycle/ViewModelStore;Landroidx/lifecycle/ViewModelProvider$Factory;)V
|
|
|
|
return-object v0
|
|
.end method
|