2396 lines
59 KiB
Smali
2396 lines
59 KiB
Smali
.class public Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;
|
|
.super Ljava/lang/Object;
|
|
.source "AnimatorInflaterCompat.java"
|
|
|
|
|
|
# annotations
|
|
.annotation build Landroidx/annotation/RestrictTo;
|
|
value = {
|
|
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP_PREFIX:Landroidx/annotation/RestrictTo$Scope;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat$PathDataEvaluator;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final DBG_ANIMATOR_INFLATER:Z = false
|
|
|
|
.field public static final MAX_NUM_POINTS:I = 0x64
|
|
|
|
.field public static final TAG:Ljava/lang/String; = "AnimatorInflater"
|
|
|
|
.field public static final TOGETHER:I = 0x0
|
|
|
|
.field public static final VALUE_TYPE_COLOR:I = 0x3
|
|
|
|
.field public static final VALUE_TYPE_FLOAT:I = 0x0
|
|
|
|
.field public static final VALUE_TYPE_INT:I = 0x1
|
|
|
|
.field public static final VALUE_TYPE_PATH:I = 0x2
|
|
|
|
.field public static final VALUE_TYPE_UNDEFINED:I = 0x4
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static createAnimatorFromXml(Landroid/content/Context;Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Lorg/xmlpull/v1/XmlPullParser;F)Landroid/animation/Animator;
|
|
.locals 8
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lorg/xmlpull/v1/XmlPullParserException;,
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
invoke-static {p3}, Landroid/util/Xml;->asAttributeSet(Lorg/xmlpull/v1/XmlPullParser;)Landroid/util/AttributeSet;
|
|
|
|
move-result-object v4
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move-object v2, p2
|
|
|
|
move-object v3, p3
|
|
|
|
move v7, p4
|
|
|
|
invoke-static/range {v0 .. v7}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->createAnimatorFromXml(Landroid/content/Context;Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Lorg/xmlpull/v1/XmlPullParser;Landroid/util/AttributeSet;Landroid/animation/AnimatorSet;IF)Landroid/animation/Animator;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static createAnimatorFromXml(Landroid/content/Context;Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Lorg/xmlpull/v1/XmlPullParser;Landroid/util/AttributeSet;Landroid/animation/AnimatorSet;IF)Landroid/animation/Animator;
|
|
.locals 18
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lorg/xmlpull/v1/XmlPullParserException;,
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
move-object/from16 v8, p1
|
|
|
|
move-object/from16 v9, p2
|
|
|
|
move-object/from16 v10, p3
|
|
|
|
move-object/from16 v11, p5
|
|
|
|
invoke-interface/range {p3 .. p3}, Lorg/xmlpull/v1/XmlPullParser;->getDepth()I
|
|
|
|
move-result v12
|
|
|
|
const/4 v0, 0x0
|
|
|
|
move-object v13, v0
|
|
|
|
:cond_0
|
|
:goto_0
|
|
invoke-interface/range {p3 .. p3}, Lorg/xmlpull/v1/XmlPullParser;->next()I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x3
|
|
|
|
const/4 v14, 0x0
|
|
|
|
if-ne v1, v2, :cond_1
|
|
|
|
invoke-interface/range {p3 .. p3}, Lorg/xmlpull/v1/XmlPullParser;->getDepth()I
|
|
|
|
move-result v2
|
|
|
|
if-le v2, v12, :cond_9
|
|
|
|
:cond_1
|
|
const/4 v2, 0x1
|
|
|
|
if-eq v1, v2, :cond_9
|
|
|
|
const/4 v2, 0x2
|
|
|
|
if-eq v1, v2, :cond_2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
invoke-interface/range {p3 .. p3}, Lorg/xmlpull/v1/XmlPullParser;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "objectAnimator"
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
move-object/from16 v1, p1
|
|
|
|
move-object/from16 v2, p2
|
|
|
|
move-object/from16 v3, p4
|
|
|
|
move/from16 v4, p7
|
|
|
|
move-object/from16 v5, p3
|
|
|
|
invoke-static/range {v0 .. v5}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->loadObjectAnimator(Landroid/content/Context;Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Landroid/util/AttributeSet;FLorg/xmlpull/v1/XmlPullParser;)Landroid/animation/ObjectAnimator;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
const-string v2, "animator"
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
const/4 v4, 0x0
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
move-object/from16 v1, p1
|
|
|
|
move-object/from16 v2, p2
|
|
|
|
move-object/from16 v3, p4
|
|
|
|
move/from16 v5, p7
|
|
|
|
move-object/from16 v6, p3
|
|
|
|
invoke-static/range {v0 .. v6}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->loadAnimator(Landroid/content/Context;Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Landroid/util/AttributeSet;Landroid/animation/ValueAnimator;FLorg/xmlpull/v1/XmlPullParser;)Landroid/animation/ValueAnimator;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_1
|
|
move-object/from16 v2, p0
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
const-string v2, "set"
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
new-instance v15, Landroid/animation/AnimatorSet;
|
|
|
|
invoke-direct {v15}, Landroid/animation/AnimatorSet;-><init>()V
|
|
|
|
sget-object v0, Landroidx/vectordrawable/graphics/drawable/AndroidResources;->STYLEABLE_ANIMATOR_SET:[I
|
|
|
|
move-object/from16 v7, p4
|
|
|
|
invoke-static {v8, v9, v7, v0}, Landroidx/core/content/res/TypedArrayUtils;->obtainAttributes(Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;
|
|
|
|
move-result-object v6
|
|
|
|
const-string v0, "ordering"
|
|
|
|
invoke-static {v6, v10, v0, v14, v14}, Landroidx/core/content/res/TypedArrayUtils;->getNamedInt(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;II)I
|
|
|
|
move-result v16
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
move-object/from16 v1, p1
|
|
|
|
move-object/from16 v2, p2
|
|
|
|
move-object/from16 v3, p3
|
|
|
|
move-object/from16 v4, p4
|
|
|
|
move-object v5, v15
|
|
|
|
move-object/from16 v17, v6
|
|
|
|
move/from16 v6, v16
|
|
|
|
move/from16 v7, p7
|
|
|
|
invoke-static/range {v0 .. v7}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->createAnimatorFromXml(Landroid/content/Context;Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Lorg/xmlpull/v1/XmlPullParser;Landroid/util/AttributeSet;Landroid/animation/AnimatorSet;IF)Landroid/animation/Animator;
|
|
|
|
invoke-virtual/range {v17 .. v17}, Landroid/content/res/TypedArray;->recycle()V
|
|
|
|
move-object/from16 v2, p0
|
|
|
|
move-object v0, v15
|
|
|
|
goto :goto_2
|
|
|
|
:cond_5
|
|
const-string v2, "propertyValuesHolder"
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_8
|
|
|
|
invoke-static/range {p3 .. p3}, Landroid/util/Xml;->asAttributeSet(Lorg/xmlpull/v1/XmlPullParser;)Landroid/util/AttributeSet;
|
|
|
|
move-result-object v1
|
|
|
|
move-object/from16 v2, p0
|
|
|
|
invoke-static {v2, v8, v9, v10, v1}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->loadValues(Landroid/content/Context;Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Lorg/xmlpull/v1/XmlPullParser;Landroid/util/AttributeSet;)[Landroid/animation/PropertyValuesHolder;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_6
|
|
|
|
instance-of v3, v0, Landroid/animation/ValueAnimator;
|
|
|
|
if-eqz v3, :cond_6
|
|
|
|
move-object v3, v0
|
|
|
|
check-cast v3, Landroid/animation/ValueAnimator;
|
|
|
|
invoke-virtual {v3, v1}, Landroid/animation/ValueAnimator;->setValues([Landroid/animation/PropertyValuesHolder;)V
|
|
|
|
:cond_6
|
|
const/4 v14, 0x1
|
|
|
|
:goto_2
|
|
if-eqz v11, :cond_0
|
|
|
|
if-nez v14, :cond_0
|
|
|
|
if-nez v13, :cond_7
|
|
|
|
new-instance v1, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
move-object v13, v1
|
|
|
|
:cond_7
|
|
invoke-virtual {v13, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
goto/16 :goto_0
|
|
|
|
:cond_8
|
|
new-instance v0, Ljava/lang/RuntimeException;
|
|
|
|
const-string v1, "Unknown animator name: "
|
|
|
|
invoke-static {v1}, Lf/e/c/a/a;->D(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface/range {p3 .. p3}, Lorg/xmlpull/v1/XmlPullParser;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_9
|
|
if-eqz v11, :cond_c
|
|
|
|
if-eqz v13, :cond_c
|
|
|
|
invoke-virtual {v13}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result v1
|
|
|
|
new-array v1, v1, [Landroid/animation/Animator;
|
|
|
|
invoke-virtual {v13}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v2
|
|
|
|
:goto_3
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_a
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Landroid/animation/Animator;
|
|
|
|
add-int/lit8 v4, v14, 0x1
|
|
|
|
aput-object v3, v1, v14
|
|
|
|
move v14, v4
|
|
|
|
goto :goto_3
|
|
|
|
:cond_a
|
|
if-nez p6, :cond_b
|
|
|
|
invoke-virtual {v11, v1}, Landroid/animation/AnimatorSet;->playTogether([Landroid/animation/Animator;)V
|
|
|
|
goto :goto_4
|
|
|
|
:cond_b
|
|
invoke-virtual {v11, v1}, Landroid/animation/AnimatorSet;->playSequentially([Landroid/animation/Animator;)V
|
|
|
|
:cond_c
|
|
:goto_4
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static createNewKeyframe(Landroid/animation/Keyframe;F)Landroid/animation/Keyframe;
|
|
.locals 2
|
|
|
|
invoke-virtual {p0}, Landroid/animation/Keyframe;->getType()Ljava/lang/Class;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Ljava/lang/Float;->TYPE:Ljava/lang/Class;
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
invoke-static {p1}, Landroid/animation/Keyframe;->ofFloat(F)Landroid/animation/Keyframe;
|
|
|
|
move-result-object p0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Landroid/animation/Keyframe;->getType()Ljava/lang/Class;
|
|
|
|
move-result-object p0
|
|
|
|
sget-object v0, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;
|
|
|
|
if-ne p0, v0, :cond_1
|
|
|
|
invoke-static {p1}, Landroid/animation/Keyframe;->ofInt(F)Landroid/animation/Keyframe;
|
|
|
|
move-result-object p0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
invoke-static {p1}, Landroid/animation/Keyframe;->ofObject(F)Landroid/animation/Keyframe;
|
|
|
|
move-result-object p0
|
|
|
|
:goto_0
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static distributeKeyframes([Landroid/animation/Keyframe;FII)V
|
|
.locals 2
|
|
|
|
sub-int v0, p3, p2
|
|
|
|
add-int/lit8 v0, v0, 0x2
|
|
|
|
int-to-float v0, v0
|
|
|
|
div-float/2addr p1, v0
|
|
|
|
:goto_0
|
|
if-gt p2, p3, :cond_0
|
|
|
|
aget-object v0, p0, p2
|
|
|
|
add-int/lit8 v1, p2, -0x1
|
|
|
|
aget-object v1, p0, v1
|
|
|
|
invoke-virtual {v1}, Landroid/animation/Keyframe;->getFraction()F
|
|
|
|
move-result v1
|
|
|
|
add-float/2addr v1, p1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/animation/Keyframe;->setFraction(F)V
|
|
|
|
add-int/lit8 p2, p2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public static dumpKeyframes([Ljava/lang/Object;Ljava/lang/String;)V
|
|
.locals 7
|
|
|
|
if-eqz p0, :cond_3
|
|
|
|
array-length v0, p0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
goto :goto_2
|
|
|
|
:cond_0
|
|
const-string v0, "AnimatorInflater"
|
|
|
|
invoke-static {v0, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
array-length p1, p0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
if-ge v1, p1, :cond_3
|
|
|
|
aget-object v2, p0, v1
|
|
|
|
check-cast v2, Landroid/animation/Keyframe;
|
|
|
|
const-string v3, "Keyframe "
|
|
|
|
const-string v4, ": fraction "
|
|
|
|
invoke-static {v3, v1, v4}, Lf/e/c/a/a;->E(Ljava/lang/String;ILjava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v2}, Landroid/animation/Keyframe;->getFraction()F
|
|
|
|
move-result v4
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const-string v6, "null"
|
|
|
|
cmpg-float v4, v4, v5
|
|
|
|
if-gez v4, :cond_1
|
|
|
|
move-object v4, v6
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
invoke-virtual {v2}, Landroid/animation/Keyframe;->getFraction()F
|
|
|
|
move-result v4
|
|
|
|
invoke-static {v4}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;
|
|
|
|
move-result-object v4
|
|
|
|
:goto_1
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v4, ", , value : "
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Landroid/animation/Keyframe;->hasValue()Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
invoke-virtual {v2}, Landroid/animation/Keyframe;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
:cond_2
|
|
invoke-virtual {v3, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v0, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
:goto_2
|
|
return-void
|
|
.end method
|
|
|
|
.method public static getPVH(Landroid/content/res/TypedArray;IIILjava/lang/String;)Landroid/animation/PropertyValuesHolder;
|
|
.locals 11
|
|
|
|
invoke-virtual {p0, p2}, Landroid/content/res/TypedArray;->peekValue(I)Landroid/util/TypedValue;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v3, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v3, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v3, :cond_1
|
|
|
|
iget v0, v0, Landroid/util/TypedValue;->type:I
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const/4 v0, 0x0
|
|
|
|
:goto_1
|
|
invoke-virtual {p0, p3}, Landroid/content/res/TypedArray;->peekValue(I)Landroid/util/TypedValue;
|
|
|
|
move-result-object v4
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
const/4 v5, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
const/4 v5, 0x0
|
|
|
|
:goto_2
|
|
if-eqz v5, :cond_3
|
|
|
|
iget v4, v4, Landroid/util/TypedValue;->type:I
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
const/4 v4, 0x0
|
|
|
|
:goto_3
|
|
const/4 v6, 0x4
|
|
|
|
const/4 v7, 0x3
|
|
|
|
if-ne p1, v6, :cond_7
|
|
|
|
if-eqz v3, :cond_4
|
|
|
|
invoke-static {v0}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->isColorType(I)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_5
|
|
|
|
:cond_4
|
|
if-eqz v5, :cond_6
|
|
|
|
invoke-static {v4}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->isColorType(I)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_6
|
|
|
|
:cond_5
|
|
const/4 p1, 0x3
|
|
|
|
goto :goto_4
|
|
|
|
:cond_6
|
|
const/4 p1, 0x0
|
|
|
|
:cond_7
|
|
:goto_4
|
|
if-nez p1, :cond_8
|
|
|
|
const/4 v6, 0x1
|
|
|
|
goto :goto_5
|
|
|
|
:cond_8
|
|
const/4 v6, 0x0
|
|
|
|
:goto_5
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x2
|
|
|
|
if-ne p1, v9, :cond_d
|
|
|
|
invoke-virtual {p0, p2}, Landroid/content/res/TypedArray;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p3}, Landroid/content/res/TypedArray;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {p1}, Landroidx/core/graphics/PathParser;->createNodesFromPathData(Ljava/lang/String;)[Landroidx/core/graphics/PathParser$PathDataNode;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {p0}, Landroidx/core/graphics/PathParser;->createNodesFromPathData(Ljava/lang/String;)[Landroidx/core/graphics/PathParser$PathDataNode;
|
|
|
|
move-result-object p3
|
|
|
|
if-nez p2, :cond_9
|
|
|
|
if-eqz p3, :cond_1e
|
|
|
|
:cond_9
|
|
if-eqz p2, :cond_c
|
|
|
|
new-instance v0, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat$PathDataEvaluator;
|
|
|
|
invoke-direct {v0}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat$PathDataEvaluator;-><init>()V
|
|
|
|
if-eqz p3, :cond_b
|
|
|
|
invoke-static {p2, p3}, Landroidx/core/graphics/PathParser;->canMorph([Landroidx/core/graphics/PathParser$PathDataNode;[Landroidx/core/graphics/PathParser$PathDataNode;)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_a
|
|
|
|
new-array p0, v9, [Ljava/lang/Object;
|
|
|
|
aput-object p2, p0, v2
|
|
|
|
aput-object p3, p0, v1
|
|
|
|
invoke-static {p4, v0, p0}, Landroid/animation/PropertyValuesHolder;->ofObject(Ljava/lang/String;Landroid/animation/TypeEvaluator;[Ljava/lang/Object;)Landroid/animation/PropertyValuesHolder;
|
|
|
|
move-result-object p0
|
|
|
|
goto :goto_6
|
|
|
|
:cond_a
|
|
new-instance p2, Landroid/view/InflateException;
|
|
|
|
new-instance p3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string p4, " Can\'t morph from "
|
|
|
|
invoke-virtual {p3, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, " to "
|
|
|
|
invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {p2, p0}, Landroid/view/InflateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p2
|
|
|
|
:cond_b
|
|
new-array p0, v1, [Ljava/lang/Object;
|
|
|
|
aput-object p2, p0, v2
|
|
|
|
invoke-static {p4, v0, p0}, Landroid/animation/PropertyValuesHolder;->ofObject(Ljava/lang/String;Landroid/animation/TypeEvaluator;[Ljava/lang/Object;)Landroid/animation/PropertyValuesHolder;
|
|
|
|
move-result-object p0
|
|
|
|
:goto_6
|
|
move-object v8, p0
|
|
|
|
goto/16 :goto_10
|
|
|
|
:cond_c
|
|
if-eqz p3, :cond_1e
|
|
|
|
new-instance p0, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat$PathDataEvaluator;
|
|
|
|
invoke-direct {p0}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat$PathDataEvaluator;-><init>()V
|
|
|
|
new-array p1, v1, [Ljava/lang/Object;
|
|
|
|
aput-object p3, p1, v2
|
|
|
|
invoke-static {p4, p0, p1}, Landroid/animation/PropertyValuesHolder;->ofObject(Ljava/lang/String;Landroid/animation/TypeEvaluator;[Ljava/lang/Object;)Landroid/animation/PropertyValuesHolder;
|
|
|
|
move-result-object v8
|
|
|
|
goto/16 :goto_10
|
|
|
|
:cond_d
|
|
if-ne p1, v7, :cond_e
|
|
|
|
invoke-static {}, Landroidx/vectordrawable/graphics/drawable/ArgbEvaluator;->getInstance()Landroidx/vectordrawable/graphics/drawable/ArgbEvaluator;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_7
|
|
|
|
:cond_e
|
|
move-object p1, v8
|
|
|
|
:goto_7
|
|
const/4 v7, 0x5
|
|
|
|
const/4 v10, 0x0
|
|
|
|
if-eqz v6, :cond_14
|
|
|
|
if-eqz v3, :cond_12
|
|
|
|
if-ne v0, v7, :cond_f
|
|
|
|
invoke-virtual {p0, p2, v10}, Landroid/content/res/TypedArray;->getDimension(IF)F
|
|
|
|
move-result p2
|
|
|
|
goto :goto_8
|
|
|
|
:cond_f
|
|
invoke-virtual {p0, p2, v10}, Landroid/content/res/TypedArray;->getFloat(IF)F
|
|
|
|
move-result p2
|
|
|
|
:goto_8
|
|
if-eqz v5, :cond_11
|
|
|
|
if-ne v4, v7, :cond_10
|
|
|
|
invoke-virtual {p0, p3, v10}, Landroid/content/res/TypedArray;->getDimension(IF)F
|
|
|
|
move-result p0
|
|
|
|
goto :goto_9
|
|
|
|
:cond_10
|
|
invoke-virtual {p0, p3, v10}, Landroid/content/res/TypedArray;->getFloat(IF)F
|
|
|
|
move-result p0
|
|
|
|
:goto_9
|
|
new-array p3, v9, [F
|
|
|
|
aput p2, p3, v2
|
|
|
|
aput p0, p3, v1
|
|
|
|
invoke-static {p4, p3}, Landroid/animation/PropertyValuesHolder;->ofFloat(Ljava/lang/String;[F)Landroid/animation/PropertyValuesHolder;
|
|
|
|
move-result-object p0
|
|
|
|
goto :goto_b
|
|
|
|
:cond_11
|
|
new-array p0, v1, [F
|
|
|
|
aput p2, p0, v2
|
|
|
|
invoke-static {p4, p0}, Landroid/animation/PropertyValuesHolder;->ofFloat(Ljava/lang/String;[F)Landroid/animation/PropertyValuesHolder;
|
|
|
|
move-result-object p0
|
|
|
|
goto :goto_b
|
|
|
|
:cond_12
|
|
if-ne v4, v7, :cond_13
|
|
|
|
invoke-virtual {p0, p3, v10}, Landroid/content/res/TypedArray;->getDimension(IF)F
|
|
|
|
move-result p0
|
|
|
|
goto :goto_a
|
|
|
|
:cond_13
|
|
invoke-virtual {p0, p3, v10}, Landroid/content/res/TypedArray;->getFloat(IF)F
|
|
|
|
move-result p0
|
|
|
|
:goto_a
|
|
new-array p2, v1, [F
|
|
|
|
aput p0, p2, v2
|
|
|
|
invoke-static {p4, p2}, Landroid/animation/PropertyValuesHolder;->ofFloat(Ljava/lang/String;[F)Landroid/animation/PropertyValuesHolder;
|
|
|
|
move-result-object p0
|
|
|
|
:goto_b
|
|
move-object v8, p0
|
|
|
|
goto/16 :goto_f
|
|
|
|
:cond_14
|
|
if-eqz v3, :cond_1a
|
|
|
|
if-ne v0, v7, :cond_15
|
|
|
|
invoke-virtual {p0, p2, v10}, Landroid/content/res/TypedArray;->getDimension(IF)F
|
|
|
|
move-result p2
|
|
|
|
float-to-int p2, p2
|
|
|
|
goto :goto_c
|
|
|
|
:cond_15
|
|
invoke-static {v0}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->isColorType(I)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_16
|
|
|
|
invoke-virtual {p0, p2, v2}, Landroid/content/res/TypedArray;->getColor(II)I
|
|
|
|
move-result p2
|
|
|
|
goto :goto_c
|
|
|
|
:cond_16
|
|
invoke-virtual {p0, p2, v2}, Landroid/content/res/TypedArray;->getInt(II)I
|
|
|
|
move-result p2
|
|
|
|
:goto_c
|
|
if-eqz v5, :cond_19
|
|
|
|
if-ne v4, v7, :cond_17
|
|
|
|
invoke-virtual {p0, p3, v10}, Landroid/content/res/TypedArray;->getDimension(IF)F
|
|
|
|
move-result p0
|
|
|
|
float-to-int p0, p0
|
|
|
|
goto :goto_d
|
|
|
|
:cond_17
|
|
invoke-static {v4}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->isColorType(I)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_18
|
|
|
|
invoke-virtual {p0, p3, v2}, Landroid/content/res/TypedArray;->getColor(II)I
|
|
|
|
move-result p0
|
|
|
|
goto :goto_d
|
|
|
|
:cond_18
|
|
invoke-virtual {p0, p3, v2}, Landroid/content/res/TypedArray;->getInt(II)I
|
|
|
|
move-result p0
|
|
|
|
:goto_d
|
|
new-array p3, v9, [I
|
|
|
|
aput p2, p3, v2
|
|
|
|
aput p0, p3, v1
|
|
|
|
invoke-static {p4, p3}, Landroid/animation/PropertyValuesHolder;->ofInt(Ljava/lang/String;[I)Landroid/animation/PropertyValuesHolder;
|
|
|
|
move-result-object v8
|
|
|
|
goto :goto_f
|
|
|
|
:cond_19
|
|
new-array p0, v1, [I
|
|
|
|
aput p2, p0, v2
|
|
|
|
invoke-static {p4, p0}, Landroid/animation/PropertyValuesHolder;->ofInt(Ljava/lang/String;[I)Landroid/animation/PropertyValuesHolder;
|
|
|
|
move-result-object v8
|
|
|
|
goto :goto_f
|
|
|
|
:cond_1a
|
|
if-eqz v5, :cond_1d
|
|
|
|
if-ne v4, v7, :cond_1b
|
|
|
|
invoke-virtual {p0, p3, v10}, Landroid/content/res/TypedArray;->getDimension(IF)F
|
|
|
|
move-result p0
|
|
|
|
float-to-int p0, p0
|
|
|
|
goto :goto_e
|
|
|
|
:cond_1b
|
|
invoke-static {v4}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->isColorType(I)Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_1c
|
|
|
|
invoke-virtual {p0, p3, v2}, Landroid/content/res/TypedArray;->getColor(II)I
|
|
|
|
move-result p0
|
|
|
|
goto :goto_e
|
|
|
|
:cond_1c
|
|
invoke-virtual {p0, p3, v2}, Landroid/content/res/TypedArray;->getInt(II)I
|
|
|
|
move-result p0
|
|
|
|
:goto_e
|
|
new-array p2, v1, [I
|
|
|
|
aput p0, p2, v2
|
|
|
|
invoke-static {p4, p2}, Landroid/animation/PropertyValuesHolder;->ofInt(Ljava/lang/String;[I)Landroid/animation/PropertyValuesHolder;
|
|
|
|
move-result-object v8
|
|
|
|
:cond_1d
|
|
:goto_f
|
|
if-eqz v8, :cond_1e
|
|
|
|
if-eqz p1, :cond_1e
|
|
|
|
invoke-virtual {v8, p1}, Landroid/animation/PropertyValuesHolder;->setEvaluator(Landroid/animation/TypeEvaluator;)V
|
|
|
|
:cond_1e
|
|
:goto_10
|
|
return-object v8
|
|
.end method
|
|
|
|
.method public static inferValueTypeFromValues(Landroid/content/res/TypedArray;II)I
|
|
.locals 3
|
|
|
|
invoke-virtual {p0, p1}, Landroid/content/res/TypedArray;->peekValue(I)Landroid/util/TypedValue;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v2, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v2, :cond_1
|
|
|
|
iget p1, p1, Landroid/util/TypedValue;->type:I
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const/4 p1, 0x0
|
|
|
|
:goto_1
|
|
invoke-virtual {p0, p2}, Landroid/content/res/TypedArray;->peekValue(I)Landroid/util/TypedValue;
|
|
|
|
move-result-object p0
|
|
|
|
if-eqz p0, :cond_2
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
const/4 v0, 0x0
|
|
|
|
:goto_2
|
|
if-eqz v0, :cond_3
|
|
|
|
iget p0, p0, Landroid/util/TypedValue;->type:I
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
const/4 p0, 0x0
|
|
|
|
:goto_3
|
|
if-eqz v2, :cond_4
|
|
|
|
invoke-static {p1}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->isColorType(I)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_5
|
|
|
|
:cond_4
|
|
if-eqz v0, :cond_6
|
|
|
|
invoke-static {p0}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->isColorType(I)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_6
|
|
|
|
:cond_5
|
|
const/4 v1, 0x3
|
|
|
|
:cond_6
|
|
return v1
|
|
.end method
|
|
|
|
.method public static inferValueTypeOfKeyframe(Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Landroid/util/AttributeSet;Lorg/xmlpull/v1/XmlPullParser;)I
|
|
.locals 1
|
|
|
|
sget-object v0, Landroidx/vectordrawable/graphics/drawable/AndroidResources;->STYLEABLE_KEYFRAME:[I
|
|
|
|
invoke-static {p0, p1, p2, v0}, Landroidx/core/content/res/TypedArrayUtils;->obtainAttributes(Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;
|
|
|
|
move-result-object p0
|
|
|
|
const-string/jumbo p1, "value"
|
|
|
|
const/4 p2, 0x0
|
|
|
|
invoke-static {p0, p3, p1, p2}, Landroidx/core/content/res/TypedArrayUtils;->peekNamedValue(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;I)Landroid/util/TypedValue;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/4 p3, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p3, 0x0
|
|
|
|
:goto_0
|
|
if-eqz p3, :cond_1
|
|
|
|
iget p1, p1, Landroid/util/TypedValue;->type:I
|
|
|
|
invoke-static {p1}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->isColorType(I)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
const/4 p2, 0x3
|
|
|
|
:cond_1
|
|
invoke-virtual {p0}, Landroid/content/res/TypedArray;->recycle()V
|
|
|
|
return p2
|
|
.end method
|
|
|
|
.method public static isColorType(I)Z
|
|
.locals 1
|
|
|
|
const/16 v0, 0x1c
|
|
|
|
if-lt p0, v0, :cond_0
|
|
|
|
const/16 v0, 0x1f
|
|
|
|
if-gt p0, v0, :cond_0
|
|
|
|
const/4 p0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p0, 0x0
|
|
|
|
:goto_0
|
|
return p0
|
|
.end method
|
|
|
|
.method public static loadAnimator(Landroid/content/Context;I)Landroid/animation/Animator;
|
|
.locals 2
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/AnimatorRes;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Landroid/content/res/Resources$NotFoundException;
|
|
}
|
|
.end annotation
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x18
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
invoke-static {p0, p1}, Landroid/animation/AnimatorInflater;->loadAnimator(Landroid/content/Context;I)Landroid/animation/Animator;
|
|
|
|
move-result-object p0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0}, Landroid/content/Context;->getTheme()Landroid/content/res/Resources$Theme;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {p0, v0, v1, p1}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->loadAnimator(Landroid/content/Context;Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;I)Landroid/animation/Animator;
|
|
|
|
move-result-object p0
|
|
|
|
:goto_0
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static loadAnimator(Landroid/content/Context;Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;I)Landroid/animation/Animator;
|
|
.locals 1
|
|
.param p3 # I
|
|
.annotation build Landroidx/annotation/AnimatorRes;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Landroid/content/res/Resources$NotFoundException;
|
|
}
|
|
.end annotation
|
|
|
|
const/high16 v0, 0x3f800000 # 1.0f
|
|
|
|
invoke-static {p0, p1, p2, p3, v0}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->loadAnimator(Landroid/content/Context;Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;IF)Landroid/animation/Animator;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static loadAnimator(Landroid/content/Context;Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;IF)Landroid/animation/Animator;
|
|
.locals 2
|
|
.param p3 # I
|
|
.annotation build Landroidx/annotation/AnimatorRes;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Landroid/content/res/Resources$NotFoundException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "Can\'t load animation resource ID #0x"
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:try_start_0
|
|
invoke-virtual {p1, p3}, Landroid/content/res/Resources;->getAnimation(I)Landroid/content/res/XmlResourceParser;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {p0, p1, p2, v1, p4}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->createAnimatorFromXml(Landroid/content/Context;Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Lorg/xmlpull/v1/XmlPullParser;F)Landroid/animation/Animator;
|
|
|
|
move-result-object p0
|
|
:try_end_0
|
|
.catch Lorg/xmlpull/v1/XmlPullParserException; {:try_start_0 .. :try_end_0} :catch_1
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-interface {v1}, Landroid/content/res/XmlResourceParser;->close()V
|
|
|
|
:cond_0
|
|
return-object p0
|
|
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
:try_start_1
|
|
new-instance p1, Landroid/content/res/Resources$NotFoundException;
|
|
|
|
new-instance p2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-static {p3}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Landroid/content/res/Resources$NotFoundException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1, p0}, Landroid/content/res/Resources$NotFoundException;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;
|
|
|
|
throw p1
|
|
|
|
:catch_1
|
|
move-exception p0
|
|
|
|
new-instance p1, Landroid/content/res/Resources$NotFoundException;
|
|
|
|
new-instance p2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-static {p3}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Landroid/content/res/Resources$NotFoundException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1, p0}, Landroid/content/res/Resources$NotFoundException;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;
|
|
|
|
throw p1
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
:goto_0
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-interface {v1}, Landroid/content/res/XmlResourceParser;->close()V
|
|
|
|
:cond_1
|
|
throw p0
|
|
.end method
|
|
|
|
.method public static loadAnimator(Landroid/content/Context;Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Landroid/util/AttributeSet;Landroid/animation/ValueAnimator;FLorg/xmlpull/v1/XmlPullParser;)Landroid/animation/ValueAnimator;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Landroid/content/res/Resources$NotFoundException;
|
|
}
|
|
.end annotation
|
|
|
|
sget-object v0, Landroidx/vectordrawable/graphics/drawable/AndroidResources;->STYLEABLE_ANIMATOR:[I
|
|
|
|
invoke-static {p1, p2, p3, v0}, Landroidx/core/content/res/TypedArrayUtils;->obtainAttributes(Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Landroidx/vectordrawable/graphics/drawable/AndroidResources;->STYLEABLE_PROPERTY_ANIMATOR:[I
|
|
|
|
invoke-static {p1, p2, p3, v1}, Landroidx/core/content/res/TypedArrayUtils;->obtainAttributes(Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;
|
|
|
|
move-result-object p1
|
|
|
|
if-nez p4, :cond_0
|
|
|
|
new-instance p4, Landroid/animation/ValueAnimator;
|
|
|
|
invoke-direct {p4}, Landroid/animation/ValueAnimator;-><init>()V
|
|
|
|
:cond_0
|
|
invoke-static {p4, v0, p1, p5, p6}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->parseAnimatorFromTypeArray(Landroid/animation/ValueAnimator;Landroid/content/res/TypedArray;Landroid/content/res/TypedArray;FLorg/xmlpull/v1/XmlPullParser;)V
|
|
|
|
const-string p2, "interpolator"
|
|
|
|
const/4 p3, 0x0
|
|
|
|
invoke-static {v0, p6, p2, p3, p3}, Landroidx/core/content/res/TypedArrayUtils;->getNamedResourceId(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;II)I
|
|
|
|
move-result p2
|
|
|
|
if-lez p2, :cond_1
|
|
|
|
invoke-static {p0, p2}, Landroidx/vectordrawable/graphics/drawable/AnimationUtilsCompat;->loadInterpolator(Landroid/content/Context;I)Landroid/view/animation/Interpolator;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p4, p0}, Landroid/animation/ValueAnimator;->setInterpolator(Landroid/animation/TimeInterpolator;)V
|
|
|
|
:cond_1
|
|
invoke-virtual {v0}, Landroid/content/res/TypedArray;->recycle()V
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
invoke-virtual {p1}, Landroid/content/res/TypedArray;->recycle()V
|
|
|
|
:cond_2
|
|
return-object p4
|
|
.end method
|
|
|
|
.method public static loadKeyframe(Landroid/content/Context;Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Landroid/util/AttributeSet;ILorg/xmlpull/v1/XmlPullParser;)Landroid/animation/Keyframe;
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lorg/xmlpull/v1/XmlPullParserException;,
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
sget-object v0, Landroidx/vectordrawable/graphics/drawable/AndroidResources;->STYLEABLE_KEYFRAME:[I
|
|
|
|
invoke-static {p1, p2, p3, v0}, Landroidx/core/content/res/TypedArrayUtils;->obtainAttributes(Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "fraction"
|
|
|
|
const/4 p3, 0x3
|
|
|
|
const/high16 v0, -0x40800000 # -1.0f
|
|
|
|
invoke-static {p1, p5, p2, p3, v0}, Landroidx/core/content/res/TypedArrayUtils;->getNamedFloat(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;IF)F
|
|
|
|
move-result p2
|
|
|
|
const-string/jumbo v0, "value"
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-static {p1, p5, v0, v1}, Landroidx/core/content/res/TypedArrayUtils;->peekNamedValue(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;I)Landroid/util/TypedValue;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v3, 0x1
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
const/4 v4, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v4, 0x0
|
|
|
|
:goto_0
|
|
const/4 v5, 0x4
|
|
|
|
if-ne p4, v5, :cond_2
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
iget p4, v2, Landroid/util/TypedValue;->type:I
|
|
|
|
invoke-static {p4}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->isColorType(I)Z
|
|
|
|
move-result p4
|
|
|
|
if-eqz p4, :cond_1
|
|
|
|
const/4 p4, 0x3
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const/4 p4, 0x0
|
|
|
|
:cond_2
|
|
:goto_1
|
|
if-eqz v4, :cond_5
|
|
|
|
if-eqz p4, :cond_4
|
|
|
|
if-eq p4, v3, :cond_3
|
|
|
|
if-eq p4, p3, :cond_3
|
|
|
|
const/4 p2, 0x0
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
invoke-static {p1, p5, v0, v1, v1}, Landroidx/core/content/res/TypedArrayUtils;->getNamedInt(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;II)I
|
|
|
|
move-result p3
|
|
|
|
invoke-static {p2, p3}, Landroid/animation/Keyframe;->ofInt(FI)Landroid/animation/Keyframe;
|
|
|
|
move-result-object p2
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
const/4 p3, 0x0
|
|
|
|
invoke-static {p1, p5, v0, v1, p3}, Landroidx/core/content/res/TypedArrayUtils;->getNamedFloat(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;IF)F
|
|
|
|
move-result p3
|
|
|
|
invoke-static {p2, p3}, Landroid/animation/Keyframe;->ofFloat(FF)Landroid/animation/Keyframe;
|
|
|
|
move-result-object p2
|
|
|
|
goto :goto_2
|
|
|
|
:cond_5
|
|
if-nez p4, :cond_6
|
|
|
|
invoke-static {p2}, Landroid/animation/Keyframe;->ofFloat(F)Landroid/animation/Keyframe;
|
|
|
|
move-result-object p2
|
|
|
|
goto :goto_2
|
|
|
|
:cond_6
|
|
invoke-static {p2}, Landroid/animation/Keyframe;->ofInt(F)Landroid/animation/Keyframe;
|
|
|
|
move-result-object p2
|
|
|
|
:goto_2
|
|
const-string p3, "interpolator"
|
|
|
|
invoke-static {p1, p5, p3, v3, v1}, Landroidx/core/content/res/TypedArrayUtils;->getNamedResourceId(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;II)I
|
|
|
|
move-result p3
|
|
|
|
if-lez p3, :cond_7
|
|
|
|
invoke-static {p0, p3}, Landroidx/vectordrawable/graphics/drawable/AnimationUtilsCompat;->loadInterpolator(Landroid/content/Context;I)Landroid/view/animation/Interpolator;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p2, p0}, Landroid/animation/Keyframe;->setInterpolator(Landroid/animation/TimeInterpolator;)V
|
|
|
|
:cond_7
|
|
invoke-virtual {p1}, Landroid/content/res/TypedArray;->recycle()V
|
|
|
|
return-object p2
|
|
.end method
|
|
|
|
.method public static loadObjectAnimator(Landroid/content/Context;Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Landroid/util/AttributeSet;FLorg/xmlpull/v1/XmlPullParser;)Landroid/animation/ObjectAnimator;
|
|
.locals 8
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Landroid/content/res/Resources$NotFoundException;
|
|
}
|
|
.end annotation
|
|
|
|
new-instance v7, Landroid/animation/ObjectAnimator;
|
|
|
|
invoke-direct {v7}, Landroid/animation/ObjectAnimator;-><init>()V
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move-object v2, p2
|
|
|
|
move-object v3, p3
|
|
|
|
move-object v4, v7
|
|
|
|
move v5, p4
|
|
|
|
move-object v6, p5
|
|
|
|
invoke-static/range {v0 .. v6}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->loadAnimator(Landroid/content/Context;Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Landroid/util/AttributeSet;Landroid/animation/ValueAnimator;FLorg/xmlpull/v1/XmlPullParser;)Landroid/animation/ValueAnimator;
|
|
|
|
return-object v7
|
|
.end method
|
|
|
|
.method public static loadPvh(Landroid/content/Context;Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;I)Landroid/animation/PropertyValuesHolder;
|
|
.locals 9
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lorg/xmlpull/v1/XmlPullParserException;,
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
move-object v1, v0
|
|
|
|
:cond_0
|
|
:goto_0
|
|
invoke-interface {p3}, Lorg/xmlpull/v1/XmlPullParser;->next()I
|
|
|
|
move-result v2
|
|
|
|
const/4 v3, 0x3
|
|
|
|
if-eq v2, v3, :cond_4
|
|
|
|
const/4 v4, 0x1
|
|
|
|
if-eq v2, v4, :cond_4
|
|
|
|
invoke-interface {p3}, Lorg/xmlpull/v1/XmlPullParser;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "keyframe"
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
const/4 v2, 0x4
|
|
|
|
if-ne p5, v2, :cond_1
|
|
|
|
invoke-static {p3}, Landroid/util/Xml;->asAttributeSet(Lorg/xmlpull/v1/XmlPullParser;)Landroid/util/AttributeSet;
|
|
|
|
move-result-object p5
|
|
|
|
invoke-static {p1, p2, p5, p3}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->inferValueTypeOfKeyframe(Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Landroid/util/AttributeSet;Lorg/xmlpull/v1/XmlPullParser;)I
|
|
|
|
move-result p5
|
|
|
|
:cond_1
|
|
invoke-static {p3}, Landroid/util/Xml;->asAttributeSet(Lorg/xmlpull/v1/XmlPullParser;)Landroid/util/AttributeSet;
|
|
|
|
move-result-object v5
|
|
|
|
move-object v2, p0
|
|
|
|
move-object v3, p1
|
|
|
|
move-object v4, p2
|
|
|
|
move v6, p5
|
|
|
|
move-object v7, p3
|
|
|
|
invoke-static/range {v2 .. v7}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->loadKeyframe(Landroid/content/Context;Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Landroid/util/AttributeSet;ILorg/xmlpull/v1/XmlPullParser;)Landroid/animation/Keyframe;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
if-nez v1, :cond_2
|
|
|
|
new-instance v1, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
:cond_2
|
|
invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
:cond_3
|
|
invoke-interface {p3}, Lorg/xmlpull/v1/XmlPullParser;->next()I
|
|
|
|
goto :goto_0
|
|
|
|
:cond_4
|
|
if-eqz v1, :cond_f
|
|
|
|
invoke-virtual {v1}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result p0
|
|
|
|
if-lez p0, :cond_f
|
|
|
|
const/4 p1, 0x0
|
|
|
|
invoke-virtual {v1, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object p2
|
|
|
|
check-cast p2, Landroid/animation/Keyframe;
|
|
|
|
add-int/lit8 p3, p0, -0x1
|
|
|
|
invoke-virtual {v1, p3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object p3
|
|
|
|
check-cast p3, Landroid/animation/Keyframe;
|
|
|
|
invoke-virtual {p3}, Landroid/animation/Keyframe;->getFraction()F
|
|
|
|
move-result v0
|
|
|
|
const/high16 v2, 0x3f800000 # 1.0f
|
|
|
|
const/4 v4, 0x0
|
|
|
|
cmpg-float v5, v0, v2
|
|
|
|
if-gez v5, :cond_6
|
|
|
|
cmpg-float v0, v0, v4
|
|
|
|
if-gez v0, :cond_5
|
|
|
|
invoke-virtual {p3, v2}, Landroid/animation/Keyframe;->setFraction(F)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_5
|
|
invoke-virtual {v1}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result v0
|
|
|
|
invoke-static {p3, v2}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->createNewKeyframe(Landroid/animation/Keyframe;F)Landroid/animation/Keyframe;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-virtual {v1, v0, p3}, Ljava/util/ArrayList;->add(ILjava/lang/Object;)V
|
|
|
|
add-int/lit8 p0, p0, 0x1
|
|
|
|
:cond_6
|
|
:goto_1
|
|
invoke-virtual {p2}, Landroid/animation/Keyframe;->getFraction()F
|
|
|
|
move-result p3
|
|
|
|
cmpl-float v0, p3, v4
|
|
|
|
if-eqz v0, :cond_8
|
|
|
|
cmpg-float p3, p3, v4
|
|
|
|
if-gez p3, :cond_7
|
|
|
|
invoke-virtual {p2, v4}, Landroid/animation/Keyframe;->setFraction(F)V
|
|
|
|
goto :goto_2
|
|
|
|
:cond_7
|
|
invoke-static {p2, v4}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->createNewKeyframe(Landroid/animation/Keyframe;F)Landroid/animation/Keyframe;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {v1, p1, p2}, Ljava/util/ArrayList;->add(ILjava/lang/Object;)V
|
|
|
|
add-int/lit8 p0, p0, 0x1
|
|
|
|
:cond_8
|
|
:goto_2
|
|
new-array p2, p0, [Landroid/animation/Keyframe;
|
|
|
|
invoke-virtual {v1, p2}, Ljava/util/ArrayList;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
|
|
|
:goto_3
|
|
if-ge p1, p0, :cond_e
|
|
|
|
aget-object p3, p2, p1
|
|
|
|
invoke-virtual {p3}, Landroid/animation/Keyframe;->getFraction()F
|
|
|
|
move-result v0
|
|
|
|
cmpg-float v0, v0, v4
|
|
|
|
if-gez v0, :cond_d
|
|
|
|
if-nez p1, :cond_9
|
|
|
|
invoke-virtual {p3, v4}, Landroid/animation/Keyframe;->setFraction(F)V
|
|
|
|
goto :goto_6
|
|
|
|
:cond_9
|
|
add-int/lit8 v0, p0, -0x1
|
|
|
|
if-ne p1, v0, :cond_a
|
|
|
|
invoke-virtual {p3, v2}, Landroid/animation/Keyframe;->setFraction(F)V
|
|
|
|
goto :goto_6
|
|
|
|
:cond_a
|
|
add-int/lit8 p3, p1, 0x1
|
|
|
|
move v1, p1
|
|
|
|
:goto_4
|
|
if-ge p3, v0, :cond_c
|
|
|
|
aget-object v5, p2, p3
|
|
|
|
invoke-virtual {v5}, Landroid/animation/Keyframe;->getFraction()F
|
|
|
|
move-result v5
|
|
|
|
cmpl-float v5, v5, v4
|
|
|
|
if-ltz v5, :cond_b
|
|
|
|
goto :goto_5
|
|
|
|
:cond_b
|
|
add-int/lit8 v1, p3, 0x1
|
|
|
|
move v8, v1
|
|
|
|
move v1, p3
|
|
|
|
move p3, v8
|
|
|
|
goto :goto_4
|
|
|
|
:cond_c
|
|
:goto_5
|
|
add-int/lit8 p3, v1, 0x1
|
|
|
|
aget-object p3, p2, p3
|
|
|
|
invoke-virtual {p3}, Landroid/animation/Keyframe;->getFraction()F
|
|
|
|
move-result p3
|
|
|
|
add-int/lit8 v0, p1, -0x1
|
|
|
|
aget-object v0, p2, v0
|
|
|
|
invoke-virtual {v0}, Landroid/animation/Keyframe;->getFraction()F
|
|
|
|
move-result v0
|
|
|
|
sub-float/2addr p3, v0
|
|
|
|
invoke-static {p2, p3, p1, v1}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->distributeKeyframes([Landroid/animation/Keyframe;FII)V
|
|
|
|
:cond_d
|
|
:goto_6
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
goto :goto_3
|
|
|
|
:cond_e
|
|
invoke-static {p4, p2}, Landroid/animation/PropertyValuesHolder;->ofKeyframe(Ljava/lang/String;[Landroid/animation/Keyframe;)Landroid/animation/PropertyValuesHolder;
|
|
|
|
move-result-object v0
|
|
|
|
if-ne p5, v3, :cond_f
|
|
|
|
invoke-static {}, Landroidx/vectordrawable/graphics/drawable/ArgbEvaluator;->getInstance()Landroidx/vectordrawable/graphics/drawable/ArgbEvaluator;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {v0, p0}, Landroid/animation/PropertyValuesHolder;->setEvaluator(Landroid/animation/TypeEvaluator;)V
|
|
|
|
:cond_f
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static loadValues(Landroid/content/Context;Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Lorg/xmlpull/v1/XmlPullParser;Landroid/util/AttributeSet;)[Landroid/animation/PropertyValuesHolder;
|
|
.locals 17
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lorg/xmlpull/v1/XmlPullParserException;,
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
move-object/from16 v6, p3
|
|
|
|
const/4 v7, 0x0
|
|
|
|
move-object v8, v7
|
|
|
|
:goto_0
|
|
invoke-interface/range {p3 .. p3}, Lorg/xmlpull/v1/XmlPullParser;->getEventType()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/4 v1, 0x3
|
|
|
|
if-eq v0, v1, :cond_5
|
|
|
|
const/4 v10, 0x1
|
|
|
|
if-eq v0, v10, :cond_5
|
|
|
|
const/4 v2, 0x2
|
|
|
|
if-eq v0, v2, :cond_0
|
|
|
|
invoke-interface/range {p3 .. p3}, Lorg/xmlpull/v1/XmlPullParser;->next()I
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-interface/range {p3 .. p3}, Lorg/xmlpull/v1/XmlPullParser;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v3, "propertyValuesHolder"
|
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
sget-object v0, Landroidx/vectordrawable/graphics/drawable/AndroidResources;->STYLEABLE_PROPERTY_VALUES_HOLDER:[I
|
|
|
|
move-object/from16 v11, p1
|
|
|
|
move-object/from16 v12, p2
|
|
|
|
move-object/from16 v13, p4
|
|
|
|
invoke-static {v11, v12, v13, v0}, Landroidx/core/content/res/TypedArrayUtils;->obtainAttributes(Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;
|
|
|
|
move-result-object v14
|
|
|
|
const-string v0, "propertyName"
|
|
|
|
invoke-static {v14, v6, v0, v1}, Landroidx/core/content/res/TypedArrayUtils;->getNamedString(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;I)Ljava/lang/String;
|
|
|
|
move-result-object v15
|
|
|
|
const/4 v0, 0x4
|
|
|
|
const-string/jumbo v1, "valueType"
|
|
|
|
invoke-static {v14, v6, v1, v2, v0}, Landroidx/core/content/res/TypedArrayUtils;->getNamedInt(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;II)I
|
|
|
|
move-result v5
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
move-object/from16 v1, p1
|
|
|
|
move-object/from16 v2, p2
|
|
|
|
move-object/from16 v3, p3
|
|
|
|
move-object v4, v15
|
|
|
|
move/from16 v16, v5
|
|
|
|
invoke-static/range {v0 .. v5}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->loadPvh(Landroid/content/Context;Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;I)Landroid/animation/PropertyValuesHolder;
|
|
|
|
move-result-object v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
move/from16 v1, v16
|
|
|
|
invoke-static {v14, v1, v9, v10, v15}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->getPVH(Landroid/content/res/TypedArray;IIILjava/lang/String;)Landroid/animation/PropertyValuesHolder;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_1
|
|
if-eqz v0, :cond_3
|
|
|
|
if-nez v8, :cond_2
|
|
|
|
new-instance v1, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
move-object v8, v1
|
|
|
|
:cond_2
|
|
invoke-virtual {v8, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
:cond_3
|
|
invoke-virtual {v14}, Landroid/content/res/TypedArray;->recycle()V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
move-object/from16 v11, p1
|
|
|
|
move-object/from16 v12, p2
|
|
|
|
move-object/from16 v13, p4
|
|
|
|
:goto_1
|
|
invoke-interface/range {p3 .. p3}, Lorg/xmlpull/v1/XmlPullParser;->next()I
|
|
|
|
goto :goto_0
|
|
|
|
:cond_5
|
|
if-eqz v8, :cond_6
|
|
|
|
invoke-virtual {v8}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result v0
|
|
|
|
new-array v7, v0, [Landroid/animation/PropertyValuesHolder;
|
|
|
|
:goto_2
|
|
if-ge v9, v0, :cond_6
|
|
|
|
invoke-virtual {v8, v9}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Landroid/animation/PropertyValuesHolder;
|
|
|
|
aput-object v1, v7, v9
|
|
|
|
add-int/lit8 v9, v9, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_6
|
|
return-object v7
|
|
.end method
|
|
|
|
.method public static parseAnimatorFromTypeArray(Landroid/animation/ValueAnimator;Landroid/content/res/TypedArray;Landroid/content/res/TypedArray;FLorg/xmlpull/v1/XmlPullParser;)V
|
|
.locals 11
|
|
|
|
const-string v0, "duration"
|
|
|
|
const/4 v1, 0x1
|
|
|
|
const/16 v2, 0x12c
|
|
|
|
invoke-static {p1, p4, v0, v1, v2}, Landroidx/core/content/res/TypedArrayUtils;->getNamedInt(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;II)I
|
|
|
|
move-result v0
|
|
|
|
int-to-long v2, v0
|
|
|
|
const-string v0, "startOffset"
|
|
|
|
const/4 v4, 0x2
|
|
|
|
const/4 v5, 0x0
|
|
|
|
invoke-static {p1, p4, v0, v4, v5}, Landroidx/core/content/res/TypedArrayUtils;->getNamedInt(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;II)I
|
|
|
|
move-result v0
|
|
|
|
int-to-long v6, v0
|
|
|
|
const-string/jumbo v0, "valueType"
|
|
|
|
const/4 v4, 0x7
|
|
|
|
const/4 v8, 0x4
|
|
|
|
invoke-static {p1, p4, v0, v4, v8}, Landroidx/core/content/res/TypedArrayUtils;->getNamedInt(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;II)I
|
|
|
|
move-result v0
|
|
|
|
const-string/jumbo v4, "valueFrom"
|
|
|
|
invoke-static {p4, v4}, Landroidx/core/content/res/TypedArrayUtils;->hasAttribute(Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
const-string/jumbo v4, "valueTo"
|
|
|
|
invoke-static {p4, v4}, Landroidx/core/content/res/TypedArrayUtils;->hasAttribute(Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
const/4 v4, 0x6
|
|
|
|
const/4 v9, 0x5
|
|
|
|
if-ne v0, v8, :cond_0
|
|
|
|
invoke-static {p1, v9, v4}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->inferValueTypeFromValues(Landroid/content/res/TypedArray;II)I
|
|
|
|
move-result v0
|
|
|
|
:cond_0
|
|
const-string v10, ""
|
|
|
|
invoke-static {p1, v0, v9, v4, v10}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->getPVH(Landroid/content/res/TypedArray;IIILjava/lang/String;)Landroid/animation/PropertyValuesHolder;
|
|
|
|
move-result-object v4
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
new-array v9, v1, [Landroid/animation/PropertyValuesHolder;
|
|
|
|
aput-object v4, v9, v5
|
|
|
|
invoke-virtual {p0, v9}, Landroid/animation/ValueAnimator;->setValues([Landroid/animation/PropertyValuesHolder;)V
|
|
|
|
:cond_1
|
|
invoke-virtual {p0, v2, v3}, Landroid/animation/ValueAnimator;->setDuration(J)Landroid/animation/ValueAnimator;
|
|
|
|
invoke-virtual {p0, v6, v7}, Landroid/animation/ValueAnimator;->setStartDelay(J)V
|
|
|
|
const/4 v2, 0x3
|
|
|
|
const-string v3, "repeatCount"
|
|
|
|
invoke-static {p1, p4, v3, v2, v5}, Landroidx/core/content/res/TypedArrayUtils;->getNamedInt(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;II)I
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {p0, v2}, Landroid/animation/ValueAnimator;->setRepeatCount(I)V
|
|
|
|
const-string v2, "repeatMode"
|
|
|
|
invoke-static {p1, p4, v2, v8, v1}, Landroidx/core/content/res/TypedArrayUtils;->getNamedInt(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;II)I
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Landroid/animation/ValueAnimator;->setRepeatMode(I)V
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
invoke-static {p0, p2, v0, p3, p4}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->setupObjectAnimator(Landroid/animation/ValueAnimator;Landroid/content/res/TypedArray;IFLorg/xmlpull/v1/XmlPullParser;)V
|
|
|
|
:cond_2
|
|
return-void
|
|
.end method
|
|
|
|
.method public static setupObjectAnimator(Landroid/animation/ValueAnimator;Landroid/content/res/TypedArray;IFLorg/xmlpull/v1/XmlPullParser;)V
|
|
.locals 5
|
|
|
|
check-cast p0, Landroid/animation/ObjectAnimator;
|
|
|
|
const-string v0, "pathData"
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-static {p1, p4, v0, v1}, Landroidx/core/content/res/TypedArrayUtils;->getNamedString(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
const-string v1, "propertyXName"
|
|
|
|
const/4 v2, 0x2
|
|
|
|
invoke-static {p1, p4, v1, v2}, Landroidx/core/content/res/TypedArrayUtils;->getNamedString(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;I)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v3, 0x3
|
|
|
|
const-string v4, "propertyYName"
|
|
|
|
invoke-static {p1, p4, v4, v3}, Landroidx/core/content/res/TypedArrayUtils;->getNamedString(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;I)Ljava/lang/String;
|
|
|
|
move-result-object p4
|
|
|
|
if-eq p2, v2, :cond_0
|
|
|
|
const/4 v2, 0x4
|
|
|
|
:cond_0
|
|
if-nez v1, :cond_2
|
|
|
|
if-eqz p4, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
new-instance p0, Landroid/view/InflateException;
|
|
|
|
new-instance p2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {p1}, Landroid/content/res/TypedArray;->getPositionDescription()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, " propertyXName or propertyYName is needed for PathData"
|
|
|
|
invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Landroid/view/InflateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
|
|
:cond_2
|
|
:goto_0
|
|
invoke-static {v0}, Landroidx/core/graphics/PathParser;->createPathFromPathData(Ljava/lang/String;)Landroid/graphics/Path;
|
|
|
|
move-result-object p1
|
|
|
|
const/high16 p2, 0x3f000000 # 0.5f
|
|
|
|
mul-float p3, p3, p2
|
|
|
|
invoke-static {p1, p0, p3, v1, p4}, Landroidx/vectordrawable/graphics/drawable/AnimatorInflaterCompat;->setupPathMotion(Landroid/graphics/Path;Landroid/animation/ObjectAnimator;FLjava/lang/String;Ljava/lang/String;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
const/4 p2, 0x0
|
|
|
|
const-string p3, "propertyName"
|
|
|
|
invoke-static {p1, p4, p3, p2}, Landroidx/core/content/res/TypedArrayUtils;->getNamedString(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Landroid/animation/ObjectAnimator;->setPropertyName(Ljava/lang/String;)V
|
|
|
|
:goto_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public static setupPathMotion(Landroid/graphics/Path;Landroid/animation/ObjectAnimator;FLjava/lang/String;Ljava/lang/String;)V
|
|
.locals 17
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
move-object/from16 v1, p1
|
|
|
|
move-object/from16 v2, p3
|
|
|
|
move-object/from16 v3, p4
|
|
|
|
new-instance v4, Landroid/graphics/PathMeasure;
|
|
|
|
const/4 v5, 0x0
|
|
|
|
invoke-direct {v4, v0, v5}, Landroid/graphics/PathMeasure;-><init>(Landroid/graphics/Path;Z)V
|
|
|
|
new-instance v6, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v6}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
const/4 v7, 0x0
|
|
|
|
invoke-static {v7}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-virtual {v6, v8}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
const/4 v8, 0x0
|
|
|
|
:cond_0
|
|
invoke-virtual {v4}, Landroid/graphics/PathMeasure;->getLength()F
|
|
|
|
move-result v9
|
|
|
|
add-float/2addr v8, v9
|
|
|
|
invoke-static {v8}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;
|
|
|
|
move-result-object v9
|
|
|
|
invoke-virtual {v6, v9}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
invoke-virtual {v4}, Landroid/graphics/PathMeasure;->nextContour()Z
|
|
|
|
move-result v9
|
|
|
|
if-nez v9, :cond_0
|
|
|
|
new-instance v4, Landroid/graphics/PathMeasure;
|
|
|
|
invoke-direct {v4, v0, v5}, Landroid/graphics/PathMeasure;-><init>(Landroid/graphics/Path;Z)V
|
|
|
|
const/16 v0, 0x64
|
|
|
|
div-float v9, v8, p2
|
|
|
|
float-to-int v9, v9
|
|
|
|
const/4 v10, 0x1
|
|
|
|
add-int/2addr v9, v10
|
|
|
|
invoke-static {v0, v9}, Ljava/lang/Math;->min(II)I
|
|
|
|
move-result v0
|
|
|
|
new-array v9, v0, [F
|
|
|
|
new-array v11, v0, [F
|
|
|
|
const/4 v12, 0x2
|
|
|
|
new-array v13, v12, [F
|
|
|
|
add-int/lit8 v14, v0, -0x1
|
|
|
|
int-to-float v14, v14
|
|
|
|
div-float/2addr v8, v14
|
|
|
|
const/4 v14, 0x0
|
|
|
|
const/4 v15, 0x0
|
|
|
|
:goto_0
|
|
const/4 v12, 0x0
|
|
|
|
if-ge v14, v0, :cond_2
|
|
|
|
invoke-virtual {v6, v15}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v16
|
|
|
|
check-cast v16, Ljava/lang/Float;
|
|
|
|
invoke-virtual/range {v16 .. v16}, Ljava/lang/Float;->floatValue()F
|
|
|
|
move-result v16
|
|
|
|
sub-float v10, v7, v16
|
|
|
|
invoke-virtual {v4, v10, v13, v12}, Landroid/graphics/PathMeasure;->getPosTan(F[F[F)Z
|
|
|
|
aget v10, v13, v5
|
|
|
|
aput v10, v9, v14
|
|
|
|
const/4 v10, 0x1
|
|
|
|
aget v12, v13, v10
|
|
|
|
aput v12, v11, v14
|
|
|
|
add-float/2addr v7, v8
|
|
|
|
add-int/lit8 v10, v15, 0x1
|
|
|
|
invoke-virtual {v6}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result v12
|
|
|
|
if-ge v10, v12, :cond_1
|
|
|
|
invoke-virtual {v6, v10}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v12
|
|
|
|
check-cast v12, Ljava/lang/Float;
|
|
|
|
invoke-virtual {v12}, Ljava/lang/Float;->floatValue()F
|
|
|
|
move-result v12
|
|
|
|
cmpl-float v12, v7, v12
|
|
|
|
if-lez v12, :cond_1
|
|
|
|
invoke-virtual {v4}, Landroid/graphics/PathMeasure;->nextContour()Z
|
|
|
|
move v15, v10
|
|
|
|
:cond_1
|
|
add-int/lit8 v14, v14, 0x1
|
|
|
|
const/4 v10, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
if-eqz v2, :cond_3
|
|
|
|
invoke-static {v2, v9}, Landroid/animation/PropertyValuesHolder;->ofFloat(Ljava/lang/String;[F)Landroid/animation/PropertyValuesHolder;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
move-object v0, v12
|
|
|
|
:goto_1
|
|
if-eqz v3, :cond_4
|
|
|
|
invoke-static {v3, v11}, Landroid/animation/PropertyValuesHolder;->ofFloat(Ljava/lang/String;[F)Landroid/animation/PropertyValuesHolder;
|
|
|
|
move-result-object v12
|
|
|
|
:cond_4
|
|
if-nez v0, :cond_5
|
|
|
|
const/4 v2, 0x1
|
|
|
|
new-array v0, v2, [Landroid/animation/PropertyValuesHolder;
|
|
|
|
aput-object v12, v0, v5
|
|
|
|
invoke-virtual {v1, v0}, Landroid/animation/ObjectAnimator;->setValues([Landroid/animation/PropertyValuesHolder;)V
|
|
|
|
goto :goto_2
|
|
|
|
:cond_5
|
|
const/4 v2, 0x1
|
|
|
|
if-nez v12, :cond_6
|
|
|
|
new-array v2, v2, [Landroid/animation/PropertyValuesHolder;
|
|
|
|
aput-object v0, v2, v5
|
|
|
|
invoke-virtual {v1, v2}, Landroid/animation/ObjectAnimator;->setValues([Landroid/animation/PropertyValuesHolder;)V
|
|
|
|
goto :goto_2
|
|
|
|
:cond_6
|
|
const/4 v3, 0x2
|
|
|
|
new-array v3, v3, [Landroid/animation/PropertyValuesHolder;
|
|
|
|
aput-object v0, v3, v5
|
|
|
|
aput-object v12, v3, v2
|
|
|
|
invoke-virtual {v1, v3}, Landroid/animation/ObjectAnimator;->setValues([Landroid/animation/PropertyValuesHolder;)V
|
|
|
|
:goto_2
|
|
return-void
|
|
.end method
|