2020-05-17 12:40:10 +00:00
.class public final L androidx/core/app/NavUtils ;
.super L java/lang/Object ;
.source "NavUtils.java"
# static fields
.field public static final PARENT_ACTIVITY : L java/lang/String ; = "android.support.PARENT_ACTIVITY"
.field public static final TAG : L java/lang/String ; = "NavUtils"
# direct methods
.method public constructor <init> ( ) V
.locals 0
invoke-direct { p0 } , L java/lang/Object ;-> <init> ( ) V
return-void
.end method
.method public static getParentActivityIntent ( L android/app/Activity ;) L android/content/Intent ;
.locals 3
. param p0 # Landroid/app/Activity;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
.annotation build L androidx/annotation/Nullable ;
.end annotation
invoke-virtual { p0 } , L android/app/Activity ;-> getParentActivityIntent ( ) L android/content/Intent ;
move-result-object v0
if-eqz v0 , :cond_0
return-object v0
:cond_0
invoke-static { p0 } , L androidx/core/app/NavUtils ;-> getParentActivityName ( L android/app/Activity ;) L java/lang/String ;
move-result-object v0
const/4 v1 , 0x0
if-nez v0 , :cond_1
return-object v1
:cond_1
new-instance v2 , L android/content/ComponentName ;
invoke-direct { v2 , p0 , v0 } , L android/content/ComponentName ;-> <init> ( L android/content/Context ;L java/lang/String ;) V
:try_start_0
invoke-static { p0 , v2 } , L androidx/core/app/NavUtils ;-> getParentActivityName ( L android/content/Context ;L android/content/ComponentName ;) L java/lang/String ;
move-result-object p0
if-nez p0 , :cond_2
invoke-static { v2 } , L android/content/Intent ;-> makeMainActivity ( L android/content/ComponentName ;) L android/content/Intent ;
move-result-object p0
goto :goto_0
:cond_2
new-instance p0 , L android/content/Intent ;
invoke-direct { p0 } , L android/content/Intent ;-> <init> ( ) V
invoke-virtual { p0 , v2 } , L android/content/Intent ;-> setComponent ( L android/content/ComponentName ;) L android/content/Intent ;
move-result-object p0
:try_end_0
.catch L android/content/pm/PackageManager$NameNotFoundException ; { :try_start_0 . . :try_end_0 } :catch_0
:goto_0
return-object p0
:catch_0
new-instance p0 , L java/lang/StringBuilder ;
invoke-direct { p0 } , L java/lang/StringBuilder ;-> <init> ( ) V
const-string v2 , "getParentActivityIntent: bad parentActivityName \'"
invoke-virtual { p0 , v2 } , L java/lang/StringBuilder ;-> append ( L java/lang/String ;) L java/lang/StringBuilder ;
invoke-virtual { p0 , v0 } , L java/lang/StringBuilder ;-> append ( L java/lang/String ;) L java/lang/StringBuilder ;
const-string v0 , "\' in manifest"
invoke-virtual { p0 , v0 } , L java/lang/StringBuilder ;-> append ( L java/lang/String ;) L java/lang/StringBuilder ;
invoke-virtual { p0 } , L java/lang/StringBuilder ;-> toString ( ) L java/lang/String ;
move-result-object p0
const-string v0 , "NavUtils"
invoke-static { v0 , p0 } , L android/util/Log ;-> e ( L java/lang/String ;L java/lang/String ;) I
return-object v1
.end method
.method public static getParentActivityIntent ( L android/content/Context ;L android/content/ComponentName ;) L android/content/Intent ;
.locals 2
. param p0 # Landroid/content/Context;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
. param p1 # Landroid/content/ComponentName;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
.annotation build L androidx/annotation/Nullable ;
.end annotation
.annotation system L dalvik/annotation/Throws ;
value = {
L android/content/pm/PackageManager$NameNotFoundException ;
}
.end annotation
invoke-static { p0 , p1 } , L androidx/core/app/NavUtils ;-> getParentActivityName ( L android/content/Context ;L android/content/ComponentName ;) L java/lang/String ;
move-result-object v0
if-nez v0 , :cond_0
const/4 p0 , 0x0
return-object p0
:cond_0
new-instance v1 , L android/content/ComponentName ;
invoke-virtual { p1 } , L android/content/ComponentName ;-> getPackageName ( ) L java/lang/String ;
move-result-object p1
invoke-direct { v1 , p1 , v0 } , L android/content/ComponentName ;-> <init> ( L java/lang/String ;L java/lang/String ;) V
invoke-static { p0 , v1 } , L androidx/core/app/NavUtils ;-> getParentActivityName ( L android/content/Context ;L android/content/ComponentName ;) L java/lang/String ;
move-result-object p0
if-nez p0 , :cond_1
invoke-static { v1 } , L android/content/Intent ;-> makeMainActivity ( L android/content/ComponentName ;) L android/content/Intent ;
move-result-object p0
goto :goto_0
:cond_1
new-instance p0 , L android/content/Intent ;
invoke-direct { p0 } , L android/content/Intent ;-> <init> ( ) V
invoke-virtual { p0 , v1 } , L android/content/Intent ;-> setComponent ( L android/content/ComponentName ;) L android/content/Intent ;
move-result-object p0
:goto_0
return-object p0
.end method
.method public static getParentActivityIntent ( L android/content/Context ;L java/lang/Class ;) L android/content/Intent ;
.locals 1
. param p0 # Landroid/content/Context;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
. param p1 # Ljava/lang/Class;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
.annotation build L androidx/annotation/Nullable ;
.end annotation
.annotation system L dalvik/annotation/Signature ;
value = {
"(" ,
"Landroid/content/Context;" ,
"Ljava/lang/Class<" ,
"*>;)" ,
"Landroid/content/Intent;"
}
.end annotation
.annotation system L dalvik/annotation/Throws ;
value = {
L android/content/pm/PackageManager$NameNotFoundException ;
}
.end annotation
new-instance v0 , L android/content/ComponentName ;
invoke-direct { v0 , p0 , p1 } , L android/content/ComponentName ;-> <init> ( L android/content/Context ;L java/lang/Class ;) V
invoke-static { p0 , v0 } , L androidx/core/app/NavUtils ;-> getParentActivityName ( L android/content/Context ;L android/content/ComponentName ;) L java/lang/String ;
move-result-object p1
if-nez p1 , :cond_0
const/4 p0 , 0x0
return-object p0
:cond_0
new-instance v0 , L android/content/ComponentName ;
invoke-direct { v0 , p0 , p1 } , L android/content/ComponentName ;-> <init> ( L android/content/Context ;L java/lang/String ;) V
invoke-static { p0 , v0 } , L androidx/core/app/NavUtils ;-> getParentActivityName ( L android/content/Context ;L android/content/ComponentName ;) L java/lang/String ;
move-result-object p0
if-nez p0 , :cond_1
invoke-static { v0 } , L android/content/Intent ;-> makeMainActivity ( L android/content/ComponentName ;) L android/content/Intent ;
move-result-object p0
goto :goto_0
:cond_1
new-instance p0 , L android/content/Intent ;
invoke-direct { p0 } , L android/content/Intent ;-> <init> ( ) V
invoke-virtual { p0 , v0 } , L android/content/Intent ;-> setComponent ( L android/content/ComponentName ;) L android/content/Intent ;
move-result-object p0
:goto_0
return-object p0
.end method
.method public static getParentActivityName ( L android/app/Activity ;) L java/lang/String ;
.locals 1
. param p0 # Landroid/app/Activity;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
.annotation build L androidx/annotation/Nullable ;
.end annotation
:try_start_0
invoke-virtual { p0 } , L android/app/Activity ;-> getComponentName ( ) L android/content/ComponentName ;
move-result-object v0
invoke-static { p0 , v0 } , L androidx/core/app/NavUtils ;-> getParentActivityName ( L android/content/Context ;L android/content/ComponentName ;) L java/lang/String ;
move-result-object p0
:try_end_0
.catch L android/content/pm/PackageManager$NameNotFoundException ; { :try_start_0 . . :try_end_0 } :catch_0
return-object p0
:catch_0
move-exception p0
new-instance v0 , L java/lang/IllegalArgumentException ;
invoke-direct { v0 , p0 } , L java/lang/IllegalArgumentException ;-> <init> ( L java/lang/Throwable ;) V
throw v0
.end method
.method public static getParentActivityName ( L android/content/Context ;L android/content/ComponentName ;) L java/lang/String ;
.locals 5
. param p0 # Landroid/content/Context;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
. param p1 # Landroid/content/ComponentName;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
.annotation build L androidx/annotation/Nullable ;
.end annotation
.annotation system L dalvik/annotation/Throws ;
value = {
L android/content/pm/PackageManager$NameNotFoundException ;
}
.end annotation
invoke-virtual { p0 } , L android/content/Context ;-> getPackageManager ( ) L android/content/pm/PackageManager ;
move-result-object v0
sget v1 , L android/os/Build$VERSION ;-> SDK_INT : I
const/16 v2 , 0x18
const/16 v1 , 0x280
sget v3 , L android/os/Build$VERSION ;-> SDK_INT : I
const/16 v4 , 0x1d
if-lt v3 , v4 , :cond_0
const v1 , 0x100c0280
goto :goto_0
:cond_0
if-lt v3 , v2 , :cond_1
const v1 , 0xc0280
:cond_1
:goto_0
invoke-virtual { v0 , p1 , v1 } , L android/content/pm/PackageManager ;-> getActivityInfo ( L android/content/ComponentName ;I ) L android/content/pm/ActivityInfo ;
move-result-object p1
iget-object v0 , p1 , L android/content/pm/ActivityInfo ;-> parentActivityName : L java/lang/String ;
if-eqz v0 , :cond_2
return-object v0
:cond_2
2020-07-08 16:44:49 +00:00
iget-object p1 , p1 , L android/content/pm/ActivityInfo ;-> metaData : L android/os/Bundle ;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
const/4 v0 , 0x0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-nez p1 , :cond_3
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
return-object v0
2020-05-17 12:40:10 +00:00
:cond_3
2020-07-08 16:44:49 +00:00
const-string v1 , "android.support.PARENT_ACTIVITY"
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-virtual { p1 , v1 } , L android/os/Bundle ;-> getString ( L java/lang/String ;) L java/lang/String ;
2020-05-17 12:40:10 +00:00
move-result-object p1
if-nez p1 , :cond_4
2020-07-08 16:44:49 +00:00
return-object v0
2020-05-17 12:40:10 +00:00
:cond_4
const/4 v0 , 0x0
invoke-virtual { p1 , v0 } , L java/lang/String ;-> charAt ( I ) C
move-result v0
const/16 v1 , 0x2e
if-ne v0 , v1 , :cond_5
new-instance v0 , L java/lang/StringBuilder ;
invoke-direct { v0 } , L java/lang/StringBuilder ;-> <init> ( ) V
invoke-virtual { p0 } , L android/content/Context ;-> getPackageName ( ) L java/lang/String ;
move-result-object p0
invoke-virtual { v0 , p0 } , L java/lang/StringBuilder ;-> append ( L java/lang/String ;) L java/lang/StringBuilder ;
invoke-virtual { v0 , p1 } , L java/lang/StringBuilder ;-> append ( L java/lang/String ;) L java/lang/StringBuilder ;
invoke-virtual { v0 } , L java/lang/StringBuilder ;-> toString ( ) L java/lang/String ;
move-result-object p1
:cond_5
return-object p1
.end method
.method public static navigateUpFromSameTask ( L android/app/Activity ;) V
.locals 2
. param p0 # Landroid/app/Activity;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
invoke-static { p0 } , L androidx/core/app/NavUtils ;-> getParentActivityIntent ( L android/app/Activity ;) L android/content/Intent ;
move-result-object v0
if-eqz v0 , :cond_0
invoke-static { p0 , v0 } , L androidx/core/app/NavUtils ;-> navigateUpTo ( L android/app/Activity ;L android/content/Intent ;) V
return-void
:cond_0
new-instance v0 , L java/lang/IllegalArgumentException ;
const-string v1 , "Activity "
2020-11-02 23:44:01 +00:00
invoke-static { v1 } , L f/e/c/a/a ;-> E ( L java/lang/String ;) L java/lang/StringBuilder ;
2020-05-17 12:40:10 +00:00
move-result-object v1
invoke-virtual { p0 } , L java/lang/Object ;-> getClass ( ) L java/lang/Class ;
move-result-object p0
invoke-virtual { p0 } , L java/lang/Class ;-> getSimpleName ( ) L java/lang/String ;
move-result-object p0
invoke-virtual { v1 , p0 } , L java/lang/StringBuilder ;-> append ( L java/lang/String ;) L java/lang/StringBuilder ;
const-string p0 , " does not have a parent activity name specified. (Did you forget to add the android.support.PARENT_ACTIVITY <meta-data> element in your manifest?)"
invoke-virtual { v1 , p0 } , L java/lang/StringBuilder ;-> append ( L java/lang/String ;) L java/lang/StringBuilder ;
invoke-virtual { v1 } , L java/lang/StringBuilder ;-> toString ( ) L java/lang/String ;
move-result-object p0
invoke-direct { v0 , p0 } , L java/lang/IllegalArgumentException ;-> <init> ( L java/lang/String ;) V
throw v0
.end method
.method public static navigateUpTo ( L android/app/Activity ;L android/content/Intent ;) V
2020-07-08 16:44:49 +00:00
.locals 0
2020-05-17 12:40:10 +00:00
. param p0 # Landroid/app/Activity;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
. param p1 # Landroid/content/Intent;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
invoke-virtual { p0 , p1 } , L android/app/Activity ;-> navigateUpTo ( L android/content/Intent ;) Z
return-void
.end method
.method public static shouldUpRecreateTask ( L android/app/Activity ;L android/content/Intent ;) Z
2020-07-08 16:44:49 +00:00
.locals 0
2020-05-17 12:40:10 +00:00
. param p0 # Landroid/app/Activity;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
. param p1 # Landroid/content/Intent;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
invoke-virtual { p0 , p1 } , L android/app/Activity ;-> shouldUpRecreateTask ( L android/content/Intent ;) Z
move-result p0
return p0
.end method