2020-05-17 12:40:10 +00:00
.class public L androidx/activity/ComponentActivity ;
.super L androidx/core/app/ComponentActivity ;
.source "ComponentActivity.java"
# interfaces
.implements L androidx/lifecycle/LifecycleOwner ;
.implements L androidx/lifecycle/ViewModelStoreOwner ;
2020-07-08 16:44:49 +00:00
.implements L androidx/lifecycle/HasDefaultViewModelProviderFactory ;
2020-05-17 12:40:10 +00:00
.implements L androidx/savedstate/SavedStateRegistryOwner ;
.implements L androidx/activity/OnBackPressedDispatcherOwner ;
# annotations
.annotation system L dalvik/annotation/MemberClasses ;
value = {
L androidx/activity/ComponentActivity$NonConfigurationInstances ;
}
.end annotation
# instance fields
.field public mContentLayoutId : I
.annotation build L androidx/annotation/LayoutRes ;
.end annotation
.end field
2020-07-08 16:44:49 +00:00
.field public mDefaultFactory : L androidx/lifecycle/ViewModelProvider$Factory ;
2020-05-17 12:40:10 +00:00
.field public final mLifecycleRegistry : L androidx/lifecycle/LifecycleRegistry ;
.field public final mOnBackPressedDispatcher : L androidx/activity/OnBackPressedDispatcher ;
.field public final mSavedStateRegistryController : L androidx/savedstate/SavedStateRegistryController ;
.field public mViewModelStore : L androidx/lifecycle/ViewModelStore ;
# direct methods
.method public constructor <init> ( ) V
.locals 2
invoke-direct { p0 } , L androidx/core/app/ComponentActivity ;-> <init> ( ) V
new-instance v0 , L androidx/lifecycle/LifecycleRegistry ;
invoke-direct { v0 , p0 } , L androidx/lifecycle/LifecycleRegistry ;-> <init> ( L androidx/lifecycle/LifecycleOwner ;) V
iput-object v0 , p0 , L androidx/activity/ComponentActivity ;-> mLifecycleRegistry : L androidx/lifecycle/LifecycleRegistry ;
invoke-static { p0 } , L androidx/savedstate/SavedStateRegistryController ;-> create ( L androidx/savedstate/SavedStateRegistryOwner ;) L androidx/savedstate/SavedStateRegistryController ;
move-result-object v0
iput-object v0 , p0 , L androidx/activity/ComponentActivity ;-> mSavedStateRegistryController : L androidx/savedstate/SavedStateRegistryController ;
new-instance v0 , L androidx/activity/OnBackPressedDispatcher ;
new-instance v1 , L androidx/activity/ComponentActivity$1 ;
invoke-direct { v1 , p0 } , L androidx/activity/ComponentActivity$1 ;-> <init> ( L androidx/activity/ComponentActivity ;) V
invoke-direct { v0 , v1 } , L androidx/activity/OnBackPressedDispatcher ;-> <init> ( L java/lang/Runnable ;) V
iput-object v0 , p0 , L androidx/activity/ComponentActivity ;-> mOnBackPressedDispatcher : L androidx/activity/OnBackPressedDispatcher ;
invoke-virtual { p0 } , L androidx/activity/ComponentActivity ;-> getLifecycle ( ) L androidx/lifecycle/Lifecycle ;
move-result-object v0
if-eqz v0 , :cond_1
invoke-virtual { p0 } , L androidx/activity/ComponentActivity ;-> getLifecycle ( ) L androidx/lifecycle/Lifecycle ;
move-result-object v0
new-instance v1 , L androidx/activity/ComponentActivity$2 ;
invoke-direct { v1 , p0 } , L androidx/activity/ComponentActivity$2 ;-> <init> ( L androidx/activity/ComponentActivity ;) V
invoke-virtual { v0 , v1 } , L androidx/lifecycle/Lifecycle ;-> addObserver ( L androidx/lifecycle/LifecycleObserver ;) V
invoke-virtual { p0 } , L androidx/activity/ComponentActivity ;-> getLifecycle ( ) L androidx/lifecycle/Lifecycle ;
move-result-object v0
new-instance v1 , L androidx/activity/ComponentActivity$3 ;
invoke-direct { v1 , p0 } , L androidx/activity/ComponentActivity$3 ;-> <init> ( L androidx/activity/ComponentActivity ;) V
invoke-virtual { v0 , v1 } , L androidx/lifecycle/Lifecycle ;-> addObserver ( L androidx/lifecycle/LifecycleObserver ;) V
sget v0 , L android/os/Build$VERSION ;-> SDK_INT : I
const/16 v1 , 0x17
if-gt v0 , v1 , :cond_0
invoke-virtual { p0 } , L androidx/activity/ComponentActivity ;-> getLifecycle ( ) L androidx/lifecycle/Lifecycle ;
move-result-object v0
new-instance v1 , L androidx/activity/ImmLeaksCleaner ;
invoke-direct { v1 , p0 } , L androidx/activity/ImmLeaksCleaner ;-> <init> ( L android/app/Activity ;) V
invoke-virtual { v0 , v1 } , L androidx/lifecycle/Lifecycle ;-> addObserver ( L androidx/lifecycle/LifecycleObserver ;) V
:cond_0
return-void
:cond_1
new-instance v0 , L java/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 } , L java/lang/IllegalStateException ;-> <init> ( L java/lang/String ;) V
throw v0
.end method
.method public constructor <init> ( I ) V
.locals 0
. param p1 # I
.annotation build L androidx/annotation/LayoutRes ;
.end annotation
. end param
.annotation build L androidx/annotation/ContentView ;
.end annotation
invoke-direct { p0 } , L androidx/activity/ComponentActivity ;-> <init> ( ) V
iput p1 , p0 , L androidx/activity/ComponentActivity ;-> mContentLayoutId : I
return-void
.end method
.method public static synthetic access$001 ( L androidx/activity/ComponentActivity ;) V
.locals 0
invoke-super { p0 } , L android/app/Activity ;-> onBackPressed ( ) V
return-void
.end method
# virtual methods
2020-07-08 16:44:49 +00:00
.method public getDefaultViewModelProviderFactory ( ) L androidx/lifecycle/ViewModelProvider$Factory ;
.locals 3
.annotation build L androidx/annotation/NonNull ;
.end annotation
invoke-virtual { p0 } , L android/app/Activity ;-> getApplication ( ) L android/app/Application ;
move-result-object v0
if-eqz v0 , :cond_2
iget-object v0 , p0 , L androidx/activity/ComponentActivity ;-> mDefaultFactory : L androidx/lifecycle/ViewModelProvider$Factory ;
if-nez v0 , :cond_1
new-instance v0 , L androidx/lifecycle/SavedStateViewModelFactory ;
invoke-virtual { p0 } , L android/app/Activity ;-> getApplication ( ) L android/app/Application ;
move-result-object v1
invoke-virtual { p0 } , L android/app/Activity ;-> getIntent ( ) L android/content/Intent ;
move-result-object v2
if-eqz v2 , :cond_0
invoke-virtual { p0 } , L android/app/Activity ;-> getIntent ( ) L android/content/Intent ;
move-result-object v2
invoke-virtual { v2 } , L android/content/Intent ;-> getExtras ( ) L android/os/Bundle ;
move-result-object v2
goto :goto_0
:cond_0
const/4 v2 , 0x0
:goto_0
invoke-direct { v0 , v1 , p0 , v2 } , L androidx/lifecycle/SavedStateViewModelFactory ;-> <init> ( L android/app/Application ;L androidx/savedstate/SavedStateRegistryOwner ;L android/os/Bundle ;) V
iput-object v0 , p0 , L androidx/activity/ComponentActivity ;-> mDefaultFactory : L androidx/lifecycle/ViewModelProvider$Factory ;
:cond_1
iget-object v0 , p0 , L androidx/activity/ComponentActivity ;-> mDefaultFactory : L androidx/lifecycle/ViewModelProvider$Factory ;
return-object v0
:cond_2
new-instance v0 , L java/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 } , L java/lang/IllegalStateException ;-> <init> ( L java/lang/String ;) V
throw v0
.end method
2020-05-17 12:40:10 +00:00
.method public getLastCustomNonConfigurationInstance ( ) L java/lang/Object ;
.locals 1
.annotation build L androidx/annotation/Nullable ;
.end annotation
.annotation runtime L java/lang/Deprecated ;
.end annotation
invoke-virtual { p0 } , L android/app/Activity ;-> getLastNonConfigurationInstance ( ) L java/lang/Object ;
move-result-object v0
check-cast v0 , L androidx/activity/ComponentActivity$NonConfigurationInstances ;
if-eqz v0 , :cond_0
iget-object v0 , v0 , L androidx/activity/ComponentActivity$NonConfigurationInstances ;-> custom : L java/lang/Object ;
goto :goto_0
:cond_0
const/4 v0 , 0x0
:goto_0
return-object v0
.end method
.method public getLifecycle ( ) L androidx/lifecycle/Lifecycle ;
.locals 1
.annotation build L androidx/annotation/NonNull ;
.end annotation
iget-object v0 , p0 , L androidx/activity/ComponentActivity ;-> mLifecycleRegistry : L androidx/lifecycle/LifecycleRegistry ;
return-object v0
.end method
.method public final getOnBackPressedDispatcher ( ) L androidx/activity/OnBackPressedDispatcher ;
.locals 1
.annotation build L androidx/annotation/NonNull ;
.end annotation
iget-object v0 , p0 , L androidx/activity/ComponentActivity ;-> mOnBackPressedDispatcher : L androidx/activity/OnBackPressedDispatcher ;
return-object v0
.end method
.method public final getSavedStateRegistry ( ) L androidx/savedstate/SavedStateRegistry ;
.locals 1
.annotation build L androidx/annotation/NonNull ;
.end annotation
iget-object v0 , p0 , L androidx/activity/ComponentActivity ;-> mSavedStateRegistryController : L androidx/savedstate/SavedStateRegistryController ;
invoke-virtual { v0 } , L androidx/savedstate/SavedStateRegistryController ;-> getSavedStateRegistry ( ) L androidx/savedstate/SavedStateRegistry ;
move-result-object v0
return-object v0
.end method
.method public getViewModelStore ( ) L androidx/lifecycle/ViewModelStore ;
.locals 2
.annotation build L androidx/annotation/NonNull ;
.end annotation
invoke-virtual { p0 } , L android/app/Activity ;-> getApplication ( ) L android/app/Application ;
move-result-object v0
if-eqz v0 , :cond_2
iget-object v0 , p0 , L androidx/activity/ComponentActivity ;-> mViewModelStore : L androidx/lifecycle/ViewModelStore ;
if-nez v0 , :cond_1
invoke-virtual { p0 } , L android/app/Activity ;-> getLastNonConfigurationInstance ( ) L java/lang/Object ;
move-result-object v0
check-cast v0 , L androidx/activity/ComponentActivity$NonConfigurationInstances ;
if-eqz v0 , :cond_0
iget-object v0 , v0 , L androidx/activity/ComponentActivity$NonConfigurationInstances ;-> viewModelStore : L androidx/lifecycle/ViewModelStore ;
iput-object v0 , p0 , L androidx/activity/ComponentActivity ;-> mViewModelStore : L androidx/lifecycle/ViewModelStore ;
:cond_0
iget-object v0 , p0 , L androidx/activity/ComponentActivity ;-> mViewModelStore : L androidx/lifecycle/ViewModelStore ;
if-nez v0 , :cond_1
new-instance v0 , L androidx/lifecycle/ViewModelStore ;
invoke-direct { v0 } , L androidx/lifecycle/ViewModelStore ;-> <init> ( ) V
iput-object v0 , p0 , L androidx/activity/ComponentActivity ;-> mViewModelStore : L androidx/lifecycle/ViewModelStore ;
:cond_1
iget-object v0 , p0 , L androidx/activity/ComponentActivity ;-> mViewModelStore : L androidx/lifecycle/ViewModelStore ;
return-object v0
:cond_2
new-instance v0 , L java/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 } , L java/lang/IllegalStateException ;-> <init> ( L java/lang/String ;) V
throw v0
.end method
.method public onBackPressed ( ) V
.locals 1
.annotation build L androidx/annotation/MainThread ;
.end annotation
iget-object v0 , p0 , L androidx/activity/ComponentActivity ;-> mOnBackPressedDispatcher : L androidx/activity/OnBackPressedDispatcher ;
invoke-virtual { v0 } , L androidx/activity/OnBackPressedDispatcher ;-> onBackPressed ( ) V
return-void
.end method
.method public onCreate ( L android/os/Bundle ;) V
.locals 1
. param p1 # Landroid/os/Bundle;
.annotation build L androidx/annotation/Nullable ;
.end annotation
. end param
invoke-super { p0 , p1 } , L androidx/core/app/ComponentActivity ;-> onCreate ( L android/os/Bundle ;) V
iget-object v0 , p0 , L androidx/activity/ComponentActivity ;-> mSavedStateRegistryController : L androidx/savedstate/SavedStateRegistryController ;
invoke-virtual { v0 , p1 } , L androidx/savedstate/SavedStateRegistryController ;-> performRestore ( L android/os/Bundle ;) V
invoke-static { p0 } , L androidx/lifecycle/ReportFragment ;-> injectIfNeededIn ( L android/app/Activity ;) V
iget p1 , p0 , L androidx/activity/ComponentActivity ;-> mContentLayoutId : I
if-eqz p1 , :cond_0
invoke-virtual { p0 , p1 } , L android/app/Activity ;-> setContentView ( I ) V
:cond_0
return-void
.end method
.method public onRetainCustomNonConfigurationInstance ( ) L java/lang/Object ;
.locals 1
.annotation build L androidx/annotation/Nullable ;
.end annotation
.annotation runtime L java/lang/Deprecated ;
.end annotation
const/4 v0 , 0x0
return-object v0
.end method
.method public final onRetainNonConfigurationInstance ( ) L java/lang/Object ;
.locals 3
.annotation build L androidx/annotation/Nullable ;
.end annotation
invoke-virtual { p0 } , L androidx/activity/ComponentActivity ;-> onRetainCustomNonConfigurationInstance ( ) L java/lang/Object ;
move-result-object v0
iget-object v1 , p0 , L androidx/activity/ComponentActivity ;-> mViewModelStore : L androidx/lifecycle/ViewModelStore ;
if-nez v1 , :cond_0
invoke-virtual { p0 } , L android/app/Activity ;-> getLastNonConfigurationInstance ( ) L java/lang/Object ;
move-result-object v2
check-cast v2 , L androidx/activity/ComponentActivity$NonConfigurationInstances ;
if-eqz v2 , :cond_0
iget-object v1 , v2 , L androidx/activity/ComponentActivity$NonConfigurationInstances ;-> viewModelStore : L androidx/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 , L androidx/activity/ComponentActivity$NonConfigurationInstances ;
invoke-direct { v2 } , L androidx/activity/ComponentActivity$NonConfigurationInstances ;-> <init> ( ) V
iput-object v0 , v2 , L androidx/activity/ComponentActivity$NonConfigurationInstances ;-> custom : L java/lang/Object ;
iput-object v1 , v2 , L androidx/activity/ComponentActivity$NonConfigurationInstances ;-> viewModelStore : L androidx/lifecycle/ViewModelStore ;
return-object v2
.end method
.method public onSaveInstanceState ( L android/os/Bundle ;) V
.locals 2
. param p1 # Landroid/os/Bundle;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
.annotation build L androidx/annotation/CallSuper ;
.end annotation
invoke-virtual { p0 } , L androidx/activity/ComponentActivity ;-> getLifecycle ( ) L androidx/lifecycle/Lifecycle ;
move-result-object v0
instance-of v1 , v0 , L androidx/lifecycle/LifecycleRegistry ;
if-eqz v1 , :cond_0
check-cast v0 , L androidx/lifecycle/LifecycleRegistry ;
sget-object v1 , L androidx/lifecycle/Lifecycle$State ;-> CREATED : L androidx/lifecycle/Lifecycle$State ;
invoke-virtual { v0 , v1 } , L androidx/lifecycle/LifecycleRegistry ;-> setCurrentState ( L androidx/lifecycle/Lifecycle$State ;) V
:cond_0
invoke-super { p0 , p1 } , L androidx/core/app/ComponentActivity ;-> onSaveInstanceState ( L android/os/Bundle ;) V
iget-object v0 , p0 , L androidx/activity/ComponentActivity ;-> mSavedStateRegistryController : L androidx/savedstate/SavedStateRegistryController ;
invoke-virtual { v0 , p1 } , L androidx/savedstate/SavedStateRegistryController ;-> performSave ( L android/os/Bundle ;) V
return-void
.end method