apkfuckery/com.discord/smali/androidx/lifecycle/ClassesInfoCache$MethodReference.smali

211 lines
5.1 KiB
Smali
Raw Normal View History

2019-12-06 03:29:40 +00:00
.class public Landroidx/lifecycle/ClassesInfoCache$MethodReference;
2019-07-24 11:27:29 +00:00
.super Ljava/lang/Object;
.source "ClassesInfoCache.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/lifecycle/ClassesInfoCache;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
2019-12-06 03:29:40 +00:00
accessFlags = 0x9
2019-07-24 11:27:29 +00:00
name = "MethodReference"
.end annotation
# instance fields
2019-12-06 03:29:40 +00:00
.field public final mCallType:I
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public final mMethod:Ljava/lang/reflect/Method;
2019-07-24 11:27:29 +00:00
# direct methods
2019-12-06 03:29:40 +00:00
.method public constructor <init>(ILjava/lang/reflect/Method;)V
2019-07-24 11:27:29 +00:00
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput p1, p0, Landroidx/lifecycle/ClassesInfoCache$MethodReference;->mCallType:I
iput-object p2, p0, Landroidx/lifecycle/ClassesInfoCache$MethodReference;->mMethod:Ljava/lang/reflect/Method;
iget-object p1, p0, Landroidx/lifecycle/ClassesInfoCache$MethodReference;->mMethod:Ljava/lang/reflect/Method;
const/4 p2, 0x1
invoke-virtual {p1, p2}, Ljava/lang/reflect/Method;->setAccessible(Z)V
return-void
.end method
# virtual methods
.method public equals(Ljava/lang/Object;)Z
.locals 4
const/4 v0, 0x1
if-ne p0, p1, :cond_0
return v0
:cond_0
const/4 v1, 0x0
2019-12-06 03:29:40 +00:00
if-eqz p1, :cond_3
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
const-class v2, Landroidx/lifecycle/ClassesInfoCache$MethodReference;
2019-07-24 11:27:29 +00:00
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v3
if-eq v2, v3, :cond_1
2019-12-06 03:29:40 +00:00
goto :goto_1
2019-07-24 11:27:29 +00:00
:cond_1
check-cast p1, Landroidx/lifecycle/ClassesInfoCache$MethodReference;
iget v2, p0, Landroidx/lifecycle/ClassesInfoCache$MethodReference;->mCallType:I
iget v3, p1, Landroidx/lifecycle/ClassesInfoCache$MethodReference;->mCallType:I
if-ne v2, v3, :cond_2
iget-object v2, p0, Landroidx/lifecycle/ClassesInfoCache$MethodReference;->mMethod:Ljava/lang/reflect/Method;
invoke-virtual {v2}, Ljava/lang/reflect/Method;->getName()Ljava/lang/String;
move-result-object v2
iget-object p1, p1, Landroidx/lifecycle/ClassesInfoCache$MethodReference;->mMethod:Ljava/lang/reflect/Method;
invoke-virtual {p1}, Ljava/lang/reflect/Method;->getName()Ljava/lang/String;
move-result-object p1
invoke-virtual {v2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_2
2019-12-06 03:29:40 +00:00
goto :goto_0
2019-07-24 11:27:29 +00:00
:cond_2
2019-12-06 03:29:40 +00:00
const/4 v0, 0x0
2019-07-24 11:27:29 +00:00
:goto_0
2019-12-06 03:29:40 +00:00
return v0
:cond_3
:goto_1
2019-07-24 11:27:29 +00:00
return v1
.end method
.method public hashCode()I
.locals 2
iget v0, p0, Landroidx/lifecycle/ClassesInfoCache$MethodReference;->mCallType:I
mul-int/lit8 v0, v0, 0x1f
iget-object v1, p0, Landroidx/lifecycle/ClassesInfoCache$MethodReference;->mMethod:Ljava/lang/reflect/Method;
invoke-virtual {v1}, Ljava/lang/reflect/Method;->getName()Ljava/lang/String;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/String;->hashCode()I
move-result v1
2019-12-06 03:29:40 +00:00
add-int/2addr v1, v0
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
return v1
2019-07-24 11:27:29 +00:00
.end method
2019-12-06 03:29:40 +00:00
.method public invokeCallback(Landroidx/lifecycle/LifecycleOwner;Landroidx/lifecycle/Lifecycle$Event;Ljava/lang/Object;)V
2019-07-24 11:27:29 +00:00
.locals 4
:try_start_0
iget v0, p0, Landroidx/lifecycle/ClassesInfoCache$MethodReference;->mCallType:I
const/4 v1, 0x0
if-eqz v0, :cond_2
const/4 v2, 0x1
if-eq v0, v2, :cond_1
const/4 v3, 0x2
if-eq v0, v3, :cond_0
goto :goto_0
:cond_0
iget-object v0, p0, Landroidx/lifecycle/ClassesInfoCache$MethodReference;->mMethod:Ljava/lang/reflect/Method;
new-array v3, v3, [Ljava/lang/Object;
aput-object p1, v3, v1
aput-object p2, v3, v2
invoke-virtual {v0, p3, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
2019-12-06 03:29:40 +00:00
goto :goto_0
2019-07-24 11:27:29 +00:00
:cond_1
iget-object p2, p0, Landroidx/lifecycle/ClassesInfoCache$MethodReference;->mMethod:Ljava/lang/reflect/Method;
new-array v0, v2, [Ljava/lang/Object;
aput-object p1, v0, v1
invoke-virtual {p2, p3, v0}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
2019-12-06 03:29:40 +00:00
goto :goto_0
2019-07-24 11:27:29 +00:00
:cond_2
iget-object p1, p0, Landroidx/lifecycle/ClassesInfoCache$MethodReference;->mMethod:Ljava/lang/reflect/Method;
new-array p2, v1, [Ljava/lang/Object;
invoke-virtual {p1, p3, p2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
:try_end_0
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_1
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_0
2019-12-06 03:29:40 +00:00
:goto_0
2019-07-24 11:27:29 +00:00
return-void
:catch_0
move-exception p1
new-instance p2, Ljava/lang/RuntimeException;
invoke-direct {p2, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw p2
:catch_1
move-exception p1
new-instance p2, Ljava/lang/RuntimeException;
invoke-virtual {p1}, Ljava/lang/reflect/InvocationTargetException;->getCause()Ljava/lang/Throwable;
move-result-object p1
const-string p3, "Failed to call observer method"
invoke-direct {p2, p3, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw p2
.end method