apkfuckery/com.discord/smali/androidx/transition/ImageViewUtils.smali
2019-12-06 04:29:40 +01:00

138 lines
3.5 KiB
Smali

.class public Landroidx/transition/ImageViewUtils;
.super Ljava/lang/Object;
.source "ImageViewUtils.java"
# static fields
.field public static final TAG:Ljava/lang/String; = "ImageViewUtils"
.field public static sAnimateTransformMethod:Ljava/lang/reflect/Method;
.field public static sAnimateTransformMethodFetched:Z
# direct methods
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static animateTransform(Landroid/widget/ImageView;Landroid/graphics/Matrix;)V
.locals 3
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
invoke-static {}, Landroidx/transition/ImageViewUtils;->fetchAnimateTransformMethod()V
sget-object v0, Landroidx/transition/ImageViewUtils;->sAnimateTransformMethod:Ljava/lang/reflect/Method;
if-eqz v0, :cond_0
const/4 v1, 0x1
:try_start_0
new-array v1, v1, [Ljava/lang/Object;
const/4 v2, 0x0
aput-object p1, v1, v2
invoke-virtual {v0, p0, v1}, 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
goto :goto_0
: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
:goto_0
return-void
.end method
.method public static fetchAnimateTransformMethod()V
.locals 5
sget-boolean v0, Landroidx/transition/ImageViewUtils;->sAnimateTransformMethodFetched:Z
if-nez v0, :cond_0
const/4 v0, 0x1
:try_start_0
const-class v1, Landroid/widget/ImageView;
new-array v2, v0, [Ljava/lang/Class;
const/4 v3, 0x0
const-class v4, Landroid/graphics/Matrix;
aput-object v4, v2, v3
:try_end_0
.catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_0
const-string v3, "animateTransform"
:try_start_1
invoke-virtual {v1, v3, v2}, Ljava/lang/Class;->getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v1
sput-object v1, Landroidx/transition/ImageViewUtils;->sAnimateTransformMethod:Ljava/lang/reflect/Method;
sget-object v1, Landroidx/transition/ImageViewUtils;->sAnimateTransformMethod:Ljava/lang/reflect/Method;
invoke-virtual {v1, v0}, Ljava/lang/reflect/Method;->setAccessible(Z)V
:try_end_1
.catch Ljava/lang/NoSuchMethodException; {:try_start_1 .. :try_end_1} :catch_0
goto :goto_0
:catch_0
move-exception v1
const-string v2, "ImageViewUtils"
const-string v3, "Failed to retrieve animateTransform method"
invoke-static {v2, v3, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
:goto_0
sput-boolean v0, Landroidx/transition/ImageViewUtils;->sAnimateTransformMethodFetched:Z
:cond_0
return-void
.end method
.method public static reserveEndAnimateTransform(Landroid/widget/ImageView;Landroid/animation/Animator;)V
.locals 0
sget p0, Landroid/os/Build$VERSION;->SDK_INT:I
return-void
.end method
.method public static startAnimateTransform(Landroid/widget/ImageView;)V
.locals 0
sget p0, Landroid/os/Build$VERSION;->SDK_INT:I
return-void
.end method