apkfuckery/com.discord/smali/androidx/transition/ViewUtilsApi19.smali
2019-07-24 13:27:29 +02:00

259 lines
6.6 KiB
Smali

.class Landroidx/transition/ViewUtilsApi19;
.super Landroidx/transition/ViewUtilsBase;
.source "ViewUtilsApi19.java"
# annotations
.annotation build Landroidx/annotation/RequiresApi;
value = 0x13
.end annotation
# static fields
.field private static final TAG:Ljava/lang/String; = "ViewUtilsApi19"
.field private static sGetTransitionAlphaMethod:Ljava/lang/reflect/Method;
.field private static sGetTransitionAlphaMethodFetched:Z
.field private static sSetTransitionAlphaMethod:Ljava/lang/reflect/Method;
.field private static sSetTransitionAlphaMethodFetched:Z
# direct methods
.method constructor <init>()V
.locals 0
invoke-direct {p0}, Landroidx/transition/ViewUtilsBase;-><init>()V
return-void
.end method
.method private fetchGetTransitionAlphaMethod()V
.locals 4
sget-boolean v0, Landroidx/transition/ViewUtilsApi19;->sGetTransitionAlphaMethodFetched:Z
if-nez v0, :cond_0
const/4 v0, 0x1
:try_start_0
const-class v1, Landroid/view/View;
const-string v2, "getTransitionAlpha"
const/4 v3, 0x0
new-array v3, v3, [Ljava/lang/Class;
invoke-virtual {v1, v2, v3}, Ljava/lang/Class;->getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v1
sput-object v1, Landroidx/transition/ViewUtilsApi19;->sGetTransitionAlphaMethod:Ljava/lang/reflect/Method;
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, "ViewUtilsApi19"
const-string v3, "Failed to retrieve getTransitionAlpha 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/ViewUtilsApi19;->sGetTransitionAlphaMethodFetched:Z
:cond_0
return-void
.end method
.method private fetchSetTransitionAlphaMethod()V
.locals 6
sget-boolean v0, Landroidx/transition/ViewUtilsApi19;->sSetTransitionAlphaMethodFetched:Z
if-nez v0, :cond_0
const/4 v0, 0x1
:try_start_0
const-class v1, Landroid/view/View;
const-string v2, "setTransitionAlpha"
new-array v3, v0, [Ljava/lang/Class;
const/4 v4, 0x0
sget-object v5, Ljava/lang/Float;->TYPE:Ljava/lang/Class;
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
sput-object v1, Landroidx/transition/ViewUtilsApi19;->sSetTransitionAlphaMethod:Ljava/lang/reflect/Method;
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, "ViewUtilsApi19"
const-string v3, "Failed to retrieve setTransitionAlpha 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/ViewUtilsApi19;->sSetTransitionAlphaMethodFetched:Z
:cond_0
return-void
.end method
# virtual methods
.method public clearNonTransitionAlpha(Landroid/view/View;)V
.locals 0
.param p1 # Landroid/view/View;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
return-void
.end method
.method public getTransitionAlpha(Landroid/view/View;)F
.locals 2
.param p1 # Landroid/view/View;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
invoke-direct {p0}, Landroidx/transition/ViewUtilsApi19;->fetchGetTransitionAlphaMethod()V
sget-object v0, Landroidx/transition/ViewUtilsApi19;->sGetTransitionAlphaMethod:Ljava/lang/reflect/Method;
if-eqz v0, :cond_0
const/4 v1, 0x0
:try_start_0
new-array v1, v1, [Ljava/lang/Object;
invoke-virtual {v0, p1, v1}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/Float;
invoke-virtual {v0}, Ljava/lang/Float;->floatValue()F
move-result p1
: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 p1
:catch_0
move-exception p1
new-instance v0, Ljava/lang/RuntimeException;
invoke-virtual {p1}, Ljava/lang/reflect/InvocationTargetException;->getCause()Ljava/lang/Throwable;
move-result-object p1
invoke-direct {v0, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw v0
:catch_1
:cond_0
invoke-super {p0, p1}, Landroidx/transition/ViewUtilsBase;->getTransitionAlpha(Landroid/view/View;)F
move-result p1
return p1
.end method
.method public saveNonTransitionAlpha(Landroid/view/View;)V
.locals 0
.param p1 # Landroid/view/View;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
return-void
.end method
.method public setTransitionAlpha(Landroid/view/View;F)V
.locals 3
.param p1 # Landroid/view/View;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
invoke-direct {p0}, Landroidx/transition/ViewUtilsApi19;->fetchSetTransitionAlphaMethod()V
sget-object v0, Landroidx/transition/ViewUtilsApi19;->sSetTransitionAlphaMethod: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
invoke-static {p2}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;
move-result-object p2
aput-object p2, v1, v2
invoke-virtual {v0, p1, 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
return-void
:catch_0
move-exception p1
new-instance p2, Ljava/lang/RuntimeException;
invoke-virtual {p1}, Ljava/lang/reflect/InvocationTargetException;->getCause()Ljava/lang/Throwable;
move-result-object p1
invoke-direct {p2, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw p2
:catch_1
return-void
:cond_0
invoke-virtual {p1, p2}, Landroid/view/View;->setAlpha(F)V
return-void
.end method