599 lines
11 KiB
Smali
599 lines
11 KiB
Smali
.class public final Lcom/facebook/drawee/drawable/f;
|
|
.super Lcom/facebook/drawee/drawable/a;
|
|
.source "FadeDrawable.java"
|
|
|
|
|
|
# instance fields
|
|
.field private final LB:Z
|
|
|
|
.field private final LC:I
|
|
|
|
.field LD:I
|
|
|
|
.field LE:I
|
|
|
|
.field LF:J
|
|
|
|
.field LG:[I
|
|
|
|
.field LH:[I
|
|
|
|
.field LI:[Z
|
|
|
|
.field LJ:I
|
|
|
|
.field private final Lo:[Landroid/graphics/drawable/Drawable;
|
|
|
|
.field mAlpha:I
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>([Landroid/graphics/drawable/Drawable;)V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-direct {p0, p1, v0}, Lcom/facebook/drawee/drawable/f;-><init>([Landroid/graphics/drawable/Drawable;B)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>([Landroid/graphics/drawable/Drawable;B)V
|
|
.locals 3
|
|
|
|
invoke-direct {p0, p1}, Lcom/facebook/drawee/drawable/a;-><init>([Landroid/graphics/drawable/Drawable;)V
|
|
|
|
array-length p2, p1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-lez p2, :cond_0
|
|
|
|
const/4 p2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p2, 0x0
|
|
|
|
:goto_0
|
|
const-string v2, "At least one layer required!"
|
|
|
|
invoke-static {p2, v2}, Lcom/facebook/common/d/i;->a(ZLjava/lang/Object;)V
|
|
|
|
iput-object p1, p0, Lcom/facebook/drawee/drawable/f;->Lo:[Landroid/graphics/drawable/Drawable;
|
|
|
|
array-length p2, p1
|
|
|
|
new-array p2, p2, [I
|
|
|
|
iput-object p2, p0, Lcom/facebook/drawee/drawable/f;->LG:[I
|
|
|
|
array-length p2, p1
|
|
|
|
new-array p2, p2, [I
|
|
|
|
iput-object p2, p0, Lcom/facebook/drawee/drawable/f;->LH:[I
|
|
|
|
const/16 p2, 0xff
|
|
|
|
iput p2, p0, Lcom/facebook/drawee/drawable/f;->mAlpha:I
|
|
|
|
array-length p1, p1
|
|
|
|
new-array p1, p1, [Z
|
|
|
|
iput-object p1, p0, Lcom/facebook/drawee/drawable/f;->LI:[Z
|
|
|
|
iput v1, p0, Lcom/facebook/drawee/drawable/f;->LJ:I
|
|
|
|
iput-boolean v1, p0, Lcom/facebook/drawee/drawable/f;->LB:Z
|
|
|
|
iget-boolean p1, p0, Lcom/facebook/drawee/drawable/f;->LB:Z
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
const/16 p1, 0xff
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const/4 p1, 0x0
|
|
|
|
:goto_1
|
|
iput p1, p0, Lcom/facebook/drawee/drawable/f;->LC:I
|
|
|
|
const/4 p1, 0x2
|
|
|
|
iput p1, p0, Lcom/facebook/drawee/drawable/f;->LD:I
|
|
|
|
iget-object p1, p0, Lcom/facebook/drawee/drawable/f;->LG:[I
|
|
|
|
iget v2, p0, Lcom/facebook/drawee/drawable/f;->LC:I
|
|
|
|
invoke-static {p1, v2}, Ljava/util/Arrays;->fill([II)V
|
|
|
|
iget-object p1, p0, Lcom/facebook/drawee/drawable/f;->LG:[I
|
|
|
|
aput p2, p1, v1
|
|
|
|
iget-object p1, p0, Lcom/facebook/drawee/drawable/f;->LH:[I
|
|
|
|
iget v2, p0, Lcom/facebook/drawee/drawable/f;->LC:I
|
|
|
|
invoke-static {p1, v2}, Ljava/util/Arrays;->fill([II)V
|
|
|
|
iget-object p1, p0, Lcom/facebook/drawee/drawable/f;->LH:[I
|
|
|
|
aput p2, p1, v1
|
|
|
|
iget-object p1, p0, Lcom/facebook/drawee/drawable/f;->LI:[Z
|
|
|
|
iget-boolean p2, p0, Lcom/facebook/drawee/drawable/f;->LB:Z
|
|
|
|
invoke-static {p1, p2}, Ljava/util/Arrays;->fill([ZZ)V
|
|
|
|
iget-object p1, p0, Lcom/facebook/drawee/drawable/f;->LI:[Z
|
|
|
|
aput-boolean v0, p1, v1
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private j(F)Z
|
|
.locals 8
|
|
|
|
const/4 v0, 0x1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x1
|
|
|
|
:goto_0
|
|
iget-object v4, p0, Lcom/facebook/drawee/drawable/f;->Lo:[Landroid/graphics/drawable/Drawable;
|
|
|
|
array-length v4, v4
|
|
|
|
if-ge v2, v4, :cond_5
|
|
|
|
iget-object v4, p0, Lcom/facebook/drawee/drawable/f;->LI:[Z
|
|
|
|
aget-boolean v4, v4, v2
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
const/4 v4, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
const/4 v4, -0x1
|
|
|
|
:goto_1
|
|
iget-object v5, p0, Lcom/facebook/drawee/drawable/f;->LH:[I
|
|
|
|
iget-object v6, p0, Lcom/facebook/drawee/drawable/f;->LG:[I
|
|
|
|
aget v6, v6, v2
|
|
|
|
int-to-float v6, v6
|
|
|
|
const/16 v7, 0xff
|
|
|
|
mul-int/lit16 v4, v4, 0xff
|
|
|
|
int-to-float v4, v4
|
|
|
|
mul-float v4, v4, p1
|
|
|
|
add-float/2addr v6, v4
|
|
|
|
float-to-int v4, v6
|
|
|
|
aput v4, v5, v2
|
|
|
|
aget v4, v5, v2
|
|
|
|
if-gez v4, :cond_1
|
|
|
|
aput v1, v5, v2
|
|
|
|
:cond_1
|
|
iget-object v4, p0, Lcom/facebook/drawee/drawable/f;->LH:[I
|
|
|
|
aget v5, v4, v2
|
|
|
|
if-le v5, v7, :cond_2
|
|
|
|
aput v7, v4, v2
|
|
|
|
:cond_2
|
|
iget-object v4, p0, Lcom/facebook/drawee/drawable/f;->LI:[Z
|
|
|
|
aget-boolean v4, v4, v2
|
|
|
|
if-eqz v4, :cond_3
|
|
|
|
iget-object v4, p0, Lcom/facebook/drawee/drawable/f;->LH:[I
|
|
|
|
aget v4, v4, v2
|
|
|
|
if-ge v4, v7, :cond_3
|
|
|
|
const/4 v3, 0x0
|
|
|
|
:cond_3
|
|
iget-object v4, p0, Lcom/facebook/drawee/drawable/f;->LI:[Z
|
|
|
|
aget-boolean v4, v4, v2
|
|
|
|
if-nez v4, :cond_4
|
|
|
|
iget-object v4, p0, Lcom/facebook/drawee/drawable/f;->LH:[I
|
|
|
|
aget v4, v4, v2
|
|
|
|
if-lez v4, :cond_4
|
|
|
|
const/4 v3, 0x0
|
|
|
|
:cond_4
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_5
|
|
return v3
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final O(I)V
|
|
.locals 1
|
|
|
|
iput p1, p0, Lcom/facebook/drawee/drawable/f;->LE:I
|
|
|
|
iget p1, p0, Lcom/facebook/drawee/drawable/f;->LD:I
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-ne p1, v0, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
iput p1, p0, Lcom/facebook/drawee/drawable/f;->LD:I
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final P(I)V
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput v0, p0, Lcom/facebook/drawee/drawable/f;->LD:I
|
|
|
|
iget-object v0, p0, Lcom/facebook/drawee/drawable/f;->LI:[Z
|
|
|
|
const/4 v1, 0x1
|
|
|
|
aput-boolean v1, v0, p1
|
|
|
|
invoke-virtual {p0}, Lcom/facebook/drawee/drawable/f;->invalidateSelf()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final Q(I)V
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput v0, p0, Lcom/facebook/drawee/drawable/f;->LD:I
|
|
|
|
iget-object v1, p0, Lcom/facebook/drawee/drawable/f;->LI:[Z
|
|
|
|
aput-boolean v0, v1, p1
|
|
|
|
invoke-virtual {p0}, Lcom/facebook/drawee/drawable/f;->invalidateSelf()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final draw(Landroid/graphics/Canvas;)V
|
|
.locals 8
|
|
|
|
iget v0, p0, Lcom/facebook/drawee/drawable/f;->LD:I
|
|
|
|
const/4 v1, 0x2
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x1
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
if-eq v0, v3, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_4
|
|
|
|
:cond_0
|
|
iget v0, p0, Lcom/facebook/drawee/drawable/f;->LE:I
|
|
|
|
if-lez v0, :cond_1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
invoke-static {v0}, Lcom/facebook/common/d/i;->checkState(Z)V
|
|
|
|
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
|
|
|
|
move-result-wide v4
|
|
|
|
iget-wide v6, p0, Lcom/facebook/drawee/drawable/f;->LF:J
|
|
|
|
sub-long/2addr v4, v6
|
|
|
|
long-to-float v0, v4
|
|
|
|
iget v4, p0, Lcom/facebook/drawee/drawable/f;->LE:I
|
|
|
|
int-to-float v4, v4
|
|
|
|
div-float/2addr v0, v4
|
|
|
|
invoke-direct {p0, v0}, Lcom/facebook/drawee/drawable/f;->j(F)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const/4 v1, 0x1
|
|
|
|
:goto_1
|
|
iput v1, p0, Lcom/facebook/drawee/drawable/f;->LD:I
|
|
|
|
goto :goto_4
|
|
|
|
:cond_3
|
|
iget-object v0, p0, Lcom/facebook/drawee/drawable/f;->LH:[I
|
|
|
|
iget-object v4, p0, Lcom/facebook/drawee/drawable/f;->LG:[I
|
|
|
|
iget-object v5, p0, Lcom/facebook/drawee/drawable/f;->Lo:[Landroid/graphics/drawable/Drawable;
|
|
|
|
array-length v5, v5
|
|
|
|
invoke-static {v0, v2, v4, v2, v5}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
|
|
|
|
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
|
|
|
|
move-result-wide v4
|
|
|
|
iput-wide v4, p0, Lcom/facebook/drawee/drawable/f;->LF:J
|
|
|
|
iget v0, p0, Lcom/facebook/drawee/drawable/f;->LE:I
|
|
|
|
if-nez v0, :cond_4
|
|
|
|
const/high16 v0, 0x3f800000 # 1.0f
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
const/4 v0, 0x0
|
|
|
|
:goto_2
|
|
invoke-direct {p0, v0}, Lcom/facebook/drawee/drawable/f;->j(F)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
goto :goto_3
|
|
|
|
:cond_5
|
|
const/4 v1, 0x1
|
|
|
|
:goto_3
|
|
iput v1, p0, Lcom/facebook/drawee/drawable/f;->LD:I
|
|
|
|
:goto_4
|
|
iget-object v1, p0, Lcom/facebook/drawee/drawable/f;->Lo:[Landroid/graphics/drawable/Drawable;
|
|
|
|
array-length v4, v1
|
|
|
|
if-ge v2, v4, :cond_7
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
iget-object v4, p0, Lcom/facebook/drawee/drawable/f;->LH:[I
|
|
|
|
aget v4, v4, v2
|
|
|
|
iget v5, p0, Lcom/facebook/drawee/drawable/f;->mAlpha:I
|
|
|
|
mul-int v4, v4, v5
|
|
|
|
div-int/lit16 v4, v4, 0xff
|
|
|
|
if-eqz v1, :cond_6
|
|
|
|
if-lez v4, :cond_6
|
|
|
|
iget v5, p0, Lcom/facebook/drawee/drawable/f;->LJ:I
|
|
|
|
add-int/2addr v5, v3
|
|
|
|
iput v5, p0, Lcom/facebook/drawee/drawable/f;->LJ:I
|
|
|
|
invoke-virtual {v1}, Landroid/graphics/drawable/Drawable;->mutate()Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v5, v4}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V
|
|
|
|
iget v4, p0, Lcom/facebook/drawee/drawable/f;->LJ:I
|
|
|
|
sub-int/2addr v4, v3
|
|
|
|
iput v4, p0, Lcom/facebook/drawee/drawable/f;->LJ:I
|
|
|
|
invoke-virtual {v1, p1}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V
|
|
|
|
:cond_6
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_4
|
|
|
|
:cond_7
|
|
if-nez v0, :cond_8
|
|
|
|
invoke-virtual {p0}, Lcom/facebook/drawee/drawable/f;->invalidateSelf()V
|
|
|
|
:cond_8
|
|
return-void
|
|
.end method
|
|
|
|
.method public final gJ()V
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/facebook/drawee/drawable/f;->LJ:I
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
iput v0, p0, Lcom/facebook/drawee/drawable/f;->LJ:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final gK()V
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/facebook/drawee/drawable/f;->LJ:I
|
|
|
|
add-int/lit8 v0, v0, -0x1
|
|
|
|
iput v0, p0, Lcom/facebook/drawee/drawable/f;->LJ:I
|
|
|
|
invoke-virtual {p0}, Lcom/facebook/drawee/drawable/f;->invalidateSelf()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final gL()V
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput v0, p0, Lcom/facebook/drawee/drawable/f;->LD:I
|
|
|
|
iget-object v0, p0, Lcom/facebook/drawee/drawable/f;->LI:[Z
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-static {v0, v1}, Ljava/util/Arrays;->fill([ZZ)V
|
|
|
|
invoke-virtual {p0}, Lcom/facebook/drawee/drawable/f;->invalidateSelf()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final gM()V
|
|
.locals 4
|
|
|
|
const/4 v0, 0x2
|
|
|
|
iput v0, p0, Lcom/facebook/drawee/drawable/f;->LD:I
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
iget-object v2, p0, Lcom/facebook/drawee/drawable/f;->Lo:[Landroid/graphics/drawable/Drawable;
|
|
|
|
array-length v2, v2
|
|
|
|
if-ge v1, v2, :cond_1
|
|
|
|
iget-object v2, p0, Lcom/facebook/drawee/drawable/f;->LH:[I
|
|
|
|
iget-object v3, p0, Lcom/facebook/drawee/drawable/f;->LI:[Z
|
|
|
|
aget-boolean v3, v3, v1
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
const/16 v3, 0xff
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
const/4 v3, 0x0
|
|
|
|
:goto_1
|
|
aput v3, v2, v1
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
invoke-virtual {p0}, Lcom/facebook/drawee/drawable/f;->invalidateSelf()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final getAlpha()I
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/facebook/drawee/drawable/f;->mAlpha:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final invalidateSelf()V
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/facebook/drawee/drawable/f;->LJ:I
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
invoke-super {p0}, Lcom/facebook/drawee/drawable/a;->invalidateSelf()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final setAlpha(I)V
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/facebook/drawee/drawable/f;->mAlpha:I
|
|
|
|
if-eq v0, p1, :cond_0
|
|
|
|
iput p1, p0, Lcom/facebook/drawee/drawable/f;->mAlpha:I
|
|
|
|
invoke-virtual {p0}, Lcom/facebook/drawee/drawable/f;->invalidateSelf()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|