ScalingUtils.smali
.class public Lcom/facebook/drawee/drawable/ScalingUtils;
.super Ljava/lang/Object;
.source "ScalingUtils.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/facebook/drawee/drawable/ScalingUtils$InterpolatingScaleType;,
Lcom/facebook/drawee/drawable/ScalingUtils$StatefulScaleType;,
Lcom/facebook/drawee/drawable/ScalingUtils$ScaleTypeFitY;,
Lcom/facebook/drawee/drawable/ScalingUtils$ScaleTypeFitX;,
Lcom/facebook/drawee/drawable/ScalingUtils$ScaleTypeFocusCrop;,
Lcom/facebook/drawee/drawable/ScalingUtils$ScaleTypeCenterCrop;,
Lcom/facebook/drawee/drawable/ScalingUtils$ScaleTypeCenterInside;,
Lcom/facebook/drawee/drawable/ScalingUtils$ScaleTypeCenter;,
Lcom/facebook/drawee/drawable/ScalingUtils$ScaleTypeFitEnd;,
Lcom/facebook/drawee/drawable/ScalingUtils$ScaleTypeFitCenter;,
Lcom/facebook/drawee/drawable/ScalingUtils$ScaleTypeFitBottomStart;,
Lcom/facebook/drawee/drawable/ScalingUtils$ScaleTypeFitStart;,
Lcom/facebook/drawee/drawable/ScalingUtils$ScaleTypeFitXY;,
Lcom/facebook/drawee/drawable/ScalingUtils$AbstractScaleType;,
Lcom/facebook/drawee/drawable/ScalingUtils$ScaleType;
}
.end annotation
# direct methods
.method public constructor <init>()V
.registers 1
.line 19
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static getActiveScaleTypeDrawable(Landroid/graphics/drawable/Drawable;)Lcom/facebook/drawee/drawable/ScaleTypeDrawable;
.registers 5
.param p0 # Landroid/graphics/drawable/Drawable;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0
}
names = {
"drawable"
}
.end annotation
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
const/4 v0, 0x0
if-nez p0, :cond_4
return-object v0
.line 131
:cond_4
instance-of v1, p0, Lcom/facebook/drawee/drawable/ScaleTypeDrawable;
if-eqz v1, :cond_b
.line 132
check-cast p0, Lcom/facebook/drawee/drawable/ScaleTypeDrawable;
return-object p0
.line 133
:cond_b
instance-of v1, p0, Lcom/facebook/drawee/drawable/DrawableParent;
if-eqz v1, :cond_1a
.line 134
check-cast p0, Lcom/facebook/drawee/drawable/DrawableParent;
invoke-interface {p0}, Lcom/facebook/drawee/drawable/DrawableParent;->getDrawable()Landroid/graphics/drawable/Drawable;
move-result-object p0
.line 135
invoke-static {p0}, Lcom/facebook/drawee/drawable/ScalingUtils;->getActiveScaleTypeDrawable(Landroid/graphics/drawable/Drawable;)Lcom/facebook/drawee/drawable/ScaleTypeDrawable;
move-result-object p0
return-object p0
.line 136
:cond_1a
instance-of v1, p0, Lcom/facebook/drawee/drawable/ArrayDrawable;
if-eqz v1, :cond_35
.line 137
check-cast p0, Lcom/facebook/drawee/drawable/ArrayDrawable;
.line 138
invoke-virtual {p0}, Lcom/facebook/drawee/drawable/ArrayDrawable;->getNumberOfLayers()I
move-result v1
const/4 v2, 0x0
:goto_25
if-ge v2, v1, :cond_35
.line 141
invoke-virtual {p0, v2}, Lcom/facebook/drawee/drawable/ArrayDrawable;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v3
.line 142
invoke-static {v3}, Lcom/facebook/drawee/drawable/ScalingUtils;->getActiveScaleTypeDrawable(Landroid/graphics/drawable/Drawable;)Lcom/facebook/drawee/drawable/ScaleTypeDrawable;
move-result-object v3
if-eqz v3, :cond_32
return-object v3
:cond_32
add-int/lit8 v2, v2, 0x1
goto :goto_25
:cond_35
return-object v0
.end method