1314 lines
31 KiB
Smali
1314 lines
31 KiB
Smali
.class public Lcom/moji/lottie/LottieDrawable;
|
|
.super Landroid/graphics/drawable/Drawable;
|
|
.source "LottieDrawable.java"
|
|
|
|
# interfaces
|
|
.implements Landroid/graphics/drawable/Drawable$Callback;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/moji/lottie/LottieDrawable$ColorFilterData;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final a:Ljava/lang/String; = "LottieDrawable"
|
|
|
|
|
|
# instance fields
|
|
.field private final b:Landroid/graphics/Matrix;
|
|
|
|
.field private c:Lcom/moji/lottie/LottieComposition;
|
|
|
|
.field private final d:Landroid/animation/ValueAnimator;
|
|
|
|
.field private e:F
|
|
|
|
.field private f:F
|
|
|
|
.field private g:F
|
|
|
|
.field private final h:Ljava/util/Set;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Set<",
|
|
"Lcom/moji/lottie/LottieDrawable$ColorFilterData;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private i:Lcom/moji/lottie/ImageAssetBitmapManager;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private j:Ljava/lang/String;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private k:Lcom/moji/lottie/ImageAssetDelegate;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private l:Z
|
|
|
|
.field private m:Z
|
|
|
|
.field private n:Z
|
|
|
|
.field private o:Z
|
|
|
|
.field private p:Lcom/moji/lottie/CompositionLayer;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private q:I
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 2
|
|
|
|
.line 57
|
|
invoke-direct {p0}, Landroid/graphics/drawable/Drawable;-><init>()V
|
|
|
|
.line 35
|
|
new-instance v0, Landroid/graphics/Matrix;
|
|
|
|
invoke-direct {v0}, Landroid/graphics/Matrix;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/moji/lottie/LottieDrawable;->b:Landroid/graphics/Matrix;
|
|
|
|
const/4 v0, 0x2
|
|
|
|
.line 37
|
|
new-array v0, v0, [F
|
|
|
|
fill-array-data v0, :array_0
|
|
|
|
invoke-static {v0}, Landroid/animation/ValueAnimator;->ofFloat([F)Landroid/animation/ValueAnimator;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/moji/lottie/LottieDrawable;->d:Landroid/animation/ValueAnimator;
|
|
|
|
const/high16 v0, 0x3f800000 # 1.0f
|
|
|
|
.line 38
|
|
iput v0, p0, Lcom/moji/lottie/LottieDrawable;->e:F
|
|
|
|
.line 39
|
|
iput v0, p0, Lcom/moji/lottie/LottieDrawable;->f:F
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 40
|
|
iput v0, p0, Lcom/moji/lottie/LottieDrawable;->g:F
|
|
|
|
.line 42
|
|
new-instance v0, Ljava/util/HashSet;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashSet;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/moji/lottie/LottieDrawable;->h:Ljava/util/Set;
|
|
|
|
const/16 v0, 0xff
|
|
|
|
.line 55
|
|
iput v0, p0, Lcom/moji/lottie/LottieDrawable;->q:I
|
|
|
|
.line 58
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->d:Landroid/animation/ValueAnimator;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Landroid/animation/ValueAnimator;->setRepeatCount(I)V
|
|
|
|
.line 59
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->d:Landroid/animation/ValueAnimator;
|
|
|
|
new-instance v1, Landroid/view/animation/LinearInterpolator;
|
|
|
|
invoke-direct {v1}, Landroid/view/animation/LinearInterpolator;-><init>()V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/animation/ValueAnimator;->setInterpolator(Landroid/animation/TimeInterpolator;)V
|
|
|
|
.line 60
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->d:Landroid/animation/ValueAnimator;
|
|
|
|
new-instance v1, Lcom/moji/lottie/LottieDrawable$1;
|
|
|
|
invoke-direct {v1, p0}, Lcom/moji/lottie/LottieDrawable$1;-><init>(Lcom/moji/lottie/LottieDrawable;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/animation/ValueAnimator;->addUpdateListener(Landroid/animation/ValueAnimator$AnimatorUpdateListener;)V
|
|
|
|
return-void
|
|
|
|
nop
|
|
|
|
:array_0
|
|
.array-data 4
|
|
0x0
|
|
0x3f800000 # 1.0f
|
|
.end array-data
|
|
.end method
|
|
|
|
.method static synthetic a(Lcom/moji/lottie/LottieDrawable;)Z
|
|
.locals 0
|
|
|
|
.line 33
|
|
iget-boolean p0, p0, Lcom/moji/lottie/LottieDrawable;->n:Z
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method static synthetic b(Lcom/moji/lottie/LottieDrawable;)Landroid/animation/ValueAnimator;
|
|
.locals 0
|
|
|
|
.line 33
|
|
iget-object p0, p0, Lcom/moji/lottie/LottieDrawable;->d:Landroid/animation/ValueAnimator;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private c(Z)V
|
|
.locals 3
|
|
|
|
.line 322
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->p:Lcom/moji/lottie/CompositionLayer;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
.line 323
|
|
iput-boolean p1, p0, Lcom/moji/lottie/LottieDrawable;->l:Z
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 324
|
|
iput-boolean p1, p0, Lcom/moji/lottie/LottieDrawable;->m:Z
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 328
|
|
iget-object p1, p0, Lcom/moji/lottie/LottieDrawable;->d:Landroid/animation/ValueAnimator;
|
|
|
|
iget v0, p0, Lcom/moji/lottie/LottieDrawable;->g:F
|
|
|
|
iget-object v1, p0, Lcom/moji/lottie/LottieDrawable;->d:Landroid/animation/ValueAnimator;
|
|
|
|
invoke-virtual {v1}, Landroid/animation/ValueAnimator;->getDuration()J
|
|
|
|
move-result-wide v1
|
|
|
|
long-to-float v1, v1
|
|
|
|
mul-float v0, v0, v1
|
|
|
|
float-to-long v0, v0
|
|
|
|
invoke-virtual {p1, v0, v1}, Landroid/animation/ValueAnimator;->setCurrentPlayTime(J)V
|
|
|
|
.line 330
|
|
:cond_1
|
|
iget-object p1, p0, Lcom/moji/lottie/LottieDrawable;->d:Landroid/animation/ValueAnimator;
|
|
|
|
invoke-virtual {p1}, Landroid/animation/ValueAnimator;->start()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private d(Z)V
|
|
.locals 3
|
|
|
|
.line 342
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->p:Lcom/moji/lottie/CompositionLayer;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 343
|
|
iput-boolean p1, p0, Lcom/moji/lottie/LottieDrawable;->l:Z
|
|
|
|
const/4 p1, 0x1
|
|
|
|
.line 344
|
|
iput-boolean p1, p0, Lcom/moji/lottie/LottieDrawable;->m:Z
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 348
|
|
iget-object p1, p0, Lcom/moji/lottie/LottieDrawable;->d:Landroid/animation/ValueAnimator;
|
|
|
|
iget v0, p0, Lcom/moji/lottie/LottieDrawable;->g:F
|
|
|
|
iget-object v1, p0, Lcom/moji/lottie/LottieDrawable;->d:Landroid/animation/ValueAnimator;
|
|
|
|
invoke-virtual {v1}, Landroid/animation/ValueAnimator;->getDuration()J
|
|
|
|
move-result-wide v1
|
|
|
|
long-to-float v1, v1
|
|
|
|
mul-float v0, v0, v1
|
|
|
|
float-to-long v0, v0
|
|
|
|
invoke-virtual {p1, v0, v1}, Landroid/animation/ValueAnimator;->setCurrentPlayTime(J)V
|
|
|
|
.line 350
|
|
:cond_1
|
|
iget-object p1, p0, Lcom/moji/lottie/LottieDrawable;->d:Landroid/animation/ValueAnimator;
|
|
|
|
invoke-virtual {p1}, Landroid/animation/ValueAnimator;->reverse()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private l()V
|
|
.locals 4
|
|
|
|
.line 177
|
|
new-instance v0, Lcom/moji/lottie/CompositionLayer;
|
|
|
|
iget-object v1, p0, Lcom/moji/lottie/LottieDrawable;->c:Lcom/moji/lottie/LottieComposition;
|
|
|
|
.line 178
|
|
invoke-static {v1}, Lcom/moji/lottie/Layer$Factory;->a(Lcom/moji/lottie/LottieComposition;)Lcom/moji/lottie/Layer;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v2, p0, Lcom/moji/lottie/LottieDrawable;->c:Lcom/moji/lottie/LottieComposition;
|
|
|
|
invoke-virtual {v2}, Lcom/moji/lottie/LottieComposition;->d()Ljava/util/List;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object v3, p0, Lcom/moji/lottie/LottieDrawable;->c:Lcom/moji/lottie/LottieComposition;
|
|
|
|
invoke-direct {v0, p0, v1, v2, v3}, Lcom/moji/lottie/CompositionLayer;-><init>(Lcom/moji/lottie/LottieDrawable;Lcom/moji/lottie/Layer;Ljava/util/List;Lcom/moji/lottie/LottieComposition;)V
|
|
|
|
iput-object v0, p0, Lcom/moji/lottie/LottieDrawable;->p:Lcom/moji/lottie/CompositionLayer;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private m()V
|
|
.locals 5
|
|
|
|
.line 182
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->p:Lcom/moji/lottie/CompositionLayer;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 186
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->h:Ljava/util/Set;
|
|
|
|
invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/moji/lottie/LottieDrawable$ColorFilterData;
|
|
|
|
.line 187
|
|
iget-object v2, p0, Lcom/moji/lottie/LottieDrawable;->p:Lcom/moji/lottie/CompositionLayer;
|
|
|
|
iget-object v3, v1, Lcom/moji/lottie/LottieDrawable$ColorFilterData;->a:Ljava/lang/String;
|
|
|
|
iget-object v4, v1, Lcom/moji/lottie/LottieDrawable$ColorFilterData;->b:Ljava/lang/String;
|
|
|
|
iget-object v1, v1, Lcom/moji/lottie/LottieDrawable$ColorFilterData;->c:Landroid/graphics/ColorFilter;
|
|
|
|
invoke-virtual {v2, v3, v4, v1}, Lcom/moji/lottie/CompositionLayer;->a(Ljava/lang/String;Ljava/lang/String;Landroid/graphics/ColorFilter;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method private n()V
|
|
.locals 1
|
|
|
|
.line 192
|
|
invoke-virtual {p0}, Lcom/moji/lottie/LottieDrawable;->b()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 193
|
|
iput-object v0, p0, Lcom/moji/lottie/LottieDrawable;->p:Lcom/moji/lottie/CompositionLayer;
|
|
|
|
.line 194
|
|
iput-object v0, p0, Lcom/moji/lottie/LottieDrawable;->i:Lcom/moji/lottie/ImageAssetBitmapManager;
|
|
|
|
.line 195
|
|
invoke-virtual {p0}, Lcom/moji/lottie/LottieDrawable;->invalidateSelf()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private o()V
|
|
.locals 3
|
|
|
|
.line 413
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->c:Lcom/moji/lottie/LottieComposition;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 416
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->c:Lcom/moji/lottie/LottieComposition;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/lottie/LottieComposition;->a()Landroid/graphics/Rect;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/graphics/Rect;->width()I
|
|
|
|
move-result v0
|
|
|
|
int-to-float v0, v0
|
|
|
|
iget v1, p0, Lcom/moji/lottie/LottieDrawable;->f:F
|
|
|
|
mul-float v0, v0, v1
|
|
|
|
float-to-int v0, v0
|
|
|
|
iget-object v1, p0, Lcom/moji/lottie/LottieDrawable;->c:Lcom/moji/lottie/LottieComposition;
|
|
|
|
.line 417
|
|
invoke-virtual {v1}, Lcom/moji/lottie/LottieComposition;->a()Landroid/graphics/Rect;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Landroid/graphics/Rect;->height()I
|
|
|
|
move-result v1
|
|
|
|
int-to-float v1, v1
|
|
|
|
iget v2, p0, Lcom/moji/lottie/LottieDrawable;->f:F
|
|
|
|
mul-float v1, v1, v2
|
|
|
|
float-to-int v1, v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
.line 416
|
|
invoke-virtual {p0, v2, v2, v0, v1}, Lcom/moji/lottie/LottieDrawable;->setBounds(IIII)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private p()Lcom/moji/lottie/ImageAssetBitmapManager;
|
|
.locals 5
|
|
|
|
.line 458
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->i:Lcom/moji/lottie/ImageAssetBitmapManager;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->i:Lcom/moji/lottie/ImageAssetBitmapManager;
|
|
|
|
invoke-direct {p0}, Lcom/moji/lottie/LottieDrawable;->q()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lcom/moji/lottie/ImageAssetBitmapManager;->a(Landroid/content/Context;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 459
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->i:Lcom/moji/lottie/ImageAssetBitmapManager;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/lottie/ImageAssetBitmapManager;->a()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 460
|
|
iput-object v0, p0, Lcom/moji/lottie/LottieDrawable;->i:Lcom/moji/lottie/ImageAssetBitmapManager;
|
|
|
|
.line 463
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->i:Lcom/moji/lottie/ImageAssetBitmapManager;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
.line 464
|
|
new-instance v0, Lcom/moji/lottie/ImageAssetBitmapManager;
|
|
|
|
invoke-virtual {p0}, Lcom/moji/lottie/LottieDrawable;->getCallback()Landroid/graphics/drawable/Drawable$Callback;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v2, p0, Lcom/moji/lottie/LottieDrawable;->j:Ljava/lang/String;
|
|
|
|
iget-object v3, p0, Lcom/moji/lottie/LottieDrawable;->k:Lcom/moji/lottie/ImageAssetDelegate;
|
|
|
|
iget-object v4, p0, Lcom/moji/lottie/LottieDrawable;->c:Lcom/moji/lottie/LottieComposition;
|
|
|
|
.line 465
|
|
invoke-virtual {v4}, Lcom/moji/lottie/LottieComposition;->e()Ljava/util/Map;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-direct {v0, v1, v2, v3, v4}, Lcom/moji/lottie/ImageAssetBitmapManager;-><init>(Landroid/graphics/drawable/Drawable$Callback;Ljava/lang/String;Lcom/moji/lottie/ImageAssetDelegate;Ljava/util/Map;)V
|
|
|
|
iput-object v0, p0, Lcom/moji/lottie/LottieDrawable;->i:Lcom/moji/lottie/ImageAssetBitmapManager;
|
|
|
|
.line 468
|
|
:cond_1
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->i:Lcom/moji/lottie/ImageAssetBitmapManager;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private q()Landroid/content/Context;
|
|
.locals 3
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
|
|
.line 473
|
|
invoke-virtual {p0}, Lcom/moji/lottie/LottieDrawable;->getCallback()Landroid/graphics/drawable/Drawable$Callback;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-object v1
|
|
|
|
.line 478
|
|
:cond_0
|
|
instance-of v2, v0, Landroid/view/View;
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
.line 479
|
|
check-cast v0, Landroid/view/View;
|
|
|
|
invoke-virtual {v0}, Landroid/view/View;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
|
|
:cond_1
|
|
return-object v1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(F)V
|
|
.locals 3
|
|
|
|
.line 354
|
|
iput p1, p0, Lcom/moji/lottie/LottieDrawable;->e:F
|
|
|
|
const/4 v0, 0x2
|
|
|
|
const/4 v1, 0x0
|
|
|
|
cmpg-float v1, p1, v1
|
|
|
|
if-gez v1, :cond_0
|
|
|
|
.line 356
|
|
iget-object v1, p0, Lcom/moji/lottie/LottieDrawable;->d:Landroid/animation/ValueAnimator;
|
|
|
|
new-array v0, v0, [F
|
|
|
|
fill-array-data v0, :array_0
|
|
|
|
invoke-virtual {v1, v0}, Landroid/animation/ValueAnimator;->setFloatValues([F)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 358
|
|
:cond_0
|
|
iget-object v1, p0, Lcom/moji/lottie/LottieDrawable;->d:Landroid/animation/ValueAnimator;
|
|
|
|
new-array v0, v0, [F
|
|
|
|
fill-array-data v0, :array_1
|
|
|
|
invoke-virtual {v1, v0}, Landroid/animation/ValueAnimator;->setFloatValues([F)V
|
|
|
|
.line 361
|
|
:goto_0
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->c:Lcom/moji/lottie/LottieComposition;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 362
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->d:Landroid/animation/ValueAnimator;
|
|
|
|
iget-object v1, p0, Lcom/moji/lottie/LottieDrawable;->c:Lcom/moji/lottie/LottieComposition;
|
|
|
|
invoke-virtual {v1}, Lcom/moji/lottie/LottieComposition;->b()J
|
|
|
|
move-result-wide v1
|
|
|
|
long-to-float v1, v1
|
|
|
|
invoke-static {p1}, Ljava/lang/Math;->abs(F)F
|
|
|
|
move-result p1
|
|
|
|
div-float/2addr v1, p1
|
|
|
|
float-to-long v1, v1
|
|
|
|
invoke-virtual {v0, v1, v2}, Landroid/animation/ValueAnimator;->setDuration(J)Landroid/animation/ValueAnimator;
|
|
|
|
:cond_1
|
|
return-void
|
|
|
|
:array_0
|
|
.array-data 4
|
|
0x3f800000 # 1.0f
|
|
0x0
|
|
.end array-data
|
|
|
|
:array_1
|
|
.array-data 4
|
|
0x0
|
|
0x3f800000 # 1.0f
|
|
.end array-data
|
|
.end method
|
|
|
|
.method public a(Landroid/animation/Animator$AnimatorListener;)V
|
|
.locals 1
|
|
|
|
.line 435
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->d:Landroid/animation/ValueAnimator;
|
|
|
|
invoke-virtual {v0, p1}, Landroid/animation/ValueAnimator;->addListener(Landroid/animation/Animator$AnimatorListener;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public a(Lcom/moji/lottie/ImageAssetDelegate;)V
|
|
.locals 1
|
|
|
|
.line 398
|
|
iput-object p1, p0, Lcom/moji/lottie/LottieDrawable;->k:Lcom/moji/lottie/ImageAssetDelegate;
|
|
|
|
.line 399
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->i:Lcom/moji/lottie/ImageAssetBitmapManager;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 400
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->i:Lcom/moji/lottie/ImageAssetBitmapManager;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/moji/lottie/ImageAssetBitmapManager;->a(Lcom/moji/lottie/ImageAssetDelegate;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public a(Ljava/lang/String;)V
|
|
.locals 0
|
|
.param p1 # Ljava/lang/String;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 123
|
|
iput-object p1, p0, Lcom/moji/lottie/LottieDrawable;->j:Ljava/lang/String;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public a(Z)V
|
|
.locals 2
|
|
|
|
.line 99
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x13
|
|
|
|
if-ge v0, v1, :cond_0
|
|
|
|
.line 100
|
|
sget-object p1, Lcom/moji/lottie/LottieDrawable;->a:Ljava/lang/String;
|
|
|
|
const-string v0, "Merge paths are not supported pre-Kit Kat."
|
|
|
|
invoke-static {p1, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
return-void
|
|
|
|
.line 103
|
|
:cond_0
|
|
iput-boolean p1, p0, Lcom/moji/lottie/LottieDrawable;->o:Z
|
|
|
|
.line 104
|
|
iget-object p1, p0, Lcom/moji/lottie/LottieDrawable;->c:Lcom/moji/lottie/LottieComposition;
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 105
|
|
invoke-direct {p0}, Lcom/moji/lottie/LottieDrawable;->l()V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method a()Z
|
|
.locals 1
|
|
|
|
.line 88
|
|
iget-boolean v0, p0, Lcom/moji/lottie/LottieDrawable;->o:Z
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public a(Lcom/moji/lottie/LottieComposition;)Z
|
|
.locals 2
|
|
|
|
.line 143
|
|
invoke-virtual {p0}, Lcom/moji/lottie/LottieDrawable;->getCallback()Landroid/graphics/drawable/Drawable$Callback;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
.line 151
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->c:Lcom/moji/lottie/LottieComposition;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-ne v0, p1, :cond_0
|
|
|
|
return v1
|
|
|
|
.line 155
|
|
:cond_0
|
|
invoke-direct {p0}, Lcom/moji/lottie/LottieDrawable;->n()V
|
|
|
|
.line 156
|
|
iput-object p1, p0, Lcom/moji/lottie/LottieDrawable;->c:Lcom/moji/lottie/LottieComposition;
|
|
|
|
.line 157
|
|
iget p1, p0, Lcom/moji/lottie/LottieDrawable;->e:F
|
|
|
|
invoke-virtual {p0, p1}, Lcom/moji/lottie/LottieDrawable;->a(F)V
|
|
|
|
const/high16 p1, 0x3f800000 # 1.0f
|
|
|
|
.line 158
|
|
invoke-virtual {p0, p1}, Lcom/moji/lottie/LottieDrawable;->c(F)V
|
|
|
|
.line 159
|
|
invoke-direct {p0}, Lcom/moji/lottie/LottieDrawable;->o()V
|
|
|
|
.line 160
|
|
invoke-direct {p0}, Lcom/moji/lottie/LottieDrawable;->l()V
|
|
|
|
.line 161
|
|
invoke-direct {p0}, Lcom/moji/lottie/LottieDrawable;->m()V
|
|
|
|
.line 163
|
|
iget p1, p0, Lcom/moji/lottie/LottieDrawable;->g:F
|
|
|
|
invoke-virtual {p0, p1}, Lcom/moji/lottie/LottieDrawable;->b(F)V
|
|
|
|
.line 164
|
|
iget-boolean p1, p0, Lcom/moji/lottie/LottieDrawable;->l:Z
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 165
|
|
iput-boolean v1, p0, Lcom/moji/lottie/LottieDrawable;->l:Z
|
|
|
|
.line 166
|
|
invoke-virtual {p0}, Lcom/moji/lottie/LottieDrawable;->f()V
|
|
|
|
.line 168
|
|
:cond_1
|
|
iget-boolean p1, p0, Lcom/moji/lottie/LottieDrawable;->m:Z
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
.line 169
|
|
iput-boolean v1, p0, Lcom/moji/lottie/LottieDrawable;->m:Z
|
|
|
|
.line 170
|
|
invoke-virtual {p0}, Lcom/moji/lottie/LottieDrawable;->g()V
|
|
|
|
:cond_2
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
|
|
.line 144
|
|
:cond_3
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v0, "You or your view must set a Drawable.Callback before setting the composition. This gets done automatically when added to an ImageView. Either call ImageView.setImageDrawable() before setComposition() or call setCallback(yourView.getCallback()) first."
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method b(Ljava/lang/String;)Landroid/graphics/Bitmap;
|
|
.locals 1
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
|
|
.line 454
|
|
invoke-direct {p0}, Lcom/moji/lottie/LottieDrawable;->p()Lcom/moji/lottie/ImageAssetBitmapManager;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Lcom/moji/lottie/ImageAssetBitmapManager;->a(Ljava/lang/String;)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public b()V
|
|
.locals 1
|
|
|
|
.line 134
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->i:Lcom/moji/lottie/ImageAssetBitmapManager;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 135
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->i:Lcom/moji/lottie/ImageAssetBitmapManager;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/lottie/ImageAssetBitmapManager;->a()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public b(F)V
|
|
.locals 1
|
|
.param p1 # F
|
|
.annotation build Landroid/support/annotation/FloatRange;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 367
|
|
iput p1, p0, Lcom/moji/lottie/LottieDrawable;->g:F
|
|
|
|
.line 368
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->p:Lcom/moji/lottie/CompositionLayer;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 369
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->p:Lcom/moji/lottie/CompositionLayer;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/moji/lottie/CompositionLayer;->a(F)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public b(Landroid/animation/Animator$AnimatorListener;)V
|
|
.locals 1
|
|
|
|
.line 439
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->d:Landroid/animation/ValueAnimator;
|
|
|
|
invoke-virtual {v0, p1}, Landroid/animation/ValueAnimator;->removeListener(Landroid/animation/Animator$AnimatorListener;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public b(Z)V
|
|
.locals 1
|
|
|
|
.line 302
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->d:Landroid/animation/ValueAnimator;
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/4 p1, -0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
:goto_0
|
|
invoke-virtual {v0, p1}, Landroid/animation/ValueAnimator;->setRepeatCount(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method c()V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 298
|
|
iput-boolean v0, p0, Lcom/moji/lottie/LottieDrawable;->n:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public c(F)V
|
|
.locals 0
|
|
|
|
.line 387
|
|
iput p1, p0, Lcom/moji/lottie/LottieDrawable;->f:F
|
|
|
|
.line 388
|
|
invoke-direct {p0}, Lcom/moji/lottie/LottieDrawable;->o()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public d()Z
|
|
.locals 2
|
|
|
|
.line 306
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->d:Landroid/animation/ValueAnimator;
|
|
|
|
invoke-virtual {v0}, Landroid/animation/ValueAnimator;->getRepeatCount()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, -0x1
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public draw(Landroid/graphics/Canvas;)V
|
|
.locals 3
|
|
.param p1 # Landroid/graphics/Canvas;
|
|
.annotation build Landroid/support/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 289
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->p:Lcom/moji/lottie/CompositionLayer;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 292
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->b:Landroid/graphics/Matrix;
|
|
|
|
invoke-virtual {v0}, Landroid/graphics/Matrix;->reset()V
|
|
|
|
.line 293
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->b:Landroid/graphics/Matrix;
|
|
|
|
iget v1, p0, Lcom/moji/lottie/LottieDrawable;->f:F
|
|
|
|
iget v2, p0, Lcom/moji/lottie/LottieDrawable;->f:F
|
|
|
|
invoke-virtual {v0, v1, v2}, Landroid/graphics/Matrix;->preScale(FF)Z
|
|
|
|
.line 294
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->p:Lcom/moji/lottie/CompositionLayer;
|
|
|
|
iget-object v1, p0, Lcom/moji/lottie/LottieDrawable;->b:Landroid/graphics/Matrix;
|
|
|
|
iget v2, p0, Lcom/moji/lottie/LottieDrawable;->q:I
|
|
|
|
invoke-virtual {v0, p1, v1, v2}, Lcom/moji/lottie/CompositionLayer;->a(Landroid/graphics/Canvas;Landroid/graphics/Matrix;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public e()Z
|
|
.locals 1
|
|
|
|
.line 310
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->d:Landroid/animation/ValueAnimator;
|
|
|
|
invoke-virtual {v0}, Landroid/animation/ValueAnimator;->isRunning()Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public f()V
|
|
.locals 5
|
|
|
|
.line 314
|
|
iget v0, p0, Lcom/moji/lottie/LottieDrawable;->g:F
|
|
|
|
float-to-double v0, v0
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
cmpl-double v4, v0, v2
|
|
|
|
if-lez v4, :cond_0
|
|
|
|
iget v0, p0, Lcom/moji/lottie/LottieDrawable;->g:F
|
|
|
|
float-to-double v0, v0
|
|
|
|
const-wide/high16 v2, 0x3ff0000000000000L # 1.0
|
|
|
|
cmpg-double v4, v0, v2
|
|
|
|
if-gez v4, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
invoke-direct {p0, v0}, Lcom/moji/lottie/LottieDrawable;->c(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public g()V
|
|
.locals 5
|
|
|
|
.line 338
|
|
iget v0, p0, Lcom/moji/lottie/LottieDrawable;->g:F
|
|
|
|
float-to-double v0, v0
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
cmpl-double v4, v0, v2
|
|
|
|
if-lez v4, :cond_0
|
|
|
|
iget v0, p0, Lcom/moji/lottie/LottieDrawable;->g:F
|
|
|
|
float-to-double v0, v0
|
|
|
|
const-wide/high16 v2, 0x3ff0000000000000L # 1.0
|
|
|
|
cmpg-double v4, v0, v2
|
|
|
|
if-gez v4, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
invoke-direct {p0, v0}, Lcom/moji/lottie/LottieDrawable;->d(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public getAlpha()I
|
|
.locals 1
|
|
|
|
.line 213
|
|
iget v0, p0, Lcom/moji/lottie/LottieDrawable;->q:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getIntrinsicHeight()I
|
|
.locals 2
|
|
|
|
.line 449
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->c:Lcom/moji/lottie/LottieComposition;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 v0, -0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->c:Lcom/moji/lottie/LottieComposition;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/lottie/LottieComposition;->a()Landroid/graphics/Rect;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/graphics/Rect;->height()I
|
|
|
|
move-result v0
|
|
|
|
int-to-float v0, v0
|
|
|
|
iget v1, p0, Lcom/moji/lottie/LottieDrawable;->f:F
|
|
|
|
mul-float v0, v0, v1
|
|
|
|
float-to-int v0, v0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public getIntrinsicWidth()I
|
|
.locals 2
|
|
|
|
.line 444
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->c:Lcom/moji/lottie/LottieComposition;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 v0, -0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->c:Lcom/moji/lottie/LottieComposition;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/lottie/LottieComposition;->a()Landroid/graphics/Rect;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/graphics/Rect;->width()I
|
|
|
|
move-result v0
|
|
|
|
int-to-float v0, v0
|
|
|
|
iget v1, p0, Lcom/moji/lottie/LottieDrawable;->f:F
|
|
|
|
mul-float v0, v0, v1
|
|
|
|
float-to-int v0, v0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public getOpacity()I
|
|
.locals 1
|
|
|
|
const/4 v0, -0x3
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public h()F
|
|
.locals 1
|
|
|
|
.line 374
|
|
iget v0, p0, Lcom/moji/lottie/LottieDrawable;->g:F
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public i()F
|
|
.locals 1
|
|
|
|
.line 405
|
|
iget v0, p0, Lcom/moji/lottie/LottieDrawable;->f:F
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public invalidateDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
.locals 0
|
|
.param p1 # Landroid/graphics/drawable/Drawable;
|
|
.annotation build Landroid/support/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 490
|
|
invoke-virtual {p0}, Lcom/moji/lottie/LottieDrawable;->getCallback()Landroid/graphics/drawable/Drawable$Callback;
|
|
|
|
move-result-object p1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 494
|
|
:cond_0
|
|
invoke-interface {p1, p0}, Landroid/graphics/drawable/Drawable$Callback;->invalidateDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public invalidateSelf()V
|
|
.locals 1
|
|
|
|
.line 200
|
|
invoke-virtual {p0}, Lcom/moji/lottie/LottieDrawable;->getCallback()Landroid/graphics/drawable/Drawable$Callback;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 202
|
|
invoke-interface {v0, p0}, Landroid/graphics/drawable/Drawable$Callback;->invalidateDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public j()Lcom/moji/lottie/LottieComposition;
|
|
.locals 1
|
|
|
|
.line 409
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->c:Lcom/moji/lottie/LottieComposition;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public k()V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 421
|
|
iput-boolean v0, p0, Lcom/moji/lottie/LottieDrawable;->l:Z
|
|
|
|
.line 422
|
|
iput-boolean v0, p0, Lcom/moji/lottie/LottieDrawable;->m:Z
|
|
|
|
.line 423
|
|
iget-object v0, p0, Lcom/moji/lottie/LottieDrawable;->d:Landroid/animation/ValueAnimator;
|
|
|
|
invoke-virtual {v0}, Landroid/animation/ValueAnimator;->cancel()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public scheduleDrawable(Landroid/graphics/drawable/Drawable;Ljava/lang/Runnable;J)V
|
|
.locals 0
|
|
.param p1 # Landroid/graphics/drawable/Drawable;
|
|
.annotation build Landroid/support/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Ljava/lang/Runnable;
|
|
.annotation build Landroid/support/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 499
|
|
invoke-virtual {p0}, Lcom/moji/lottie/LottieDrawable;->getCallback()Landroid/graphics/drawable/Drawable$Callback;
|
|
|
|
move-result-object p1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 503
|
|
:cond_0
|
|
invoke-interface {p1, p0, p2, p3, p4}, Landroid/graphics/drawable/Drawable$Callback;->scheduleDrawable(Landroid/graphics/drawable/Drawable;Ljava/lang/Runnable;J)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setAlpha(I)V
|
|
.locals 0
|
|
.param p1 # I
|
|
.annotation build Landroid/support/annotation/IntRange;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 208
|
|
iput p1, p0, Lcom/moji/lottie/LottieDrawable;->q:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setColorFilter(Landroid/graphics/ColorFilter;)V
|
|
.locals 0
|
|
.param p1 # Landroid/graphics/ColorFilter;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public unscheduleDrawable(Landroid/graphics/drawable/Drawable;Ljava/lang/Runnable;)V
|
|
.locals 0
|
|
.param p1 # Landroid/graphics/drawable/Drawable;
|
|
.annotation build Landroid/support/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Ljava/lang/Runnable;
|
|
.annotation build Landroid/support/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 508
|
|
invoke-virtual {p0}, Lcom/moji/lottie/LottieDrawable;->getCallback()Landroid/graphics/drawable/Drawable$Callback;
|
|
|
|
move-result-object p1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 512
|
|
:cond_0
|
|
invoke-interface {p1, p0, p2}, Landroid/graphics/drawable/Drawable$Callback;->unscheduleDrawable(Landroid/graphics/drawable/Drawable;Ljava/lang/Runnable;)V
|
|
|
|
return-void
|
|
.end method
|