247 lines
10 KiB
Smali
247 lines
10 KiB
Smali
.class Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;
|
|
.super Landroid/graphics/drawable/Drawable$ConstantState;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x8
|
|
name = "AnimatedVectorDrawableCompatState"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field mAnimatorSet:Landroid/animation/AnimatorSet;
|
|
|
|
.field mAnimators:Ljava/util/ArrayList;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/ArrayList<",
|
|
"Landroid/animation/Animator;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field mChangingConfigurations:I
|
|
|
|
.field mTargetNameMap:Landroidx/collection/ArrayMap;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Landroidx/collection/ArrayMap<",
|
|
"Landroid/animation/Animator;",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field mVectorDrawable:Landroidx/vectordrawable/graphics/drawable/VectorDrawableCompat;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;Landroid/graphics/drawable/Drawable$Callback;Landroid/content/res/Resources;)V
|
|
.locals 2
|
|
|
|
invoke-direct {p0}, Landroid/graphics/drawable/Drawable$ConstantState;-><init>()V
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
iget p1, p2, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->mChangingConfigurations:I
|
|
|
|
iput p1, p0, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->mChangingConfigurations:I
|
|
|
|
iget-object p1, p2, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->mVectorDrawable:Landroidx/vectordrawable/graphics/drawable/VectorDrawableCompat;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
iget-object p1, p2, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->mVectorDrawable:Landroidx/vectordrawable/graphics/drawable/VectorDrawableCompat;
|
|
|
|
invoke-virtual {p1}, Landroidx/vectordrawable/graphics/drawable/VectorDrawableCompat;->getConstantState()Landroid/graphics/drawable/Drawable$ConstantState;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
invoke-virtual {p1, p4}, Landroid/graphics/drawable/Drawable$ConstantState;->newDrawable(Landroid/content/res/Resources;)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_0
|
|
check-cast p1, Landroidx/vectordrawable/graphics/drawable/VectorDrawableCompat;
|
|
|
|
iput-object p1, p0, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->mVectorDrawable:Landroidx/vectordrawable/graphics/drawable/VectorDrawableCompat;
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
invoke-virtual {p1}, Landroid/graphics/drawable/Drawable$ConstantState;->newDrawable()Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_0
|
|
|
|
:goto_1
|
|
iget-object p1, p0, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->mVectorDrawable:Landroidx/vectordrawable/graphics/drawable/VectorDrawableCompat;
|
|
|
|
invoke-virtual {p1}, Landroidx/vectordrawable/graphics/drawable/VectorDrawableCompat;->mutate()Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroidx/vectordrawable/graphics/drawable/VectorDrawableCompat;
|
|
|
|
iput-object p1, p0, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->mVectorDrawable:Landroidx/vectordrawable/graphics/drawable/VectorDrawableCompat;
|
|
|
|
iget-object p1, p0, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->mVectorDrawable:Landroidx/vectordrawable/graphics/drawable/VectorDrawableCompat;
|
|
|
|
invoke-virtual {p1, p3}, Landroidx/vectordrawable/graphics/drawable/VectorDrawableCompat;->setCallback(Landroid/graphics/drawable/Drawable$Callback;)V
|
|
|
|
iget-object p1, p0, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->mVectorDrawable:Landroidx/vectordrawable/graphics/drawable/VectorDrawableCompat;
|
|
|
|
iget-object p3, p2, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->mVectorDrawable:Landroidx/vectordrawable/graphics/drawable/VectorDrawableCompat;
|
|
|
|
invoke-virtual {p3}, Landroidx/vectordrawable/graphics/drawable/VectorDrawableCompat;->getBounds()Landroid/graphics/Rect;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-virtual {p1, p3}, Landroidx/vectordrawable/graphics/drawable/VectorDrawableCompat;->setBounds(Landroid/graphics/Rect;)V
|
|
|
|
iget-object p1, p0, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->mVectorDrawable:Landroidx/vectordrawable/graphics/drawable/VectorDrawableCompat;
|
|
|
|
invoke-virtual {p1, v0}, Landroidx/vectordrawable/graphics/drawable/VectorDrawableCompat;->setAllowCaching(Z)V
|
|
|
|
:cond_1
|
|
iget-object p1, p2, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->mAnimators:Ljava/util/ArrayList;
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
iget-object p1, p2, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->mAnimators:Ljava/util/ArrayList;
|
|
|
|
invoke-virtual {p1}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result p1
|
|
|
|
new-instance p3, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {p3, p1}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
iput-object p3, p0, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->mAnimators:Ljava/util/ArrayList;
|
|
|
|
new-instance p3, Landroidx/collection/ArrayMap;
|
|
|
|
invoke-direct {p3, p1}, Landroidx/collection/ArrayMap;-><init>(I)V
|
|
|
|
iput-object p3, p0, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->mTargetNameMap:Landroidx/collection/ArrayMap;
|
|
|
|
:goto_2
|
|
if-ge v0, p1, :cond_2
|
|
|
|
iget-object p3, p2, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->mAnimators:Ljava/util/ArrayList;
|
|
|
|
invoke-virtual {p3, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object p3
|
|
|
|
check-cast p3, Landroid/animation/Animator;
|
|
|
|
invoke-virtual {p3}, Landroid/animation/Animator;->clone()Landroid/animation/Animator;
|
|
|
|
move-result-object p4
|
|
|
|
iget-object v1, p2, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->mTargetNameMap:Landroidx/collection/ArrayMap;
|
|
|
|
invoke-virtual {v1, p3}, Landroidx/collection/ArrayMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p3
|
|
|
|
check-cast p3, Ljava/lang/String;
|
|
|
|
iget-object v1, p0, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->mVectorDrawable:Landroidx/vectordrawable/graphics/drawable/VectorDrawableCompat;
|
|
|
|
invoke-virtual {v1, p3}, Landroidx/vectordrawable/graphics/drawable/VectorDrawableCompat;->getTargetByName(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p4, v1}, Landroid/animation/Animator;->setTarget(Ljava/lang/Object;)V
|
|
|
|
iget-object v1, p0, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->mAnimators:Ljava/util/ArrayList;
|
|
|
|
invoke-virtual {v1, p4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
iget-object v1, p0, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->mTargetNameMap:Landroidx/collection/ArrayMap;
|
|
|
|
invoke-virtual {v1, p4, p3}, Landroidx/collection/ArrayMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
invoke-virtual {p0}, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->setupAnimatorSet()V
|
|
|
|
:cond_3
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getChangingConfigurations()I
|
|
.locals 1
|
|
|
|
iget v0, p0, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->mChangingConfigurations:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public newDrawable()Landroid/graphics/drawable/Drawable;
|
|
.locals 2
|
|
|
|
new-instance v0, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v1, "No constant state support for SDK < 24."
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public newDrawable(Landroid/content/res/Resources;)Landroid/graphics/drawable/Drawable;
|
|
.locals 1
|
|
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v0, "No constant state support for SDK < 24."
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public setupAnimatorSet()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->mAnimatorSet:Landroid/animation/AnimatorSet;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
new-instance v0, Landroid/animation/AnimatorSet;
|
|
|
|
invoke-direct {v0}, Landroid/animation/AnimatorSet;-><init>()V
|
|
|
|
iput-object v0, p0, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->mAnimatorSet:Landroid/animation/AnimatorSet;
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->mAnimatorSet:Landroid/animation/AnimatorSet;
|
|
|
|
iget-object v1, p0, Landroidx/vectordrawable/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState;->mAnimators:Ljava/util/ArrayList;
|
|
|
|
invoke-virtual {v0, v1}, Landroid/animation/AnimatorSet;->playTogether(Ljava/util/Collection;)V
|
|
|
|
return-void
|
|
.end method
|