232 lines
5.1 KiB
Smali
232 lines
5.1 KiB
Smali
.class public final Lcom/discord/rlottie/RLottieImageView;
|
|
.super Landroidx/appcompat/widget/AppCompatImageView;
|
|
.source "RLottieImageView.kt"
|
|
|
|
|
|
# instance fields
|
|
.field public d:Lcom/discord/rlottie/RLottieDrawable;
|
|
|
|
.field public e:Z
|
|
|
|
.field public f:Z
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1, p2}, Landroidx/appcompat/widget/AppCompatImageView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
sget-object p1, Lcom/discord/rlottie/RLottieDrawable$PlaybackMode;->FREEZE:Lcom/discord/rlottie/RLottieDrawable$PlaybackMode;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Lcom/discord/rlottie/RLottieImageView;Landroid/content/Context;Ljava/io/File;IILcom/discord/rlottie/RLottieDrawable$PlaybackMode;I)V
|
|
.locals 9
|
|
|
|
and-int/lit8 p5, p6, 0x10
|
|
|
|
const/4 p6, 0x0
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
sget-object p5, Lcom/discord/rlottie/RLottieDrawable$PlaybackMode;->LOOP:Lcom/discord/rlottie/RLottieDrawable$PlaybackMode;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object p5, p6
|
|
|
|
:goto_0
|
|
if-eqz p0, :cond_4
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
if-eqz p5, :cond_2
|
|
|
|
new-instance p6, Lcom/discord/rlottie/RLottieDrawable;
|
|
|
|
const/4 v4, 0x1
|
|
|
|
const/4 v5, 0x0
|
|
|
|
invoke-static {p1}, Lcom/discord/utilities/display/DisplayUtils;->getScreenRefreshRate(Landroid/content/Context;)F
|
|
|
|
move-result v6
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/16 v8, 0x40
|
|
|
|
move-object v0, p6
|
|
|
|
move-object v1, p2
|
|
|
|
move v2, p3
|
|
|
|
move v3, p4
|
|
|
|
invoke-direct/range {v0 .. v8}, Lcom/discord/rlottie/RLottieDrawable;-><init>(Ljava/io/File;IIZZF[II)V
|
|
|
|
iput-object p6, p0, Lcom/discord/rlottie/RLottieImageView;->d:Lcom/discord/rlottie/RLottieDrawable;
|
|
|
|
invoke-virtual {p6, p5}, Lcom/discord/rlottie/RLottieDrawable;->f(Lcom/discord/rlottie/RLottieDrawable$PlaybackMode;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/rlottie/RLottieImageView;->d:Lcom/discord/rlottie/RLottieDrawable;
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
const/4 p2, 0x1
|
|
|
|
invoke-virtual {p1, p2}, Lcom/discord/rlottie/RLottieDrawable;->e(Z)V
|
|
|
|
:cond_1
|
|
iget-object p1, p0, Lcom/discord/rlottie/RLottieImageView;->d:Lcom/discord/rlottie/RLottieDrawable;
|
|
|
|
invoke-virtual {p0, p1}, Landroidx/appcompat/widget/AppCompatImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
return-void
|
|
|
|
:cond_2
|
|
const-string p0, "playbackMode"
|
|
|
|
invoke-static {p0}, Lj0/o/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw p6
|
|
|
|
:cond_3
|
|
const-string p0, "file"
|
|
|
|
invoke-static {p0}, Lj0/o/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw p6
|
|
|
|
:cond_4
|
|
throw p6
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onAttachedToWindow()V
|
|
.locals 1
|
|
|
|
invoke-super {p0}, Landroid/widget/ImageView;->onAttachedToWindow()V
|
|
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Lcom/discord/rlottie/RLottieImageView;->e:Z
|
|
|
|
iget-boolean v0, p0, Lcom/discord/rlottie/RLottieImageView;->f:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/rlottie/RLottieImageView;->d:Lcom/discord/rlottie/RLottieDrawable;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/rlottie/RLottieDrawable;->start()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public onDetachedFromWindow()V
|
|
.locals 2
|
|
|
|
invoke-super {p0}, Landroid/widget/ImageView;->onDetachedFromWindow()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput-boolean v0, p0, Lcom/discord/rlottie/RLottieImageView;->e:Z
|
|
|
|
iget-object v1, p0, Lcom/discord/rlottie/RLottieImageView;->d:Lcom/discord/rlottie/RLottieDrawable;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
iput-boolean v0, v1, Lcom/discord/rlottie/RLottieDrawable;->F:Z
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final setPlaybackMode(Lcom/discord/rlottie/RLottieDrawable$PlaybackMode;)V
|
|
.locals 0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "playbackMode"
|
|
|
|
invoke-static {p1}, Lj0/o/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final setProgress(F)V
|
|
.locals 4
|
|
|
|
iget-object v0, p0, Lcom/discord/rlottie/RLottieImageView;->d:Lcom/discord/rlottie/RLottieDrawable;
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/high16 v2, 0x3f800000 # 1.0f
|
|
|
|
cmpg-float v3, p1, v1
|
|
|
|
if-gez v3, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
cmpl-float v1, p1, v2
|
|
|
|
if-lez v1, :cond_1
|
|
|
|
const/high16 p1, 0x3f800000 # 1.0f
|
|
|
|
:cond_1
|
|
:goto_0
|
|
iget-object v1, v0, Lcom/discord/rlottie/RLottieDrawable;->f:[I
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aget v1, v1, v2
|
|
|
|
int-to-float v1, v1
|
|
|
|
mul-float v1, v1, p1
|
|
|
|
float-to-int p1, v1
|
|
|
|
iput p1, v0, Lcom/discord/rlottie/RLottieDrawable;->y:I
|
|
|
|
iput-boolean v2, v0, Lcom/discord/rlottie/RLottieDrawable;->o:Z
|
|
|
|
iput-boolean v2, v0, Lcom/discord/rlottie/RLottieDrawable;->w:Z
|
|
|
|
invoke-virtual {v0}, Lcom/discord/rlottie/RLottieDrawable;->d()Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
const/4 p1, 0x1
|
|
|
|
iput-boolean p1, v0, Lcom/discord/rlottie/RLottieDrawable;->x:Z
|
|
|
|
:cond_2
|
|
invoke-virtual {v0}, Landroid/graphics/drawable/BitmapDrawable;->invalidateSelf()V
|
|
|
|
:cond_3
|
|
return-void
|
|
.end method
|