385 lines
12 KiB
Smali
385 lines
12 KiB
Smali
.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;
|
|
.implements Landroidx/activity/OnBackPressedDispatcherOwner;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Landroidx/activity/ComponentActivity$NonConfigurationInstances;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public mContentLayoutId:I
|
|
.annotation build Landroidx/annotation/LayoutRes;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final mLifecycleRegistry:Landroidx/lifecycle/LifecycleRegistry;
|
|
|
|
.field public final mOnBackPressedDispatcher:Landroidx/activity/OnBackPressedDispatcher;
|
|
|
|
.field public final mSavedStateRegistryController:Landroidx/savedstate/SavedStateRegistryController;
|
|
|
|
.field public mViewModelStore:Landroidx/lifecycle/ViewModelStore;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 2
|
|
|
|
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
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
invoke-virtual {p0}, Landroidx/activity/ComponentActivity;->getLifecycle()Landroidx/lifecycle/Lifecycle;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Landroidx/activity/ComponentActivity$2;
|
|
|
|
invoke-direct {v1, p0}, Landroidx/activity/ComponentActivity$2;-><init>(Landroidx/activity/ComponentActivity;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroidx/lifecycle/Lifecycle;->addObserver(Landroidx/lifecycle/LifecycleObserver;)V
|
|
|
|
invoke-virtual {p0}, Landroidx/activity/ComponentActivity;->getLifecycle()Landroidx/lifecycle/Lifecycle;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Landroidx/activity/ComponentActivity$3;
|
|
|
|
invoke-direct {v1, p0}, Landroidx/activity/ComponentActivity$3;-><init>(Landroidx/activity/ComponentActivity;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroidx/lifecycle/Lifecycle;->addObserver(Landroidx/lifecycle/LifecycleObserver;)V
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x17
|
|
|
|
if-gt v0, v1, :cond_0
|
|
|
|
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
|
|
|
|
:cond_0
|
|
return-void
|
|
|
|
:cond_1
|
|
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
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/LayoutRes;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/ContentView;
|
|
.end annotation
|
|
|
|
invoke-direct {p0}, Landroidx/activity/ComponentActivity;-><init>()V
|
|
|
|
iput p1, p0, Landroidx/activity/ComponentActivity;->mContentLayoutId:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic access$001(Landroidx/activity/ComponentActivity;)V
|
|
.locals 0
|
|
|
|
invoke-super {p0}, Landroid/app/Activity;->onBackPressed()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getLastCustomNonConfigurationInstance()Ljava/lang/Object;
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
invoke-virtual {p0}, Landroid/app/Activity;->getLastNonConfigurationInstance()Ljava/lang/Object;
|
|
|
|
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;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getLifecycle()Landroidx/lifecycle/Lifecycle;
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
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
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
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
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
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
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
invoke-virtual {p0}, Landroid/app/Activity;->getApplication()Landroid/app/Application;
|
|
|
|
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
|
|
|
|
invoke-virtual {p0}, Landroid/app/Activity;->getLastNonConfigurationInstance()Ljava/lang/Object;
|
|
|
|
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
|
|
.annotation build Landroidx/annotation/MainThread;
|
|
.end annotation
|
|
|
|
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
|
|
.param p1 # Landroid/os/Bundle;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
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
|
|
|
|
invoke-virtual {p0, p1}, Landroid/app/Activity;->setContentView(I)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public onRetainCustomNonConfigurationInstance()Ljava/lang/Object;
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
.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
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
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
|
|
|
|
invoke-virtual {p0}, Landroid/app/Activity;->getLastNonConfigurationInstance()Ljava/lang/Object;
|
|
|
|
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
|
|
.param p1 # Landroid/os/Bundle;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/CallSuper;
|
|
.end annotation
|
|
|
|
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
|