232 lines
6 KiB
Smali
232 lines
6 KiB
Smali
.class Landroidx/core/app/BundleCompat$BundleCompatBaseImpl;
|
|
.super Ljava/lang/Object;
|
|
.source "BundleCompat.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Landroidx/core/app/BundleCompat;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x8
|
|
name = "BundleCompatBaseImpl"
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final TAG:Ljava/lang/String; = "BundleCompatBaseImpl"
|
|
|
|
.field private static sGetIBinderMethod:Ljava/lang/reflect/Method;
|
|
|
|
.field private static sGetIBinderMethodFetched:Z
|
|
|
|
.field private static sPutIBinderMethod:Ljava/lang/reflect/Method;
|
|
|
|
.field private static sPutIBinderMethodFetched:Z
|
|
|
|
|
|
# direct methods
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static getBinder(Landroid/os/Bundle;Ljava/lang/String;)Landroid/os/IBinder;
|
|
.locals 6
|
|
|
|
sget-boolean v0, Landroidx/core/app/BundleCompat$BundleCompatBaseImpl;->sGetIBinderMethodFetched:Z
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
:try_start_0
|
|
const-class v0, Landroid/os/Bundle;
|
|
|
|
const-string v3, "getIBinder"
|
|
|
|
new-array v4, v2, [Ljava/lang/Class;
|
|
|
|
const-class v5, Ljava/lang/String;
|
|
|
|
aput-object v5, v4, v1
|
|
|
|
invoke-virtual {v0, v3, v4}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Landroidx/core/app/BundleCompat$BundleCompatBaseImpl;->sGetIBinderMethod:Ljava/lang/reflect/Method;
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/reflect/Method;->setAccessible(Z)V
|
|
:try_end_0
|
|
.catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
const-string v3, "BundleCompatBaseImpl"
|
|
|
|
const-string v4, "Failed to retrieve getIBinder method"
|
|
|
|
invoke-static {v3, v4, v0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
:goto_0
|
|
sput-boolean v2, Landroidx/core/app/BundleCompat$BundleCompatBaseImpl;->sGetIBinderMethodFetched:Z
|
|
|
|
:cond_0
|
|
sget-object v0, Landroidx/core/app/BundleCompat$BundleCompatBaseImpl;->sGetIBinderMethod:Ljava/lang/reflect/Method;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
:try_start_1
|
|
new-array v2, v2, [Ljava/lang/Object;
|
|
|
|
aput-object p1, v2, v1
|
|
|
|
invoke-virtual {v0, p0, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p0, Landroid/os/IBinder;
|
|
:try_end_1
|
|
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_1 .. :try_end_1} :catch_3
|
|
.catch Ljava/lang/IllegalAccessException; {:try_start_1 .. :try_end_1} :catch_2
|
|
.catch Ljava/lang/IllegalArgumentException; {:try_start_1 .. :try_end_1} :catch_1
|
|
|
|
return-object p0
|
|
|
|
:catch_1
|
|
move-exception p0
|
|
|
|
goto :goto_1
|
|
|
|
:catch_2
|
|
move-exception p0
|
|
|
|
goto :goto_1
|
|
|
|
:catch_3
|
|
move-exception p0
|
|
|
|
:goto_1
|
|
const-string p1, "BundleCompatBaseImpl"
|
|
|
|
const-string v0, "Failed to invoke getIBinder via reflection"
|
|
|
|
invoke-static {p1, v0, p0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
sput-object v3, Landroidx/core/app/BundleCompat$BundleCompatBaseImpl;->sGetIBinderMethod:Ljava/lang/reflect/Method;
|
|
|
|
:cond_1
|
|
return-object v3
|
|
.end method
|
|
|
|
.method public static putBinder(Landroid/os/Bundle;Ljava/lang/String;Landroid/os/IBinder;)V
|
|
.locals 7
|
|
|
|
sget-boolean v0, Landroidx/core/app/BundleCompat$BundleCompatBaseImpl;->sPutIBinderMethodFetched:Z
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x2
|
|
|
|
const/4 v3, 0x1
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
:try_start_0
|
|
const-class v0, Landroid/os/Bundle;
|
|
|
|
const-string v4, "putIBinder"
|
|
|
|
new-array v5, v2, [Ljava/lang/Class;
|
|
|
|
const-class v6, Ljava/lang/String;
|
|
|
|
aput-object v6, v5, v1
|
|
|
|
const-class v6, Landroid/os/IBinder;
|
|
|
|
aput-object v6, v5, v3
|
|
|
|
invoke-virtual {v0, v4, v5}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Landroidx/core/app/BundleCompat$BundleCompatBaseImpl;->sPutIBinderMethod:Ljava/lang/reflect/Method;
|
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/reflect/Method;->setAccessible(Z)V
|
|
:try_end_0
|
|
.catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
const-string v4, "BundleCompatBaseImpl"
|
|
|
|
const-string v5, "Failed to retrieve putIBinder method"
|
|
|
|
invoke-static {v4, v5, v0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
:goto_0
|
|
sput-boolean v3, Landroidx/core/app/BundleCompat$BundleCompatBaseImpl;->sPutIBinderMethodFetched:Z
|
|
|
|
:cond_0
|
|
sget-object v0, Landroidx/core/app/BundleCompat$BundleCompatBaseImpl;->sPutIBinderMethod:Ljava/lang/reflect/Method;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
:try_start_1
|
|
new-array v2, v2, [Ljava/lang/Object;
|
|
|
|
aput-object p1, v2, v1
|
|
|
|
aput-object p2, v2, v3
|
|
|
|
invoke-virtual {v0, p0, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
:try_end_1
|
|
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_1 .. :try_end_1} :catch_3
|
|
.catch Ljava/lang/IllegalAccessException; {:try_start_1 .. :try_end_1} :catch_2
|
|
.catch Ljava/lang/IllegalArgumentException; {:try_start_1 .. :try_end_1} :catch_1
|
|
|
|
return-void
|
|
|
|
:catch_1
|
|
move-exception p0
|
|
|
|
goto :goto_1
|
|
|
|
:catch_2
|
|
move-exception p0
|
|
|
|
goto :goto_1
|
|
|
|
:catch_3
|
|
move-exception p0
|
|
|
|
:goto_1
|
|
const-string p1, "BundleCompatBaseImpl"
|
|
|
|
const-string p2, "Failed to invoke putIBinder via reflection"
|
|
|
|
invoke-static {p1, p2, p0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
const/4 p0, 0x0
|
|
|
|
sput-object p0, Landroidx/core/app/BundleCompat$BundleCompatBaseImpl;->sPutIBinderMethod:Ljava/lang/reflect/Method;
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|