apkfuckery/com.discord/smali/androidx/activity/ComponentActivity.smali

386 lines
12 KiB
Smali
Raw Normal View History

2019-10-07 23:23:22 +00:00
.class public Landroidx/activity/ComponentActivity;
.super Landroidx/core/app/ComponentActivity;
.source "ComponentActivity.java"
# interfaces
.implements Landroidx/lifecycle/LifecycleOwner;
.implements Landroidx/lifecycle/ViewModelStoreOwner;
.implements Landroidx/savedstate/SavedStateRegistryOwner;
2019-12-06 03:29:40 +00:00
.implements Landroidx/activity/OnBackPressedDispatcherOwner;
2019-10-07 23:23:22 +00:00
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/activity/ComponentActivity$NonConfigurationInstances;
}
.end annotation
# instance fields
2019-12-06 03:29:40 +00:00
.field public mContentLayoutId:I
.annotation build Landroidx/annotation/LayoutRes;
.end annotation
.end field
2019-10-07 23:23:22 +00:00
2019-12-06 03:29:40 +00:00
.field public final mLifecycleRegistry:Landroidx/lifecycle/LifecycleRegistry;
2019-10-07 23:23:22 +00:00
2019-12-06 03:29:40 +00:00
.field public final mOnBackPressedDispatcher:Landroidx/activity/OnBackPressedDispatcher;
2019-10-07 23:23:22 +00:00
2019-12-06 03:29:40 +00:00
.field public final mSavedStateRegistryController:Landroidx/savedstate/SavedStateRegistryController;
2019-10-07 23:23:22 +00:00
2019-12-06 03:29:40 +00:00
.field public mViewModelStore:Landroidx/lifecycle/ViewModelStore;
2019-10-07 23:23:22 +00:00
# direct methods
.method public constructor <init>()V
2019-12-06 03:29:40 +00:00
.locals 2
2019-10-07 23:23:22 +00:00
invoke-direct {p0}, Landroidx/core/app/ComponentActivity;-><init>()V
new-instance v0, Landroidx/lifecycle/LifecycleRegistry;
invoke-direct {v0, p0}, Landroidx/lifecycle/LifecycleRegistry;-><init>(Landroidx/lifecycle/LifecycleOwner;)V
iput-object v0, p0, Landroidx/activity/ComponentActivity;->mLifecycleRegistry:Landroidx/lifecycle/LifecycleRegistry;
invoke-static {p0}, Landroidx/savedstate/SavedStateRegistryController;->create(Landroidx/savedstate/SavedStateRegistryOwner;)Landroidx/savedstate/SavedStateRegistryController;
move-result-object v0
iput-object v0, p0, Landroidx/activity/ComponentActivity;->mSavedStateRegistryController:Landroidx/savedstate/SavedStateRegistryController;
new-instance v0, Landroidx/activity/OnBackPressedDispatcher;
new-instance v1, Landroidx/activity/ComponentActivity$1;
invoke-direct {v1, p0}, Landroidx/activity/ComponentActivity$1;-><init>(Landroidx/activity/ComponentActivity;)V
invoke-direct {v0, v1}, Landroidx/activity/OnBackPressedDispatcher;-><init>(Ljava/lang/Runnable;)V
iput-object v0, p0, Landroidx/activity/ComponentActivity;->mOnBackPressedDispatcher:Landroidx/activity/OnBackPressedDispatcher;
invoke-virtual {p0}, Landroidx/activity/ComponentActivity;->getLifecycle()Landroidx/lifecycle/Lifecycle;
move-result-object v0
2019-12-06 03:29:40 +00:00
if-eqz v0, :cond_1
2019-10-07 23:23:22 +00:00
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
invoke-virtual {p0}, Landroidx/activity/ComponentActivity;->getLifecycle()Landroidx/lifecycle/Lifecycle;
move-result-object v0
2019-12-06 03:29:40 +00:00
new-instance v1, Landroidx/activity/ComponentActivity$2;
2019-10-07 23:23:22 +00:00
2019-12-06 03:29:40 +00:00
invoke-direct {v1, p0}, Landroidx/activity/ComponentActivity$2;-><init>(Landroidx/activity/ComponentActivity;)V
2019-10-07 23:23:22 +00:00
2019-12-06 03:29:40 +00:00
invoke-virtual {v0, v1}, Landroidx/lifecycle/Lifecycle;->addObserver(Landroidx/lifecycle/LifecycleObserver;)V
2019-10-07 23:23:22 +00:00
invoke-virtual {p0}, Landroidx/activity/ComponentActivity;->getLifecycle()Landroidx/lifecycle/Lifecycle;
move-result-object v0
2019-12-06 03:29:40 +00:00
new-instance v1, Landroidx/activity/ComponentActivity$3;
2019-10-07 23:23:22 +00:00
2019-12-06 03:29:40 +00:00
invoke-direct {v1, p0}, Landroidx/activity/ComponentActivity$3;-><init>(Landroidx/activity/ComponentActivity;)V
2019-10-07 23:23:22 +00:00
2019-12-06 03:29:40 +00:00
invoke-virtual {v0, v1}, Landroidx/lifecycle/Lifecycle;->addObserver(Landroidx/lifecycle/LifecycleObserver;)V
2019-10-07 23:23:22 +00:00
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x17
2019-12-06 03:29:40 +00:00
if-gt v0, v1, :cond_0
2019-10-07 23:23:22 +00:00
invoke-virtual {p0}, Landroidx/activity/ComponentActivity;->getLifecycle()Landroidx/lifecycle/Lifecycle;
move-result-object v0
new-instance v1, Landroidx/activity/ImmLeaksCleaner;
invoke-direct {v1, p0}, Landroidx/activity/ImmLeaksCleaner;-><init>(Landroid/app/Activity;)V
invoke-virtual {v0, v1}, Landroidx/lifecycle/Lifecycle;->addObserver(Landroidx/lifecycle/LifecycleObserver;)V
2019-12-06 03:29:40 +00:00
:cond_0
2019-10-07 23:23:22 +00:00
return-void
2019-12-06 03:29:40 +00:00
:cond_1
2019-10-07 23:23:22 +00:00
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "getLifecycle() returned null in ComponentActivity\'s constructor. Please make sure you are lazily constructing your Lifecycle in the first call to getLifecycle() rather than relying on field initialization."
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public constructor <init>(I)V
.locals 0
2019-12-06 03:29:40 +00:00
.param p1 # I
.annotation build Landroidx/annotation/LayoutRes;
.end annotation
.end param
.annotation build Landroidx/annotation/ContentView;
.end annotation
2019-10-07 23:23:22 +00:00
invoke-direct {p0}, Landroidx/activity/ComponentActivity;-><init>()V
iput p1, p0, Landroidx/activity/ComponentActivity;->mContentLayoutId:I
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public static synthetic access$001(Landroidx/activity/ComponentActivity;)V
2019-10-07 23:23:22 +00:00
.locals 0
2019-12-06 03:29:40 +00:00
invoke-super {p0}, Landroid/app/Activity;->onBackPressed()V
2019-10-07 23:23:22 +00:00
return-void
.end method
# virtual methods
.method public getLastCustomNonConfigurationInstance()Ljava/lang/Object;
.locals 1
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/Nullable;
.end annotation
2019-10-07 23:23:22 +00:00
.annotation runtime Ljava/lang/Deprecated;
.end annotation
2019-12-06 03:29:40 +00:00
invoke-virtual {p0}, Landroid/app/Activity;->getLastNonConfigurationInstance()Ljava/lang/Object;
2019-10-07 23:23:22 +00:00
move-result-object v0
check-cast v0, Landroidx/activity/ComponentActivity$NonConfigurationInstances;
if-eqz v0, :cond_0
iget-object v0, v0, Landroidx/activity/ComponentActivity$NonConfigurationInstances;->custom:Ljava/lang/Object;
2019-12-06 03:29:40 +00:00
goto :goto_0
2019-10-07 23:23:22 +00:00
:cond_0
const/4 v0, 0x0
2019-12-06 03:29:40 +00:00
:goto_0
2019-10-07 23:23:22 +00:00
return-object v0
.end method
.method public getLifecycle()Landroidx/lifecycle/Lifecycle;
.locals 1
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/NonNull;
.end annotation
2019-10-07 23:23:22 +00:00
iget-object v0, p0, Landroidx/activity/ComponentActivity;->mLifecycleRegistry:Landroidx/lifecycle/LifecycleRegistry;
return-object v0
.end method
.method public final getOnBackPressedDispatcher()Landroidx/activity/OnBackPressedDispatcher;
.locals 1
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/NonNull;
.end annotation
2019-10-07 23:23:22 +00:00
iget-object v0, p0, Landroidx/activity/ComponentActivity;->mOnBackPressedDispatcher:Landroidx/activity/OnBackPressedDispatcher;
return-object v0
.end method
.method public final getSavedStateRegistry()Landroidx/savedstate/SavedStateRegistry;
.locals 1
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/NonNull;
.end annotation
2019-10-07 23:23:22 +00:00
iget-object v0, p0, Landroidx/activity/ComponentActivity;->mSavedStateRegistryController:Landroidx/savedstate/SavedStateRegistryController;
invoke-virtual {v0}, Landroidx/savedstate/SavedStateRegistryController;->getSavedStateRegistry()Landroidx/savedstate/SavedStateRegistry;
move-result-object v0
return-object v0
.end method
.method public getViewModelStore()Landroidx/lifecycle/ViewModelStore;
.locals 2
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/NonNull;
.end annotation
2019-10-07 23:23:22 +00:00
2019-12-06 03:29:40 +00:00
invoke-virtual {p0}, Landroid/app/Activity;->getApplication()Landroid/app/Application;
2019-10-07 23:23:22 +00:00
move-result-object v0
if-eqz v0, :cond_2
iget-object v0, p0, Landroidx/activity/ComponentActivity;->mViewModelStore:Landroidx/lifecycle/ViewModelStore;
if-nez v0, :cond_1
2019-12-06 03:29:40 +00:00
invoke-virtual {p0}, Landroid/app/Activity;->getLastNonConfigurationInstance()Ljava/lang/Object;
2019-10-07 23:23:22 +00:00
move-result-object v0
check-cast v0, Landroidx/activity/ComponentActivity$NonConfigurationInstances;
if-eqz v0, :cond_0
iget-object v0, v0, Landroidx/activity/ComponentActivity$NonConfigurationInstances;->viewModelStore:Landroidx/lifecycle/ViewModelStore;
iput-object v0, p0, Landroidx/activity/ComponentActivity;->mViewModelStore:Landroidx/lifecycle/ViewModelStore;
:cond_0
iget-object v0, p0, Landroidx/activity/ComponentActivity;->mViewModelStore:Landroidx/lifecycle/ViewModelStore;
if-nez v0, :cond_1
new-instance v0, Landroidx/lifecycle/ViewModelStore;
invoke-direct {v0}, Landroidx/lifecycle/ViewModelStore;-><init>()V
iput-object v0, p0, Landroidx/activity/ComponentActivity;->mViewModelStore:Landroidx/lifecycle/ViewModelStore;
:cond_1
iget-object v0, p0, Landroidx/activity/ComponentActivity;->mViewModelStore:Landroidx/lifecycle/ViewModelStore;
return-object v0
:cond_2
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "Your activity is not yet attached to the Application instance. You can\'t request ViewModel before onCreate call."
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public onBackPressed()V
.locals 1
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/MainThread;
.end annotation
2019-10-07 23:23:22 +00:00
iget-object v0, p0, Landroidx/activity/ComponentActivity;->mOnBackPressedDispatcher:Landroidx/activity/OnBackPressedDispatcher;
invoke-virtual {v0}, Landroidx/activity/OnBackPressedDispatcher;->onBackPressed()V
return-void
.end method
.method public onCreate(Landroid/os/Bundle;)V
.locals 1
2019-12-06 03:29:40 +00:00
.param p1 # Landroid/os/Bundle;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
2019-10-07 23:23:22 +00:00
invoke-super {p0, p1}, Landroidx/core/app/ComponentActivity;->onCreate(Landroid/os/Bundle;)V
iget-object v0, p0, Landroidx/activity/ComponentActivity;->mSavedStateRegistryController:Landroidx/savedstate/SavedStateRegistryController;
invoke-virtual {v0, p1}, Landroidx/savedstate/SavedStateRegistryController;->performRestore(Landroid/os/Bundle;)V
invoke-static {p0}, Landroidx/lifecycle/ReportFragment;->injectIfNeededIn(Landroid/app/Activity;)V
iget p1, p0, Landroidx/activity/ComponentActivity;->mContentLayoutId:I
if-eqz p1, :cond_0
2019-12-06 03:29:40 +00:00
invoke-virtual {p0, p1}, Landroid/app/Activity;->setContentView(I)V
2019-10-07 23:23:22 +00:00
:cond_0
return-void
.end method
.method public onRetainCustomNonConfigurationInstance()Ljava/lang/Object;
.locals 1
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/Nullable;
.end annotation
2019-10-07 23:23:22 +00:00
.annotation runtime Ljava/lang/Deprecated;
.end annotation
const/4 v0, 0x0
return-object v0
.end method
.method public final onRetainNonConfigurationInstance()Ljava/lang/Object;
.locals 3
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/Nullable;
.end annotation
2019-10-07 23:23:22 +00:00
invoke-virtual {p0}, Landroidx/activity/ComponentActivity;->onRetainCustomNonConfigurationInstance()Ljava/lang/Object;
move-result-object v0
iget-object v1, p0, Landroidx/activity/ComponentActivity;->mViewModelStore:Landroidx/lifecycle/ViewModelStore;
if-nez v1, :cond_0
2019-12-06 03:29:40 +00:00
invoke-virtual {p0}, Landroid/app/Activity;->getLastNonConfigurationInstance()Ljava/lang/Object;
2019-10-07 23:23:22 +00:00
move-result-object v2
check-cast v2, Landroidx/activity/ComponentActivity$NonConfigurationInstances;
if-eqz v2, :cond_0
iget-object v1, v2, Landroidx/activity/ComponentActivity$NonConfigurationInstances;->viewModelStore:Landroidx/lifecycle/ViewModelStore;
:cond_0
if-nez v1, :cond_1
if-nez v0, :cond_1
const/4 v0, 0x0
return-object v0
:cond_1
new-instance v2, Landroidx/activity/ComponentActivity$NonConfigurationInstances;
invoke-direct {v2}, Landroidx/activity/ComponentActivity$NonConfigurationInstances;-><init>()V
iput-object v0, v2, Landroidx/activity/ComponentActivity$NonConfigurationInstances;->custom:Ljava/lang/Object;
iput-object v1, v2, Landroidx/activity/ComponentActivity$NonConfigurationInstances;->viewModelStore:Landroidx/lifecycle/ViewModelStore;
return-object v2
.end method
.method public onSaveInstanceState(Landroid/os/Bundle;)V
.locals 2
2019-12-06 03:29:40 +00:00
.param p1 # Landroid/os/Bundle;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Landroidx/annotation/CallSuper;
.end annotation
2019-10-07 23:23:22 +00:00
invoke-virtual {p0}, Landroidx/activity/ComponentActivity;->getLifecycle()Landroidx/lifecycle/Lifecycle;
move-result-object v0
instance-of v1, v0, Landroidx/lifecycle/LifecycleRegistry;
if-eqz v1, :cond_0
check-cast v0, Landroidx/lifecycle/LifecycleRegistry;
sget-object v1, Landroidx/lifecycle/Lifecycle$State;->CREATED:Landroidx/lifecycle/Lifecycle$State;
invoke-virtual {v0, v1}, Landroidx/lifecycle/LifecycleRegistry;->setCurrentState(Landroidx/lifecycle/Lifecycle$State;)V
:cond_0
invoke-super {p0, p1}, Landroidx/core/app/ComponentActivity;->onSaveInstanceState(Landroid/os/Bundle;)V
iget-object v0, p0, Landroidx/activity/ComponentActivity;->mSavedStateRegistryController:Landroidx/savedstate/SavedStateRegistryController;
invoke-virtual {v0, p1}, Landroidx/savedstate/SavedStateRegistryController;->performSave(Landroid/os/Bundle;)V
return-void
.end method