ViewUtilsApi19.smali
.class Landroidx/transition/ViewUtilsApi19;
.super Landroidx/transition/ViewUtilsBase;
.source "ViewUtilsApi19.java"
# 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 static constructor <clinit>()V
.registers 1
return-void
.end method
.method constructor <init>()V
.registers 1
.line 29
invoke-direct {p0}, Landroidx/transition/ViewUtilsBase;-><init>()V
return-void
.end method
.method private fetchGetTransitionAlphaMethod()V
.registers 5
.line 93
sget-boolean v0, Landroidx/transition/ViewUtilsApi19;->sGetTransitionAlphaMethodFetched:Z
if-nez v0, :cond_20
.line 95
const/4 v0, 0x1
:try_start_5
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;
.line 96
invoke-virtual {v1, v0}, Ljava/lang/reflect/Method;->setAccessible(Z)V
:try_end_15
.catch Ljava/lang/NoSuchMethodException; {:try_start_5 .. :try_end_15} :catch_16
.line 99
goto :goto_1e
.line 97
:catch_16
move-exception v1
.line 98
.local v1, "e":Ljava/lang/NoSuchMethodException;
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
.line 100
.end local v1 # "e":Ljava/lang/NoSuchMethodException;
:goto_1e
sput-boolean v0, Landroidx/transition/ViewUtilsApi19;->sGetTransitionAlphaMethodFetched:Z
.line 102
:cond_20
return-void
.end method
.method private fetchSetTransitionAlphaMethod()V
.registers 7
.line 80
sget-boolean v0, Landroidx/transition/ViewUtilsApi19;->sSetTransitionAlphaMethodFetched:Z
if-nez v0, :cond_25
.line 82
const/4 v0, 0x1
:try_start_5
const-class v1, Landroid/view/View;
const-string/jumbo 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;
.line 84
invoke-virtual {v1, v0}, Ljava/lang/reflect/Method;->setAccessible(Z)V
:try_end_1a
.catch Ljava/lang/NoSuchMethodException; {:try_start_5 .. :try_end_1a} :catch_1b
.line 87
goto :goto_23
.line 85
:catch_1b
move-exception v1
.line 86
.local v1, "e":Ljava/lang/NoSuchMethodException;
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
.line 88
.end local v1 # "e":Ljava/lang/NoSuchMethodException;
:goto_23
sput-boolean v0, Landroidx/transition/ViewUtilsApi19;->sSetTransitionAlphaMethodFetched:Z
.line 90
:cond_25
return-void
.end method
# virtual methods
.method public clearNonTransitionAlpha(Landroid/view/View;)V
.registers 2
.param p1, "view" # Landroid/view/View;
.line 77
return-void
.end method
.method public getTransitionAlpha(Landroid/view/View;)F
.registers 5
.param p1, "view" # Landroid/view/View;
.line 56
invoke-direct {p0}, Landroidx/transition/ViewUtilsApi19;->fetchGetTransitionAlphaMethod()V
.line 57
sget-object v0, Landroidx/transition/ViewUtilsApi19;->sGetTransitionAlphaMethod:Ljava/lang/reflect/Method;
if-eqz v0, :cond_21
.line 59
const/4 v1, 0x0
:try_start_8
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 v0
:try_end_14
.catch Ljava/lang/IllegalAccessException; {:try_start_8 .. :try_end_14} :catch_20
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_8 .. :try_end_14} :catch_15
return v0
.line 62
:catch_15
move-exception v0
.line 63
.local v0, "e":Ljava/lang/reflect/InvocationTargetException;
new-instance v1, Ljava/lang/RuntimeException;
invoke-virtual {v0}, Ljava/lang/reflect/InvocationTargetException;->getCause()Ljava/lang/Throwable;
move-result-object v2
invoke-direct {v1, v2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw v1
.line 60
.end local v0 # "e":Ljava/lang/reflect/InvocationTargetException;
:catch_20
move-exception v0
.line 66
:cond_21
invoke-super {p0, p1}, Landroidx/transition/ViewUtilsBase;->getTransitionAlpha(Landroid/view/View;)F
move-result v0
return v0
.end method
.method public saveNonTransitionAlpha(Landroid/view/View;)V
.registers 2
.param p1, "view" # Landroid/view/View;
.line 72
return-void
.end method
.method public setTransitionAlpha(Landroid/view/View;F)V
.registers 7
.param p1, "view" # Landroid/view/View;
.param p2, "alpha" # F
.line 40
invoke-direct {p0}, Landroidx/transition/ViewUtilsApi19;->fetchSetTransitionAlphaMethod()V
.line 41
sget-object v0, Landroidx/transition/ViewUtilsApi19;->sSetTransitionAlphaMethod:Ljava/lang/reflect/Method;
if-eqz v0, :cond_22
.line 43
const/4 v1, 0x1
:try_start_8
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 v3
aput-object v3, v1, v2
invoke-virtual {v0, p1, v1}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
:try_end_14
.catch Ljava/lang/IllegalAccessException; {:try_start_8 .. :try_end_14} :catch_20
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_8 .. :try_end_14} :catch_15
goto :goto_21
.line 46
:catch_15
move-exception v0
.line 47
.local v0, "e":Ljava/lang/reflect/InvocationTargetException;
new-instance v1, Ljava/lang/RuntimeException;
invoke-virtual {v0}, Ljava/lang/reflect/InvocationTargetException;->getCause()Ljava/lang/Throwable;
move-result-object v2
invoke-direct {v1, v2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw v1
.line 44
.end local v0 # "e":Ljava/lang/reflect/InvocationTargetException;
:catch_20
move-exception v0
.line 48
:goto_21
goto :goto_25
.line 50
:cond_22
invoke-virtual {p1, p2}, Landroid/view/View;->setAlpha(F)V
.line 52
:goto_25
return-void
.end method