545 lines
13 KiB
Smali
545 lines
13 KiB
Smali
.class public Lf/d/a/w/l/d;
|
|
.super Lf/d/a/w/l/b;
|
|
.source "ImageLayer.java"
|
|
|
|
|
|
# instance fields
|
|
.field public A:Lf/d/a/u/c/a;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lf/d/a/u/c/a<",
|
|
"Landroid/graphics/ColorFilter;",
|
|
"Landroid/graphics/ColorFilter;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final x:Landroid/graphics/Paint;
|
|
|
|
.field public final y:Landroid/graphics/Rect;
|
|
|
|
.field public final z:Landroid/graphics/Rect;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lf/d/a/h;Lf/d/a/w/l/e;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1, p2}, Lf/d/a/w/l/b;-><init>(Lf/d/a/h;Lf/d/a/w/l/e;)V
|
|
|
|
new-instance p1, Lf/d/a/u/a;
|
|
|
|
const/4 p2, 0x3
|
|
|
|
invoke-direct {p1, p2}, Lf/d/a/u/a;-><init>(I)V
|
|
|
|
iput-object p1, p0, Lf/d/a/w/l/d;->x:Landroid/graphics/Paint;
|
|
|
|
new-instance p1, Landroid/graphics/Rect;
|
|
|
|
invoke-direct {p1}, Landroid/graphics/Rect;-><init>()V
|
|
|
|
iput-object p1, p0, Lf/d/a/w/l/d;->y:Landroid/graphics/Rect;
|
|
|
|
new-instance p1, Landroid/graphics/Rect;
|
|
|
|
invoke-direct {p1}, Landroid/graphics/Rect;-><init>()V
|
|
|
|
iput-object p1, p0, Lf/d/a/w/l/d;->z:Landroid/graphics/Rect;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public d(Landroid/graphics/RectF;Landroid/graphics/Matrix;Z)V
|
|
.locals 1
|
|
|
|
invoke-super {p0, p1, p2, p3}, Lf/d/a/w/l/b;->d(Landroid/graphics/RectF;Landroid/graphics/Matrix;Z)V
|
|
|
|
invoke-virtual {p0}, Lf/d/a/w/l/d;->q()Landroid/graphics/Bitmap;
|
|
|
|
move-result-object p2
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
invoke-virtual {p2}, Landroid/graphics/Bitmap;->getWidth()I
|
|
|
|
move-result p3
|
|
|
|
int-to-float p3, p3
|
|
|
|
invoke-static {}, Lf/d/a/z/g;->e()F
|
|
|
|
move-result v0
|
|
|
|
mul-float v0, v0, p3
|
|
|
|
invoke-virtual {p2}, Landroid/graphics/Bitmap;->getHeight()I
|
|
|
|
move-result p2
|
|
|
|
int-to-float p2, p2
|
|
|
|
invoke-static {}, Lf/d/a/z/g;->e()F
|
|
|
|
move-result p3
|
|
|
|
mul-float p3, p3, p2
|
|
|
|
const/4 p2, 0x0
|
|
|
|
invoke-virtual {p1, p2, p2, v0, p3}, Landroid/graphics/RectF;->set(FFFF)V
|
|
|
|
iget-object p2, p0, Lf/d/a/w/l/b;->m:Landroid/graphics/Matrix;
|
|
|
|
invoke-virtual {p2, p1}, Landroid/graphics/Matrix;->mapRect(Landroid/graphics/RectF;)Z
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public g(Ljava/lang/Object;Lf/d/a/a0/c;)V
|
|
.locals 1
|
|
.param p2 # Lf/d/a/a0/c;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">(TT;",
|
|
"Lf/d/a/a0/c<",
|
|
"TT;>;)V"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lf/d/a/w/l/b;->v:Lf/d/a/u/c/o;
|
|
|
|
invoke-virtual {v0, p1, p2}, Lf/d/a/u/c/o;->c(Ljava/lang/Object;Lf/d/a/a0/c;)Z
|
|
|
|
sget-object v0, Lf/d/a/m;->C:Landroid/graphics/ColorFilter;
|
|
|
|
if-ne p1, v0, :cond_1
|
|
|
|
const/4 p1, 0x0
|
|
|
|
if-nez p2, :cond_0
|
|
|
|
iput-object p1, p0, Lf/d/a/w/l/d;->A:Lf/d/a/u/c/a;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
new-instance v0, Lf/d/a/u/c/p;
|
|
|
|
invoke-direct {v0, p2, p1}, Lf/d/a/u/c/p;-><init>(Lf/d/a/a0/c;Ljava/lang/Object;)V
|
|
|
|
iput-object v0, p0, Lf/d/a/w/l/d;->A:Lf/d/a/u/c/a;
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public j(Landroid/graphics/Canvas;Landroid/graphics/Matrix;I)V
|
|
.locals 4
|
|
.param p1 # Landroid/graphics/Canvas;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-virtual {p0}, Lf/d/a/w/l/d;->q()Landroid/graphics/Bitmap;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-virtual {v0}, Landroid/graphics/Bitmap;->isRecycled()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-static {}, Lf/d/a/z/g;->e()F
|
|
|
|
move-result v1
|
|
|
|
iget-object v2, p0, Lf/d/a/w/l/d;->x:Landroid/graphics/Paint;
|
|
|
|
invoke-virtual {v2, p3}, Landroid/graphics/Paint;->setAlpha(I)V
|
|
|
|
iget-object p3, p0, Lf/d/a/w/l/d;->A:Lf/d/a/u/c/a;
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
iget-object v2, p0, Lf/d/a/w/l/d;->x:Landroid/graphics/Paint;
|
|
|
|
invoke-virtual {p3}, Lf/d/a/u/c/a;->e()Ljava/lang/Object;
|
|
|
|
move-result-object p3
|
|
|
|
check-cast p3, Landroid/graphics/ColorFilter;
|
|
|
|
invoke-virtual {v2, p3}, Landroid/graphics/Paint;->setColorFilter(Landroid/graphics/ColorFilter;)Landroid/graphics/ColorFilter;
|
|
|
|
:cond_1
|
|
invoke-virtual {p1}, Landroid/graphics/Canvas;->save()I
|
|
|
|
invoke-virtual {p1, p2}, Landroid/graphics/Canvas;->concat(Landroid/graphics/Matrix;)V
|
|
|
|
iget-object p2, p0, Lf/d/a/w/l/d;->y:Landroid/graphics/Rect;
|
|
|
|
invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I
|
|
|
|
move-result p3
|
|
|
|
invoke-virtual {v0}, Landroid/graphics/Bitmap;->getHeight()I
|
|
|
|
move-result v2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-virtual {p2, v3, v3, p3, v2}, Landroid/graphics/Rect;->set(IIII)V
|
|
|
|
iget-object p2, p0, Lf/d/a/w/l/d;->z:Landroid/graphics/Rect;
|
|
|
|
invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I
|
|
|
|
move-result p3
|
|
|
|
int-to-float p3, p3
|
|
|
|
mul-float p3, p3, v1
|
|
|
|
float-to-int p3, p3
|
|
|
|
invoke-virtual {v0}, Landroid/graphics/Bitmap;->getHeight()I
|
|
|
|
move-result v2
|
|
|
|
int-to-float v2, v2
|
|
|
|
mul-float v2, v2, v1
|
|
|
|
float-to-int v1, v2
|
|
|
|
invoke-virtual {p2, v3, v3, p3, v1}, Landroid/graphics/Rect;->set(IIII)V
|
|
|
|
iget-object p2, p0, Lf/d/a/w/l/d;->y:Landroid/graphics/Rect;
|
|
|
|
iget-object p3, p0, Lf/d/a/w/l/d;->z:Landroid/graphics/Rect;
|
|
|
|
iget-object v1, p0, Lf/d/a/w/l/d;->x:Landroid/graphics/Paint;
|
|
|
|
invoke-virtual {p1, v0, p2, p3, v1}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Paint;)V
|
|
|
|
invoke-virtual {p1}, Landroid/graphics/Canvas;->restore()V
|
|
|
|
:cond_2
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final q()Landroid/graphics/Bitmap;
|
|
.locals 10
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lf/d/a/w/l/b;->o:Lf/d/a/w/l/e;
|
|
|
|
iget-object v0, v0, Lf/d/a/w/l/e;->g:Ljava/lang/String;
|
|
|
|
iget-object v1, p0, Lf/d/a/w/l/b;->n:Lf/d/a/h;
|
|
|
|
invoke-virtual {v1}, Landroid/graphics/drawable/Drawable;->getCallback()Landroid/graphics/drawable/Drawable$Callback;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x1
|
|
|
|
const/4 v5, 0x0
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
move-object v1, v5
|
|
|
|
goto :goto_3
|
|
|
|
:cond_0
|
|
iget-object v2, v1, Lf/d/a/h;->m:Lf/d/a/v/b;
|
|
|
|
if-eqz v2, :cond_6
|
|
|
|
invoke-virtual {v1}, Landroid/graphics/drawable/Drawable;->getCallback()Landroid/graphics/drawable/Drawable$Callback;
|
|
|
|
move-result-object v6
|
|
|
|
if-nez v6, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
instance-of v7, v6, Landroid/view/View;
|
|
|
|
if-eqz v7, :cond_2
|
|
|
|
check-cast v6, Landroid/view/View;
|
|
|
|
invoke-virtual {v6}, Landroid/view/View;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v6
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
:goto_0
|
|
move-object v6, v5
|
|
|
|
:goto_1
|
|
if-nez v6, :cond_3
|
|
|
|
iget-object v7, v2, Lf/d/a/v/b;->a:Landroid/content/Context;
|
|
|
|
if-eqz v7, :cond_4
|
|
|
|
:cond_3
|
|
iget-object v2, v2, Lf/d/a/v/b;->a:Landroid/content/Context;
|
|
|
|
invoke-virtual {v2, v6}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
:cond_4
|
|
const/4 v2, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_5
|
|
const/4 v2, 0x0
|
|
|
|
:goto_2
|
|
if-nez v2, :cond_6
|
|
|
|
iput-object v5, v1, Lf/d/a/h;->m:Lf/d/a/v/b;
|
|
|
|
:cond_6
|
|
iget-object v2, v1, Lf/d/a/h;->m:Lf/d/a/v/b;
|
|
|
|
if-nez v2, :cond_7
|
|
|
|
new-instance v2, Lf/d/a/v/b;
|
|
|
|
invoke-virtual {v1}, Landroid/graphics/drawable/Drawable;->getCallback()Landroid/graphics/drawable/Drawable$Callback;
|
|
|
|
move-result-object v6
|
|
|
|
iget-object v7, v1, Lf/d/a/h;->n:Ljava/lang/String;
|
|
|
|
iget-object v8, v1, Lf/d/a/h;->o:Lf/d/a/b;
|
|
|
|
iget-object v9, v1, Lf/d/a/h;->e:Lf/d/a/d;
|
|
|
|
iget-object v9, v9, Lf/d/a/d;->d:Ljava/util/Map;
|
|
|
|
invoke-direct {v2, v6, v7, v8, v9}, Lf/d/a/v/b;-><init>(Landroid/graphics/drawable/Drawable$Callback;Ljava/lang/String;Lf/d/a/b;Ljava/util/Map;)V
|
|
|
|
iput-object v2, v1, Lf/d/a/h;->m:Lf/d/a/v/b;
|
|
|
|
:cond_7
|
|
iget-object v1, v1, Lf/d/a/h;->m:Lf/d/a/v/b;
|
|
|
|
:goto_3
|
|
if-eqz v1, :cond_d
|
|
|
|
iget-object v2, v1, Lf/d/a/v/b;->d:Ljava/util/Map;
|
|
|
|
invoke-interface {v2, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lf/d/a/i;
|
|
|
|
if-nez v2, :cond_8
|
|
|
|
goto/16 :goto_4
|
|
|
|
:cond_8
|
|
iget-object v6, v2, Lf/d/a/i;->e:Landroid/graphics/Bitmap;
|
|
|
|
if-eqz v6, :cond_9
|
|
|
|
move-object v5, v6
|
|
|
|
goto/16 :goto_4
|
|
|
|
:cond_9
|
|
iget-object v6, v1, Lf/d/a/v/b;->c:Lf/d/a/b;
|
|
|
|
if-eqz v6, :cond_a
|
|
|
|
invoke-interface {v6, v2}, Lf/d/a/b;->a(Lf/d/a/i;)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object v5
|
|
|
|
if-eqz v5, :cond_d
|
|
|
|
invoke-virtual {v1, v0, v5}, Lf/d/a/v/b;->a(Ljava/lang/String;Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;
|
|
|
|
goto/16 :goto_4
|
|
|
|
:cond_a
|
|
iget-object v6, v2, Lf/d/a/i;->d:Ljava/lang/String;
|
|
|
|
new-instance v7, Landroid/graphics/BitmapFactory$Options;
|
|
|
|
invoke-direct {v7}, Landroid/graphics/BitmapFactory$Options;-><init>()V
|
|
|
|
iput-boolean v4, v7, Landroid/graphics/BitmapFactory$Options;->inScaled:Z
|
|
|
|
const/16 v8, 0xa0
|
|
|
|
iput v8, v7, Landroid/graphics/BitmapFactory$Options;->inDensity:I
|
|
|
|
const-string v8, "data:"
|
|
|
|
invoke-virtual {v6, v8}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
|
|
|
|
move-result v8
|
|
|
|
if-eqz v8, :cond_b
|
|
|
|
const-string v8, "base64,"
|
|
|
|
invoke-virtual {v6, v8}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I
|
|
|
|
move-result v8
|
|
|
|
if-lez v8, :cond_b
|
|
|
|
const/16 v2, 0x2c
|
|
|
|
:try_start_0
|
|
invoke-virtual {v6, v2}, Ljava/lang/String;->indexOf(I)I
|
|
|
|
move-result v2
|
|
|
|
add-int/2addr v2, v4
|
|
|
|
invoke-virtual {v6, v2}, Ljava/lang/String;->substring(I)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v2, v3}, Landroid/util/Base64;->decode(Ljava/lang/String;I)[B
|
|
|
|
move-result-object v2
|
|
:try_end_0
|
|
.catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
array-length v4, v2
|
|
|
|
invoke-static {v2, v3, v4, v7}, Landroid/graphics/BitmapFactory;->decodeByteArray([BIILandroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v1, v0, v5}, Lf/d/a/v/b;->a(Ljava/lang/String;Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;
|
|
|
|
goto :goto_4
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
const-string v1, "data URL did not have correct base64 format."
|
|
|
|
invoke-static {v1, v0}, Lf/d/a/z/c;->c(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
goto :goto_4
|
|
|
|
:cond_b
|
|
:try_start_1
|
|
iget-object v3, v1, Lf/d/a/v/b;->b:Ljava/lang/String;
|
|
|
|
invoke-static {v3}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v3
|
|
|
|
if-nez v3, :cond_c
|
|
|
|
iget-object v3, v1, Lf/d/a/v/b;->a:Landroid/content/Context;
|
|
|
|
invoke-virtual {v3}, Landroid/content/Context;->getAssets()Landroid/content/res/AssetManager;
|
|
|
|
move-result-object v3
|
|
|
|
new-instance v4, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
iget-object v8, v1, Lf/d/a/v/b;->b:Ljava/lang/String;
|
|
|
|
invoke-virtual {v4, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v4, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v3, v4}, Landroid/content/res/AssetManager;->open(Ljava/lang/String;)Ljava/io/InputStream;
|
|
|
|
move-result-object v3
|
|
:try_end_1
|
|
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_1
|
|
|
|
invoke-static {v3, v5, v7}, Landroid/graphics/BitmapFactory;->decodeStream(Ljava/io/InputStream;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object v3
|
|
|
|
iget v4, v2, Lf/d/a/i;->a:I
|
|
|
|
iget v2, v2, Lf/d/a/i;->b:I
|
|
|
|
invoke-static {v3, v4, v2}, Lf/d/a/z/g;->j(Landroid/graphics/Bitmap;II)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v1, v0, v5}, Lf/d/a/v/b;->a(Ljava/lang/String;Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;
|
|
|
|
goto :goto_4
|
|
|
|
:cond_c
|
|
:try_start_2
|
|
new-instance v0, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v1, "You must set an images folder before loading an image. Set it with LottieComposition#setImagesFolder or LottieDrawable#setImagesFolder"
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
:try_end_2
|
|
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_1
|
|
|
|
:catch_1
|
|
move-exception v0
|
|
|
|
const-string v1, "Unable to open asset."
|
|
|
|
invoke-static {v1, v0}, Lf/d/a/z/c;->c(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
:cond_d
|
|
:goto_4
|
|
return-object v5
|
|
.end method
|