apkfuckery/com.discord/smali/androidx/transition/GhostViewPlatform.smali

339 lines
8.5 KiB
Smali
Raw Normal View History

2020-01-07 02:40:43 +00:00
.class public Landroidx/transition/GhostViewPlatform;
2019-07-24 11:27:29 +00:00
.super Ljava/lang/Object;
2020-01-07 02:40:43 +00:00
.source "GhostViewPlatform.java"
2019-07-24 11:27:29 +00:00
# interfaces
2020-01-07 02:40:43 +00:00
.implements Landroidx/transition/GhostView;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
# annotations
.annotation build Landroidx/annotation/RequiresApi;
value = 0x15
.end annotation
2019-07-24 11:27:29 +00:00
# static fields
2019-12-06 03:29:40 +00:00
.field public static final TAG:Ljava/lang/String; = "GhostViewApi21"
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public static sAddGhostMethod:Ljava/lang/reflect/Method;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public static sAddGhostMethodFetched:Z
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public static sGhostViewClass:Ljava/lang/Class;
2019-07-24 11:27:29 +00:00
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Class<",
"*>;"
}
.end annotation
.end field
2019-12-06 03:29:40 +00:00
.field public static sGhostViewClassFetched:Z
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public static sRemoveGhostMethod:Ljava/lang/reflect/Method;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public static sRemoveGhostMethodFetched:Z
2019-07-24 11:27:29 +00:00
# instance fields
2019-12-06 03:29:40 +00:00
.field public final mGhostView:Landroid/view/View;
2019-07-24 11:27:29 +00:00
# direct methods
2019-12-06 03:29:40 +00:00
.method public constructor <init>(Landroid/view/View;)V
2019-07-24 11:27:29 +00:00
.locals 0
2019-12-06 03:29:40 +00:00
.param p1 # Landroid/view/View;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
2019-07-24 11:27:29 +00:00
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
2020-01-07 02:40:43 +00:00
iput-object p1, p0, Landroidx/transition/GhostViewPlatform;->mGhostView:Landroid/view/View;
2019-07-24 11:27:29 +00:00
return-void
.end method
2020-01-07 02:40:43 +00:00
.method public static addGhost(Landroid/view/View;Landroid/view/ViewGroup;Landroid/graphics/Matrix;)Landroidx/transition/GhostView;
2019-07-24 11:27:29 +00:00
.locals 5
2020-01-07 02:40:43 +00:00
invoke-static {}, Landroidx/transition/GhostViewPlatform;->fetchAddGhostMethod()V
2019-07-24 11:27:29 +00:00
2020-01-07 02:40:43 +00:00
sget-object v0, Landroidx/transition/GhostViewPlatform;->sAddGhostMethod:Ljava/lang/reflect/Method;
2019-07-24 11:27:29 +00:00
const/4 v1, 0x0
if-eqz v0, :cond_0
:try_start_0
2020-01-07 02:40:43 +00:00
new-instance v2, Landroidx/transition/GhostViewPlatform;
2019-07-24 11:27:29 +00:00
const/4 v3, 0x3
new-array v3, v3, [Ljava/lang/Object;
const/4 v4, 0x0
aput-object p0, v3, v4
const/4 p0, 0x1
aput-object p1, v3, p0
const/4 p0, 0x2
aput-object p2, v3, p0
invoke-virtual {v0, v1, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p0
check-cast p0, Landroid/view/View;
2020-01-07 02:40:43 +00:00
invoke-direct {v2, p0}, Landroidx/transition/GhostViewPlatform;-><init>(Landroid/view/View;)V
2019-07-24 11:27:29 +00:00
:try_end_0
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_1
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_0
return-object v2
:catch_0
move-exception p0
new-instance p1, Ljava/lang/RuntimeException;
invoke-virtual {p0}, Ljava/lang/reflect/InvocationTargetException;->getCause()Ljava/lang/Throwable;
move-result-object p0
invoke-direct {p1, p0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw p1
:catch_1
:cond_0
return-object v1
.end method
2019-12-06 03:29:40 +00:00
.method public static fetchAddGhostMethod()V
2019-07-24 11:27:29 +00:00
.locals 6
2020-01-07 02:40:43 +00:00
sget-boolean v0, Landroidx/transition/GhostViewPlatform;->sAddGhostMethodFetched:Z
2019-07-24 11:27:29 +00:00
if-nez v0, :cond_0
const/4 v0, 0x1
:try_start_0
2020-01-07 02:40:43 +00:00
invoke-static {}, Landroidx/transition/GhostViewPlatform;->fetchGhostViewClass()V
2019-07-24 11:27:29 +00:00
2020-01-07 02:40:43 +00:00
sget-object v1, Landroidx/transition/GhostViewPlatform;->sGhostViewClass:Ljava/lang/Class;
2019-07-24 11:27:29 +00:00
const-string v2, "addGhost"
const/4 v3, 0x3
new-array v3, v3, [Ljava/lang/Class;
const/4 v4, 0x0
const-class v5, Landroid/view/View;
aput-object v5, v3, v4
const-class v4, Landroid/view/ViewGroup;
aput-object v4, v3, v0
const/4 v4, 0x2
const-class v5, Landroid/graphics/Matrix;
aput-object v5, v3, v4
invoke-virtual {v1, v2, v3}, Ljava/lang/Class;->getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v1
2020-01-07 02:40:43 +00:00
sput-object v1, Landroidx/transition/GhostViewPlatform;->sAddGhostMethod:Ljava/lang/reflect/Method;
2019-07-24 11:27:29 +00:00
2020-01-07 02:40:43 +00:00
sget-object v1, Landroidx/transition/GhostViewPlatform;->sAddGhostMethod:Ljava/lang/reflect/Method;
2019-12-06 03:29:40 +00:00
2019-07-24 11:27:29 +00:00
invoke-virtual {v1, v0}, 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 v1
const-string v2, "GhostViewApi21"
const-string v3, "Failed to retrieve addGhost method"
invoke-static {v2, v3, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
:goto_0
2020-01-07 02:40:43 +00:00
sput-boolean v0, Landroidx/transition/GhostViewPlatform;->sAddGhostMethodFetched:Z
2019-07-24 11:27:29 +00:00
:cond_0
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public static fetchGhostViewClass()V
2019-07-24 11:27:29 +00:00
.locals 3
2020-01-07 02:40:43 +00:00
sget-boolean v0, Landroidx/transition/GhostViewPlatform;->sGhostViewClassFetched:Z
2019-07-24 11:27:29 +00:00
if-nez v0, :cond_0
const-string v0, "android.view.GhostView"
2019-12-06 03:29:40 +00:00
:try_start_0
2019-07-24 11:27:29 +00:00
invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
move-result-object v0
2020-01-07 02:40:43 +00:00
sput-object v0, Landroidx/transition/GhostViewPlatform;->sGhostViewClass:Ljava/lang/Class;
2019-07-24 11:27:29 +00:00
:try_end_0
.catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception v0
const-string v1, "GhostViewApi21"
const-string v2, "Failed to retrieve GhostView class"
invoke-static {v1, v2, v0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
:goto_0
const/4 v0, 0x1
2020-01-07 02:40:43 +00:00
sput-boolean v0, Landroidx/transition/GhostViewPlatform;->sGhostViewClassFetched:Z
2019-07-24 11:27:29 +00:00
:cond_0
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public static fetchRemoveGhostMethod()V
2019-07-24 11:27:29 +00:00
.locals 6
2020-01-07 02:40:43 +00:00
sget-boolean v0, Landroidx/transition/GhostViewPlatform;->sRemoveGhostMethodFetched:Z
2019-07-24 11:27:29 +00:00
if-nez v0, :cond_0
const/4 v0, 0x1
:try_start_0
2020-01-07 02:40:43 +00:00
invoke-static {}, Landroidx/transition/GhostViewPlatform;->fetchGhostViewClass()V
2019-07-24 11:27:29 +00:00
2020-01-07 02:40:43 +00:00
sget-object v1, Landroidx/transition/GhostViewPlatform;->sGhostViewClass:Ljava/lang/Class;
2019-07-24 11:27:29 +00:00
const-string v2, "removeGhost"
new-array v3, v0, [Ljava/lang/Class;
const/4 v4, 0x0
const-class v5, Landroid/view/View;
aput-object v5, v3, v4
invoke-virtual {v1, v2, v3}, Ljava/lang/Class;->getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v1
2020-01-07 02:40:43 +00:00
sput-object v1, Landroidx/transition/GhostViewPlatform;->sRemoveGhostMethod:Ljava/lang/reflect/Method;
2019-07-24 11:27:29 +00:00
2020-01-07 02:40:43 +00:00
sget-object v1, Landroidx/transition/GhostViewPlatform;->sRemoveGhostMethod:Ljava/lang/reflect/Method;
2019-12-06 03:29:40 +00:00
2019-07-24 11:27:29 +00:00
invoke-virtual {v1, v0}, 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 v1
const-string v2, "GhostViewApi21"
const-string v3, "Failed to retrieve removeGhost method"
invoke-static {v2, v3, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
:goto_0
2020-01-07 02:40:43 +00:00
sput-boolean v0, Landroidx/transition/GhostViewPlatform;->sRemoveGhostMethodFetched:Z
2019-07-24 11:27:29 +00:00
:cond_0
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public static removeGhost(Landroid/view/View;)V
2019-07-24 11:27:29 +00:00
.locals 4
2020-01-07 02:40:43 +00:00
invoke-static {}, Landroidx/transition/GhostViewPlatform;->fetchRemoveGhostMethod()V
2019-07-24 11:27:29 +00:00
2020-01-07 02:40:43 +00:00
sget-object v0, Landroidx/transition/GhostViewPlatform;->sRemoveGhostMethod:Ljava/lang/reflect/Method;
2019-07-24 11:27:29 +00:00
if-eqz v0, :cond_0
const/4 v1, 0x0
const/4 v2, 0x1
:try_start_0
new-array v2, v2, [Ljava/lang/Object;
const/4 v3, 0x0
aput-object p0, v2, v3
invoke-virtual {v0, v1, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
:try_end_0
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_1
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_0
2019-12-06 03:29:40 +00:00
goto :goto_0
2019-07-24 11:27:29 +00:00
:catch_0
move-exception p0
new-instance v0, Ljava/lang/RuntimeException;
invoke-virtual {p0}, Ljava/lang/reflect/InvocationTargetException;->getCause()Ljava/lang/Throwable;
move-result-object p0
invoke-direct {v0, p0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw v0
:catch_1
:cond_0
2019-12-06 03:29:40 +00:00
:goto_0
2019-07-24 11:27:29 +00:00
return-void
.end method
# virtual methods
.method public reserveEndViewTransition(Landroid/view/ViewGroup;Landroid/view/View;)V
.locals 0
return-void
.end method
.method public setVisibility(I)V
.locals 1
2020-01-07 02:40:43 +00:00
iget-object v0, p0, Landroidx/transition/GhostViewPlatform;->mGhostView:Landroid/view/View;
2019-07-24 11:27:29 +00:00
invoke-virtual {v0, p1}, Landroid/view/View;->setVisibility(I)V
return-void
.end method