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