SVGAImageView.smali
.class public Lcom/opensource/svgaplayer/SVGAImageView;
.super Landroid/widget/ImageView;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/opensource/svgaplayer/SVGAImageView$c;,
Lcom/opensource/svgaplayer/SVGAImageView$a;,
Lcom/opensource/svgaplayer/SVGAImageView$b;
}
.end annotation
# instance fields
.field public a:Z
.field private final b:Ljava/lang/String;
.field private c:I
.field private d:Z
.field private e:Z
.field private f:Lcom/opensource/svgaplayer/SVGAImageView$c;
.field private g:Lcom/opensource/svgaplayer/d;
.field private h:Landroid/animation/ValueAnimator;
.field private i:Lcom/opensource/svgaplayer/e;
.field private j:Z
.field private k:Z
.field private final l:Lcom/opensource/svgaplayer/SVGAImageView$a;
.field private final m:Lcom/opensource/svgaplayer/SVGAImageView$b;
.field private n:I
.field private o:I
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.registers 8
const/4 v2, 0x0
const/4 v3, 0x0
const/4 v4, 0x6
const/4 v5, 0x0
move-object v0, p0
move-object v1, p1
invoke-direct/range {v0 .. v5}, Lcom/opensource/svgaplayer/SVGAImageView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;IILkotlin/f/b/j;)V
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.registers 9
const/4 v3, 0x0
const/4 v4, 0x4
const/4 v5, 0x0
move-object v0, p0
move-object v1, p1
move-object v2, p2
invoke-direct/range {v0 .. v5}, Lcom/opensource/svgaplayer/SVGAImageView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;IILkotlin/f/b/j;)V
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.registers 7
const-string v0, "context"
invoke-static {p1, v0}, Lkotlin/f/b/o;->b(Ljava/lang/Object;Ljava/lang/String;)V
.line 23
invoke-direct {p0, p1, p2, p3}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
const-string p1, "SVGAImageView"
.line 25
iput-object p1, p0, Lcom/opensource/svgaplayer/SVGAImageView;->b:Ljava/lang/String;
const/4 p1, 0x1
.line 36
iput-boolean p1, p0, Lcom/opensource/svgaplayer/SVGAImageView;->d:Z
.line 37
iput-boolean p1, p0, Lcom/opensource/svgaplayer/SVGAImageView;->e:Z
.line 38
sget-object p3, Lcom/opensource/svgaplayer/SVGAImageView$c;->Forward:Lcom/opensource/svgaplayer/SVGAImageView$c;
iput-object p3, p0, Lcom/opensource/svgaplayer/SVGAImageView;->f:Lcom/opensource/svgaplayer/SVGAImageView$c;
.line 43
iput-boolean p1, p0, Lcom/opensource/svgaplayer/SVGAImageView;->j:Z
.line 44
iput-boolean p1, p0, Lcom/opensource/svgaplayer/SVGAImageView;->k:Z
.line 45
new-instance p3, Lcom/opensource/svgaplayer/SVGAImageView$a;
invoke-direct {p3, p0}, Lcom/opensource/svgaplayer/SVGAImageView$a;-><init>(Lcom/opensource/svgaplayer/SVGAImageView;)V
iput-object p3, p0, Lcom/opensource/svgaplayer/SVGAImageView;->l:Lcom/opensource/svgaplayer/SVGAImageView$a;
.line 46
new-instance p3, Lcom/opensource/svgaplayer/SVGAImageView$b;
invoke-direct {p3, p0}, Lcom/opensource/svgaplayer/SVGAImageView$b;-><init>(Lcom/opensource/svgaplayer/SVGAImageView;)V
iput-object p3, p0, Lcom/opensource/svgaplayer/SVGAImageView;->m:Lcom/opensource/svgaplayer/SVGAImageView$b;
.line 51
sget p3, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x12
if-ge p3, v1, :cond_31
const/4 p3, 0x0
.line 52
invoke-virtual {p0, p1, p3}, Lcom/opensource/svgaplayer/SVGAImageView;->setLayerType(ILandroid/graphics/Paint;)V
:cond_31
if-eqz p2, :cond_c4
.line 10058
invoke-virtual {p0}, Lcom/opensource/svgaplayer/SVGAImageView;->getContext()Landroid/content/Context;
move-result-object p3
invoke-static {p3, v0}, Lkotlin/f/b/o;->a(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {p3}, Landroid/content/Context;->getTheme()Landroid/content/res/Resources$Theme;
move-result-object p3
sget-object v0, Lcom/opensource/svgaplayer/b$a;->SVGAImageView:[I
const/4 v1, 0x0
invoke-virtual {p3, p2, v0, v1, v1}, Landroid/content/res/Resources$Theme;->obtainStyledAttributes(Landroid/util/AttributeSet;[III)Landroid/content/res/TypedArray;
move-result-object p2
.line 10059
sget p3, Lcom/opensource/svgaplayer/b$a;->SVGAImageView_loopCount:I
invoke-virtual {p2, p3, v1}, Landroid/content/res/TypedArray;->getInt(II)I
move-result p3
iput p3, p0, Lcom/opensource/svgaplayer/SVGAImageView;->c:I
.line 10060
sget p3, Lcom/opensource/svgaplayer/b$a;->SVGAImageView_clearsAfterStop:I
invoke-virtual {p2, p3, p1}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
move-result p3
iput-boolean p3, p0, Lcom/opensource/svgaplayer/SVGAImageView;->d:Z
.line 10061
sget p3, Lcom/opensource/svgaplayer/b$a;->SVGAImageView_antiAlias:I
invoke-virtual {p2, p3, p1}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
move-result p3
iput-boolean p3, p0, Lcom/opensource/svgaplayer/SVGAImageView;->j:Z
.line 10062
sget p3, Lcom/opensource/svgaplayer/b$a;->SVGAImageView_autoPlay:I
invoke-virtual {p2, p3, p1}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
move-result p1
iput-boolean p1, p0, Lcom/opensource/svgaplayer/SVGAImageView;->k:Z
.line 10063
sget p1, Lcom/opensource/svgaplayer/b$a;->SVGAImageView_fillMode:I
invoke-virtual {p2, p1}, Landroid/content/res/TypedArray;->getString(I)Ljava/lang/String;
move-result-object p1
if-eqz p1, :cond_86
const-string p3, "0"
.line 10064
invoke-static {p1, p3}, Lkotlin/f/b/o;->a(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p3
if-eqz p3, :cond_7a
.line 10065
sget-object p1, Lcom/opensource/svgaplayer/SVGAImageView$c;->Backward:Lcom/opensource/svgaplayer/SVGAImageView$c;
iput-object p1, p0, Lcom/opensource/svgaplayer/SVGAImageView;->f:Lcom/opensource/svgaplayer/SVGAImageView$c;
goto :goto_86
:cond_7a
const-string p3, "1"
.line 10066
invoke-static {p1, p3}, Lkotlin/f/b/o;->a(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_86
.line 10067
sget-object p1, Lcom/opensource/svgaplayer/SVGAImageView$c;->Forward:Lcom/opensource/svgaplayer/SVGAImageView$c;
iput-object p1, p0, Lcom/opensource/svgaplayer/SVGAImageView;->f:Lcom/opensource/svgaplayer/SVGAImageView$c;
.line 10070
:cond_86
:goto_86
sget p1, Lcom/opensource/svgaplayer/b$a;->SVGAImageView_source:I
invoke-virtual {p2, p1}, Landroid/content/res/TypedArray;->getString(I)Ljava/lang/String;
move-result-object p1
if-eqz p1, :cond_c1
.line 10077
new-instance p3, Ljava/lang/ref/WeakReference;
invoke-direct {p3, p0}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V
.line 10078
new-instance v0, Lcom/opensource/svgaplayer/h;
invoke-virtual {p0}, Lcom/opensource/svgaplayer/SVGAImageView;->getContext()Landroid/content/Context;
move-result-object v2
invoke-direct {v0, v2}, Lcom/opensource/svgaplayer/h;-><init>(Landroid/content/Context;)V
const-string v2, "http://"
.line 10332
invoke-static {p1, v2, v1}, Lkotlin/m/p;->b(Ljava/lang/String;Ljava/lang/String;Z)Z
move-result v2
if-nez v2, :cond_b5
const-string v2, "https://"
.line 11332
invoke-static {p1, v2, v1}, Lkotlin/m/p;->b(Ljava/lang/String;Ljava/lang/String;Z)Z
move-result v1
if-eqz v1, :cond_ad
goto :goto_b5
.line 10082
:cond_ad
invoke-static {p3}, Lcom/opensource/svgaplayer/SVGAImageView;->a(Ljava/lang/ref/WeakReference;)Lcom/opensource/svgaplayer/h$d;
move-result-object p3
invoke-virtual {v0, p1, p3}, Lcom/opensource/svgaplayer/h;->a(Ljava/lang/String;Lcom/opensource/svgaplayer/h$d;)V
goto :goto_c1
.line 10080
:cond_b5
:goto_b5
new-instance v1, Ljava/net/URL;
invoke-direct {v1, p1}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
invoke-static {p3}, Lcom/opensource/svgaplayer/SVGAImageView;->a(Ljava/lang/ref/WeakReference;)Lcom/opensource/svgaplayer/h$d;
move-result-object p1
invoke-virtual {v0, v1, p1}, Lcom/opensource/svgaplayer/h;->a(Ljava/net/URL;Lcom/opensource/svgaplayer/h$d;)Lkotlin/f/a/a;
.line 10073
:cond_c1
:goto_c1
invoke-virtual {p2}, Landroid/content/res/TypedArray;->recycle()V
:cond_c4
return-void
.end method
.method public synthetic constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;IILkotlin/f/b/j;)V
.registers 6
and-int/lit8 p5, p4, 0x2
if-eqz p5, :cond_5
const/4 p2, 0x0
:cond_5
and-int/lit8 p4, p4, 0x4
if-eqz p4, :cond_a
const/4 p3, 0x0
.line 22
:cond_a
invoke-direct {p0, p1, p2, p3}, Lcom/opensource/svgaplayer/SVGAImageView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
return-void
.end method
.method private static a(Ljava/lang/ref/WeakReference;)Lcom/opensource/svgaplayer/h$d;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/ref/WeakReference<",
"Lcom/opensource/svgaplayer/SVGAImageView;",
">;)",
"Lcom/opensource/svgaplayer/h$d;"
}
.end annotation
.line 87
new-instance v0, Lcom/opensource/svgaplayer/SVGAImageView$d;
invoke-direct {v0, p0}, Lcom/opensource/svgaplayer/SVGAImageView$d;-><init>(Ljava/lang/ref/WeakReference;)V
check-cast v0, Lcom/opensource/svgaplayer/h$d;
return-object v0
.end method
.method public static final synthetic a(Lcom/opensource/svgaplayer/SVGAImageView;Landroid/animation/Animator;)V
.registers 5
const/4 v0, 0x0
.line 12177
iput-boolean v0, p0, Lcom/opensource/svgaplayer/SVGAImageView;->a:Z
.line 12178
invoke-virtual {p0}, Lcom/opensource/svgaplayer/SVGAImageView;->b()V
.line 12179
invoke-direct {p0}, Lcom/opensource/svgaplayer/SVGAImageView;->getSVGADrawable()Lcom/opensource/svgaplayer/f;
move-result-object v0
.line 12180
iget-boolean v1, p0, Lcom/opensource/svgaplayer/SVGAImageView;->d:Z
if-nez v1, :cond_27
if-eqz v0, :cond_27
.line 12181
iget-object v1, p0, Lcom/opensource/svgaplayer/SVGAImageView;->f:Lcom/opensource/svgaplayer/SVGAImageView$c;
sget-object v2, Lcom/opensource/svgaplayer/SVGAImageView$c;->Backward:Lcom/opensource/svgaplayer/SVGAImageView$c;
if-ne v1, v2, :cond_1c
.line 12182
iget v1, p0, Lcom/opensource/svgaplayer/SVGAImageView;->n:I
invoke-virtual {v0, v1}, Lcom/opensource/svgaplayer/f;->a(I)V
goto :goto_27
.line 12183
:cond_1c
iget-object v1, p0, Lcom/opensource/svgaplayer/SVGAImageView;->f:Lcom/opensource/svgaplayer/SVGAImageView$c;
sget-object v2, Lcom/opensource/svgaplayer/SVGAImageView$c;->Forward:Lcom/opensource/svgaplayer/SVGAImageView$c;
if-ne v1, v2, :cond_27
.line 12184
iget v1, p0, Lcom/opensource/svgaplayer/SVGAImageView;->o:I
invoke-virtual {v0, v1}, Lcom/opensource/svgaplayer/f;->a(I)V
.line 12187
:cond_27
:goto_27
iget-boolean v0, p0, Lcom/opensource/svgaplayer/SVGAImageView;->d:Z
if-eqz v0, :cond_41
if-eqz p1, :cond_39
check-cast p1, Landroid/animation/ValueAnimator;
invoke-virtual {p1}, Landroid/animation/ValueAnimator;->getRepeatCount()I
move-result p1
if-gtz p1, :cond_41
.line 12188
invoke-direct {p0}, Lcom/opensource/svgaplayer/SVGAImageView;->f()V
goto :goto_41
.line 12187
:cond_39
new-instance p0, Lkotlin/TypeCastException;
const-string p1, "null cannot be cast to non-null type android.animation.ValueAnimator"
invoke-direct {p0, p1}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
throw p0
.line 12190
:cond_41
:goto_41
iget-object p0, p0, Lcom/opensource/svgaplayer/SVGAImageView;->g:Lcom/opensource/svgaplayer/d;
if-eqz p0, :cond_48
invoke-interface {p0}, Lcom/opensource/svgaplayer/d;->a()V
:cond_48
return-void
.end method
.method public static final synthetic a(Lcom/opensource/svgaplayer/SVGAImageView;Landroid/animation/ValueAnimator;)V
.registers 2
.line 13170
invoke-direct {p0}, Lcom/opensource/svgaplayer/SVGAImageView;->getSVGADrawable()Lcom/opensource/svgaplayer/f;
move-result-object p0
if-nez p0, :cond_7
return-void
:cond_7
if-eqz p1, :cond_e
.line 13171
invoke-virtual {p1}, Landroid/animation/ValueAnimator;->getAnimatedValue()Ljava/lang/Object;
move-result-object p1
goto :goto_f
:cond_e
const/4 p1, 0x0
:goto_f
if-eqz p1, :cond_1b
check-cast p1, Ljava/lang/Integer;
invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I
move-result p1
invoke-virtual {p0, p1}, Lcom/opensource/svgaplayer/f;->a(I)V
return-void
:cond_1b
new-instance p0, Lkotlin/TypeCastException;
const-string p1, "null cannot be cast to non-null type kotlin.Int"
invoke-direct {p0, p1}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static final synthetic a(Lcom/opensource/svgaplayer/SVGAImageView;Lcom/opensource/svgaplayer/j;)V
.registers 3
.line 16097
new-instance v0, Lcom/opensource/svgaplayer/SVGAImageView$e;
invoke-direct {v0, p0, p1}, Lcom/opensource/svgaplayer/SVGAImageView$e;-><init>(Lcom/opensource/svgaplayer/SVGAImageView;Lcom/opensource/svgaplayer/j;)V
check-cast v0, Ljava/lang/Runnable;
invoke-virtual {p0, v0}, Lcom/opensource/svgaplayer/SVGAImageView;->post(Ljava/lang/Runnable;)Z
return-void
.end method
.method public static final synthetic a(Lcom/opensource/svgaplayer/SVGAImageView;Z)V
.registers 2
.line 22
iput-boolean p1, p0, Lcom/opensource/svgaplayer/SVGAImageView;->a:Z
return-void
.end method
.method public static final synthetic a(Lcom/opensource/svgaplayer/SVGAImageView;)Z
.registers 1
.line 22
iget-boolean p0, p0, Lcom/opensource/svgaplayer/SVGAImageView;->j:Z
return p0
.end method
.method public static final synthetic b(Lcom/opensource/svgaplayer/SVGAImageView;)Lcom/opensource/svgaplayer/f;
.registers 1
.line 22
invoke-direct {p0}, Lcom/opensource/svgaplayer/SVGAImageView;->getSVGADrawable()Lcom/opensource/svgaplayer/f;
move-result-object p0
return-object p0
.end method
.method private final c()V
.registers 9
.line 117
sget-object v0, Lcom/opensource/svgaplayer/d/a/c;->a:Lcom/opensource/svgaplayer/d/a/c;
iget-object v0, p0, Lcom/opensource/svgaplayer/SVGAImageView;->b:Ljava/lang/String;
const-string v1, "================ start animation ================"
invoke-static {v0, v1}, Lcom/opensource/svgaplayer/d/a/c;->a(Ljava/lang/String;Ljava/lang/String;)V
.line 118
invoke-direct {p0}, Lcom/opensource/svgaplayer/SVGAImageView;->getSVGADrawable()Lcom/opensource/svgaplayer/f;
move-result-object v0
if-nez v0, :cond_10
return-void
.line 119
:cond_10
invoke-direct {p0}, Lcom/opensource/svgaplayer/SVGAImageView;->d()V
const/4 v1, 0x0
.line 120
invoke-static {v1, v1}, Ljava/lang/Math;->max(II)I
move-result v2
iput v2, p0, Lcom/opensource/svgaplayer/SVGAImageView;->n:I
.line 2010
iget-object v0, v0, Lcom/opensource/svgaplayer/f;->b:Lcom/opensource/svgaplayer/j;
.line 2036
iget v2, v0, Lcom/opensource/svgaplayer/j;->d:I
const/4 v3, 0x1
sub-int/2addr v2, v3
const v4, 0x7ffffffe
.line 122
invoke-static {v2, v4}, Ljava/lang/Math;->min(II)I
move-result v2
iput v2, p0, Lcom/opensource/svgaplayer/SVGAImageView;->o:I
const/4 v4, 0x2
new-array v4, v4, [I
.line 123
iget v5, p0, Lcom/opensource/svgaplayer/SVGAImageView;->n:I
aput v5, v4, v1
aput v2, v4, v3
invoke-static {v4}, Landroid/animation/ValueAnimator;->ofInt([I)Landroid/animation/ValueAnimator;
move-result-object v1
const-string v2, "animator"
.line 124
invoke-static {v1, v2}, Lkotlin/f/b/o;->a(Ljava/lang/Object;Ljava/lang/String;)V
new-instance v2, Landroid/view/animation/LinearInterpolator;
invoke-direct {v2}, Landroid/view/animation/LinearInterpolator;-><init>()V
check-cast v2, Landroid/animation/TimeInterpolator;
invoke-virtual {v1, v2}, Landroid/animation/ValueAnimator;->setInterpolator(Landroid/animation/TimeInterpolator;)V
.line 125
iget v2, p0, Lcom/opensource/svgaplayer/SVGAImageView;->o:I
iget v4, p0, Lcom/opensource/svgaplayer/SVGAImageView;->n:I
sub-int/2addr v2, v4
add-int/2addr v2, v3
const/16 v4, 0x3e8
.line 4033
iget v0, v0, Lcom/opensource/svgaplayer/j;->c:I
.line 125
div-int/2addr v4, v0
mul-int v2, v2, v4
int-to-double v4, v2
invoke-direct {p0}, Lcom/opensource/svgaplayer/SVGAImageView;->e()D
move-result-wide v6
invoke-static {v4, v5}, Ljava/lang/Double;->isNaN(D)Z
div-double/2addr v4, v6
double-to-long v4, v4
invoke-virtual {v1, v4, v5}, Landroid/animation/ValueAnimator;->setDuration(J)Landroid/animation/ValueAnimator;
.line 126
iget v0, p0, Lcom/opensource/svgaplayer/SVGAImageView;->c:I
if-gtz v0, :cond_67
const v0, 0x1869f
goto :goto_68
:cond_67
sub-int/2addr v0, v3
:goto_68
invoke-virtual {v1, v0}, Landroid/animation/ValueAnimator;->setRepeatCount(I)V
.line 127
iget-object v0, p0, Lcom/opensource/svgaplayer/SVGAImageView;->m:Lcom/opensource/svgaplayer/SVGAImageView$b;
check-cast v0, Landroid/animation/ValueAnimator$AnimatorUpdateListener;
invoke-virtual {v1, v0}, Landroid/animation/ValueAnimator;->addUpdateListener(Landroid/animation/ValueAnimator$AnimatorUpdateListener;)V
.line 128
iget-object v0, p0, Lcom/opensource/svgaplayer/SVGAImageView;->l:Lcom/opensource/svgaplayer/SVGAImageView$a;
check-cast v0, Landroid/animation/Animator$AnimatorListener;
invoke-virtual {v1, v0}, Landroid/animation/ValueAnimator;->addListener(Landroid/animation/Animator$AnimatorListener;)V
.line 132
invoke-virtual {v1}, Landroid/animation/ValueAnimator;->start()V
.line 134
iput-object v1, p0, Lcom/opensource/svgaplayer/SVGAImageView;->h:Landroid/animation/ValueAnimator;
return-void
.end method
.method public static final synthetic c(Lcom/opensource/svgaplayer/SVGAImageView;)Z
.registers 1
.line 22
iget-boolean p0, p0, Lcom/opensource/svgaplayer/SVGAImageView;->k:Z
return p0
.end method
.method private final d()V
.registers 4
.line 138
invoke-direct {p0}, Lcom/opensource/svgaplayer/SVGAImageView;->getSVGADrawable()Lcom/opensource/svgaplayer/f;
move-result-object v0
if-nez v0, :cond_7
return-void
:cond_7
const/4 v1, 0x0
.line 139
invoke-virtual {v0, v1}, Lcom/opensource/svgaplayer/f;->a(Z)V
.line 140
invoke-virtual {p0}, Lcom/opensource/svgaplayer/SVGAImageView;->getScaleType()Landroid/widget/ImageView$ScaleType;
move-result-object v1
const-string v2, "scaleType"
invoke-static {v1, v2}, Lkotlin/f/b/o;->a(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {v0, v1}, Lcom/opensource/svgaplayer/f;->a(Landroid/widget/ImageView$ScaleType;)V
return-void
.end method
.method private final e()D
.registers 11
const-wide/high16 v0, 0x3ff0000000000000L # 1.0
:try_start_2
const-string v2, "android.animation.ValueAnimator"
.line 151
invoke-static {v2}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
move-result-object v2
if-nez v2, :cond_b
return-wide v0
:cond_b
const-string v3, "getDurationScale"
const/4 v4, 0x0
new-array v5, v4, [Ljava/lang/Class;
.line 152
invoke-virtual {v2, v3, v5}, Ljava/lang/Class;->getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v3
if-nez v3, :cond_17
return-wide v0
:cond_17
new-array v5, v4, [Ljava/lang/Object;
.line 153
invoke-virtual {v3, v2, v5}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v3
if-eqz v3, :cond_58
check-cast v3, Ljava/lang/Float;
invoke-virtual {v3}, Ljava/lang/Float;->floatValue()F
move-result v3
:try_end_25
.catch Ljava/lang/Exception; {:try_start_2 .. :try_end_25} :catch_60
float-to-double v5, v3
const-wide/16 v7, 0x0
cmpg-double v3, v5, v7
if-nez v3, :cond_56
:try_start_2c
const-string v3, "setDurationScale"
const/4 v7, 0x1
new-array v8, v7, [Ljava/lang/Class;
.line 155
sget-object v9, Ljava/lang/Float;->TYPE:Ljava/lang/Class;
aput-object v9, v8, v4
invoke-virtual {v2, v3, v8}, Ljava/lang/Class;->getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v3
if-nez v3, :cond_3c
return-wide v5
.line 156
:cond_3c
invoke-virtual {v3, v7}, Ljava/lang/reflect/Method;->setAccessible(Z)V
new-array v7, v7, [Ljava/lang/Object;
const/high16 v8, 0x3f800000 # 1.0f
.line 157
invoke-static {v8}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;
move-result-object v8
aput-object v8, v7, v4
invoke-virtual {v3, v2, v7}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
:try_end_4c
.catch Ljava/lang/Exception; {:try_start_2c .. :try_end_4c} :catch_56
.line 159
:try_start_4c
sget-object v2, Lcom/opensource/svgaplayer/d/a/c;->a:Lcom/opensource/svgaplayer/d/a/c;
iget-object v2, p0, Lcom/opensource/svgaplayer/SVGAImageView;->b:Ljava/lang/String;
const-string v3, "The animation duration scale has been reset to 1.0x, because you closed it on developer options."
invoke-static {v2, v3}, Lcom/opensource/svgaplayer/d/a/c;->a(Ljava/lang/String;Ljava/lang/String;)V
goto :goto_60
:catch_56
:cond_56
move-wide v0, v5
goto :goto_60
.line 153
:cond_58
new-instance v2, Lkotlin/TypeCastException;
const-string v3, "null cannot be cast to non-null type kotlin.Float"
invoke-direct {v2, v3}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
throw v2
:try_end_60
.catch Ljava/lang/Exception; {:try_start_4c .. :try_end_60} :catch_60
:catch_60
:goto_60
return-wide v0
.end method
.method private f()V
.registers 7
.line 194
invoke-direct {p0}, Lcom/opensource/svgaplayer/SVGAImageView;->getSVGADrawable()Lcom/opensource/svgaplayer/f;
move-result-object v0
if-eqz v0, :cond_a
const/4 v1, 0x1
invoke-virtual {v0, v1}, Lcom/opensource/svgaplayer/f;->a(Z)V
.line 195
:cond_a
invoke-direct {p0}, Lcom/opensource/svgaplayer/SVGAImageView;->getSVGADrawable()Lcom/opensource/svgaplayer/f;
move-result-object v0
const/4 v1, 0x0
if-eqz v0, :cond_59
.line 4082
iget-object v2, v0, Lcom/opensource/svgaplayer/f;->b:Lcom/opensource/svgaplayer/j;
.line 5040
iget-object v2, v2, Lcom/opensource/svgaplayer/j;->f:Ljava/util/List;
.line 4082
check-cast v2, Ljava/lang/Iterable;
.line 4097
invoke-interface {v2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v2
:goto_1b
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v3
if-eqz v3, :cond_3d
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v3
check-cast v3, Lcom/opensource/svgaplayer/c/a;
.line 6014
iget-object v4, v3, Lcom/opensource/svgaplayer/c/a;->d:Ljava/lang/Integer;
if-eqz v4, :cond_3a
.line 4083
check-cast v4, Ljava/lang/Number;
invoke-virtual {v4}, Ljava/lang/Number;->intValue()I
move-result v4
.line 4084
iget-object v5, v0, Lcom/opensource/svgaplayer/f;->b:Lcom/opensource/svgaplayer/j;
.line 6041
iget-object v5, v5, Lcom/opensource/svgaplayer/j;->g:Landroid/media/SoundPool;
if-eqz v5, :cond_3a
.line 4084
invoke-virtual {v5, v4}, Landroid/media/SoundPool;->stop(I)V
.line 7014
:cond_3a
iput-object v1, v3, Lcom/opensource/svgaplayer/c/a;->d:Ljava/lang/Integer;
goto :goto_1b
.line 4088
:cond_3d
iget-object v0, v0, Lcom/opensource/svgaplayer/f;->b:Lcom/opensource/svgaplayer/j;
.line 7274
iget-object v2, v0, Lcom/opensource/svgaplayer/j;->g:Landroid/media/SoundPool;
if-eqz v2, :cond_46
invoke-virtual {v2}, Landroid/media/SoundPool;->release()V
.line 7275
:cond_46
iput-object v1, v0, Lcom/opensource/svgaplayer/j;->g:Landroid/media/SoundPool;
.line 8069
sget-object v2, Lkotlin/a/w;->a:Lkotlin/a/w;
check-cast v2, Ljava/util/List;
.line 7276
iput-object v2, v0, Lcom/opensource/svgaplayer/j;->f:Ljava/util/List;
.line 9069
sget-object v2, Lkotlin/a/w;->a:Lkotlin/a/w;
check-cast v2, Ljava/util/List;
.line 7277
iput-object v2, v0, Lcom/opensource/svgaplayer/j;->e:Ljava/util/List;
.line 7278
iget-object v0, v0, Lcom/opensource/svgaplayer/j;->h:Ljava/util/HashMap;
invoke-virtual {v0}, Ljava/util/HashMap;->clear()V
.line 197
:cond_59
invoke-virtual {p0, v1}, Lcom/opensource/svgaplayer/SVGAImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
return-void
.end method
.method private final getSVGADrawable()Lcom/opensource/svgaplayer/f;
.registers 3
.line 144
invoke-virtual {p0}, Lcom/opensource/svgaplayer/SVGAImageView;->getDrawable()Landroid/graphics/drawable/Drawable;
move-result-object v0
instance-of v1, v0, Lcom/opensource/svgaplayer/f;
if-nez v1, :cond_9
const/4 v0, 0x0
:cond_9
check-cast v0, Lcom/opensource/svgaplayer/f;
return-object v0
.end method
# virtual methods
.method public final a()V
.registers 2
const/4 v0, 0x0
.line 112
invoke-virtual {p0, v0}, Lcom/opensource/svgaplayer/SVGAImageView;->a(Z)V
.line 113
invoke-direct {p0}, Lcom/opensource/svgaplayer/SVGAImageView;->c()V
return-void
.end method
.method public final a(Z)V
.registers 3
.line 210
iget-object v0, p0, Lcom/opensource/svgaplayer/SVGAImageView;->h:Landroid/animation/ValueAnimator;
if-eqz v0, :cond_7
invoke-virtual {v0}, Landroid/animation/ValueAnimator;->cancel()V
.line 211
:cond_7
iget-object v0, p0, Lcom/opensource/svgaplayer/SVGAImageView;->h:Landroid/animation/ValueAnimator;
if-eqz v0, :cond_e
invoke-virtual {v0}, Landroid/animation/ValueAnimator;->removeAllListeners()V
.line 212
:cond_e
iget-object v0, p0, Lcom/opensource/svgaplayer/SVGAImageView;->h:Landroid/animation/ValueAnimator;
if-eqz v0, :cond_15
invoke-virtual {v0}, Landroid/animation/ValueAnimator;->removeAllUpdateListeners()V
.line 213
:cond_15
invoke-direct {p0}, Lcom/opensource/svgaplayer/SVGAImageView;->getSVGADrawable()Lcom/opensource/svgaplayer/f;
move-result-object v0
if-eqz v0, :cond_1e
invoke-virtual {v0, p1}, Lcom/opensource/svgaplayer/f;->a(Z)V
:cond_1e
return-void
.end method
.method public final b()V
.registers 2
.line 206
iget-boolean v0, p0, Lcom/opensource/svgaplayer/SVGAImageView;->d:Z
invoke-virtual {p0, v0}, Lcom/opensource/svgaplayer/SVGAImageView;->a(Z)V
return-void
.end method
.method public final getCallback()Lcom/opensource/svgaplayer/d;
.registers 2
.line 39
iget-object v0, p0, Lcom/opensource/svgaplayer/SVGAImageView;->g:Lcom/opensource/svgaplayer/d;
return-object v0
.end method
.method public final getClearsAfterDetached()Z
.registers 2
.line 37
iget-boolean v0, p0, Lcom/opensource/svgaplayer/SVGAImageView;->e:Z
return v0
.end method
.method public final getClearsAfterStop()Z
.registers 2
.line 36
iget-boolean v0, p0, Lcom/opensource/svgaplayer/SVGAImageView;->d:Z
return v0
.end method
.method public final getFillMode()Lcom/opensource/svgaplayer/SVGAImageView$c;
.registers 2
.line 38
iget-object v0, p0, Lcom/opensource/svgaplayer/SVGAImageView;->f:Lcom/opensource/svgaplayer/SVGAImageView$c;
return-object v0
.end method
.method public final getLoops()I
.registers 2
.line 35
iget v0, p0, Lcom/opensource/svgaplayer/SVGAImageView;->c:I
return v0
.end method
.method protected onDetachedFromWindow()V
.registers 2
.line 274
invoke-super {p0}, Landroid/widget/ImageView;->onDetachedFromWindow()V
const/4 v0, 0x1
.line 275
invoke-virtual {p0, v0}, Lcom/opensource/svgaplayer/SVGAImageView;->a(Z)V
.line 276
iget-boolean v0, p0, Lcom/opensource/svgaplayer/SVGAImageView;->e:Z
if-eqz v0, :cond_e
.line 277
invoke-direct {p0}, Lcom/opensource/svgaplayer/SVGAImageView;->f()V
:cond_e
return-void
.end method
.method public onTouchEvent(Landroid/view/MotionEvent;)Z
.registers 8
if-eqz p1, :cond_6d
.line 257
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
move-result v0
if-eqz v0, :cond_9
goto :goto_6d
.line 260
:cond_9
invoke-direct {p0}, Lcom/opensource/svgaplayer/SVGAImageView;->getSVGADrawable()Lcom/opensource/svgaplayer/f;
move-result-object v0
const/4 v1, 0x0
if-nez v0, :cond_11
return v1
.line 10010
:cond_11
iget-object v0, v0, Lcom/opensource/svgaplayer/f;->c:Lcom/opensource/svgaplayer/g;
.line 10032
iget-object v0, v0, Lcom/opensource/svgaplayer/g;->h:Ljava/util/HashMap;
.line 261
check-cast v0, Ljava/util/Map;
invoke-interface {v0}, Ljava/util/Map;->entrySet()Ljava/util/Set;
move-result-object v0
invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v0
:cond_1f
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_68
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/util/Map$Entry;
invoke-interface {v2}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
invoke-interface {v2}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object v2
check-cast v2, [I
.line 262
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
move-result v3
aget v4, v2, v1
int-to-float v4, v4
cmpl-float v3, v3, v4
if-ltz v3, :cond_1f
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
move-result v3
const/4 v4, 0x2
aget v4, v2, v4
int-to-float v4, v4
cmpg-float v3, v3, v4
if-gtz v3, :cond_1f
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
move-result v3
const/4 v4, 0x1
aget v5, v2, v4
int-to-float v5, v5
cmpl-float v3, v3, v5
if-ltz v3, :cond_1f
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
move-result v3
const/4 v5, 0x3
aget v2, v2, v5
int-to-float v2, v2
cmpg-float v2, v3, v2
if-gtz v2, :cond_1f
.line 263
iget-object v2, p0, Lcom/opensource/svgaplayer/SVGAImageView;->i:Lcom/opensource/svgaplayer/e;
if-eqz v2, :cond_1f
return v4
.line 270
:cond_68
invoke-super {p0, p1}, Landroid/widget/ImageView;->onTouchEvent(Landroid/view/MotionEvent;)Z
move-result p1
return p1
.line 258
:cond_6d
:goto_6d
invoke-super {p0, p1}, Landroid/widget/ImageView;->onTouchEvent(Landroid/view/MotionEvent;)Z
move-result p1
return p1
.end method
.method public final setCallback(Lcom/opensource/svgaplayer/d;)V
.registers 2
.line 39
iput-object p1, p0, Lcom/opensource/svgaplayer/SVGAImageView;->g:Lcom/opensource/svgaplayer/d;
return-void
.end method
.method public final setClearsAfterDetached(Z)V
.registers 2
.line 37
iput-boolean p1, p0, Lcom/opensource/svgaplayer/SVGAImageView;->e:Z
return-void
.end method
.method public final setClearsAfterStop(Z)V
.registers 2
.line 36
iput-boolean p1, p0, Lcom/opensource/svgaplayer/SVGAImageView;->d:Z
return-void
.end method
.method public final setFillMode(Lcom/opensource/svgaplayer/SVGAImageView$c;)V
.registers 3
const-string v0, "<set-?>"
invoke-static {p1, v0}, Lkotlin/f/b/o;->b(Ljava/lang/Object;Ljava/lang/String;)V
.line 38
iput-object p1, p0, Lcom/opensource/svgaplayer/SVGAImageView;->f:Lcom/opensource/svgaplayer/SVGAImageView$c;
return-void
.end method
.method public final setLoops(I)V
.registers 2
.line 35
iput p1, p0, Lcom/opensource/svgaplayer/SVGAImageView;->c:I
return-void
.end method
.method public final setOnAnimKeyClickListener(Lcom/opensource/svgaplayer/e;)V
.registers 3
const-string v0, "clickListener"
invoke-static {p1, v0}, Lkotlin/f/b/o;->b(Ljava/lang/Object;Ljava/lang/String;)V
.line 252
iput-object p1, p0, Lcom/opensource/svgaplayer/SVGAImageView;->i:Lcom/opensource/svgaplayer/e;
return-void
.end method
.method public final setVideoItem(Lcom/opensource/svgaplayer/j;)V
.registers 4
.line 217
new-instance v0, Lcom/opensource/svgaplayer/g;
invoke-direct {v0}, Lcom/opensource/svgaplayer/g;-><init>()V
if-nez p1, :cond_c
const/4 p1, 0x0
.line 9222
invoke-virtual {p0, p1}, Lcom/opensource/svgaplayer/SVGAImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
return-void
.line 9224
:cond_c
new-instance v1, Lcom/opensource/svgaplayer/f;
invoke-direct {v1, p1, v0}, Lcom/opensource/svgaplayer/f;-><init>(Lcom/opensource/svgaplayer/j;Lcom/opensource/svgaplayer/g;)V
.line 9225
iget-boolean p1, p0, Lcom/opensource/svgaplayer/SVGAImageView;->d:Z
invoke-virtual {v1, p1}, Lcom/opensource/svgaplayer/f;->a(Z)V
.line 9226
check-cast v1, Landroid/graphics/drawable/Drawable;
invoke-virtual {p0, v1}, Lcom/opensource/svgaplayer/SVGAImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
return-void
.end method