.class public Landroidx/vectordrawable/graphics/drawable/AnimationUtilsCompat; .super Ljava/lang/Object; # annotations .annotation build Landroidx/annotation/RestrictTo; value = { .enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope; } .end annotation # direct methods .method private constructor ()V .locals 0 invoke-direct {p0}, Ljava/lang/Object;->()V return-void .end method .method private static createInterpolatorFromXml(Landroid/content/Context;Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Lorg/xmlpull/v1/XmlPullParser;)Landroid/view/animation/Interpolator; .locals 2 .annotation system Ldalvik/annotation/Throws; value = { Lorg/xmlpull/v1/XmlPullParserException;, Ljava/io/IOException; } .end annotation invoke-interface {p3}, Lorg/xmlpull/v1/XmlPullParser;->getDepth()I move-result p1 const/4 p2, 0x0 :cond_0 :goto_0 invoke-interface {p3}, Lorg/xmlpull/v1/XmlPullParser;->next()I move-result v0 const/4 v1, 0x3 if-ne v0, v1, :cond_1 invoke-interface {p3}, Lorg/xmlpull/v1/XmlPullParser;->getDepth()I move-result v1 if-le v1, p1, :cond_c :cond_1 const/4 v1, 0x1 if-eq v0, v1, :cond_c const/4 v1, 0x2 if-ne v0, v1, :cond_0 invoke-static {p3}, Landroid/util/Xml;->asAttributeSet(Lorg/xmlpull/v1/XmlPullParser;)Landroid/util/AttributeSet; move-result-object p2 invoke-interface {p3}, Lorg/xmlpull/v1/XmlPullParser;->getName()Ljava/lang/String; move-result-object v0 const-string v1, "linearInterpolator" invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v1 if-eqz v1, :cond_2 new-instance p2, Landroid/view/animation/LinearInterpolator; invoke-direct {p2}, Landroid/view/animation/LinearInterpolator;->()V goto :goto_0 :cond_2 const-string v1, "accelerateInterpolator" invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v1 if-eqz v1, :cond_3 new-instance v0, Landroid/view/animation/AccelerateInterpolator; invoke-direct {v0, p0, p2}, Landroid/view/animation/AccelerateInterpolator;->(Landroid/content/Context;Landroid/util/AttributeSet;)V :goto_1 move-object p2, v0 goto :goto_0 :cond_3 const-string v1, "decelerateInterpolator" invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v1 if-eqz v1, :cond_4 new-instance v0, Landroid/view/animation/DecelerateInterpolator; invoke-direct {v0, p0, p2}, Landroid/view/animation/DecelerateInterpolator;->(Landroid/content/Context;Landroid/util/AttributeSet;)V goto :goto_1 :cond_4 const-string v1, "accelerateDecelerateInterpolator" invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v1 if-eqz v1, :cond_5 new-instance p2, Landroid/view/animation/AccelerateDecelerateInterpolator; invoke-direct {p2}, Landroid/view/animation/AccelerateDecelerateInterpolator;->()V goto :goto_0 :cond_5 const-string v1, "cycleInterpolator" invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v1 if-eqz v1, :cond_6 new-instance v0, Landroid/view/animation/CycleInterpolator; invoke-direct {v0, p0, p2}, Landroid/view/animation/CycleInterpolator;->(Landroid/content/Context;Landroid/util/AttributeSet;)V goto :goto_1 :cond_6 const-string v1, "anticipateInterpolator" invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v1 if-eqz v1, :cond_7 new-instance v0, Landroid/view/animation/AnticipateInterpolator; invoke-direct {v0, p0, p2}, Landroid/view/animation/AnticipateInterpolator;->(Landroid/content/Context;Landroid/util/AttributeSet;)V goto :goto_1 :cond_7 const-string v1, "overshootInterpolator" invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v1 if-eqz v1, :cond_8 new-instance v0, Landroid/view/animation/OvershootInterpolator; invoke-direct {v0, p0, p2}, Landroid/view/animation/OvershootInterpolator;->(Landroid/content/Context;Landroid/util/AttributeSet;)V goto :goto_1 :cond_8 const-string v1, "anticipateOvershootInterpolator" invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v1 if-eqz v1, :cond_9 new-instance v0, Landroid/view/animation/AnticipateOvershootInterpolator; invoke-direct {v0, p0, p2}, Landroid/view/animation/AnticipateOvershootInterpolator;->(Landroid/content/Context;Landroid/util/AttributeSet;)V goto :goto_1 :cond_9 const-string v1, "bounceInterpolator" invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v1 if-eqz v1, :cond_a new-instance p2, Landroid/view/animation/BounceInterpolator; invoke-direct {p2}, Landroid/view/animation/BounceInterpolator;->()V goto/16 :goto_0 :cond_a const-string v1, "pathInterpolator" invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v0 if-eqz v0, :cond_b new-instance v0, Landroidx/vectordrawable/graphics/drawable/PathInterpolatorCompat; invoke-direct {v0, p0, p2, p3}, Landroidx/vectordrawable/graphics/drawable/PathInterpolatorCompat;->(Landroid/content/Context;Landroid/util/AttributeSet;Lorg/xmlpull/v1/XmlPullParser;)V goto :goto_1 :cond_b new-instance p0, Ljava/lang/RuntimeException; new-instance p1, Ljava/lang/StringBuilder; const-string p2, "Unknown interpolator name: " invoke-direct {p1, p2}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-interface {p3}, Lorg/xmlpull/v1/XmlPullParser;->getName()Ljava/lang/String; move-result-object p2 invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 invoke-direct {p0, p1}, Ljava/lang/RuntimeException;->(Ljava/lang/String;)V throw p0 :cond_c return-object p2 .end method .method public static loadInterpolator(Landroid/content/Context;I)Landroid/view/animation/Interpolator; .locals 4 .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, 0x15 if-lt v0, v1, :cond_0 invoke-static {p0, p1}, Landroid/view/animation/AnimationUtils;->loadInterpolator(Landroid/content/Context;I)Landroid/view/animation/Interpolator; move-result-object p0 return-object p0 :cond_0 const/4 v0, 0x0 const v1, 0x10c000f if-ne p1, v1, :cond_1 :try_start_0 new-instance p0, Landroidx/interpolator/view/animation/FastOutLinearInInterpolator; invoke-direct {p0}, Landroidx/interpolator/view/animation/FastOutLinearInInterpolator;->()V return-object p0 :catchall_0 move-exception p0 goto/16 :goto_2 :catch_0 move-exception p0 goto :goto_0 :catch_1 move-exception p0 goto :goto_1 :cond_1 const v1, 0x10c000d if-ne p1, v1, :cond_2 new-instance p0, Landroidx/interpolator/view/animation/FastOutSlowInInterpolator; invoke-direct {p0}, Landroidx/interpolator/view/animation/FastOutSlowInInterpolator;->()V return-object p0 :cond_2 const v1, 0x10c000e if-ne p1, v1, :cond_3 new-instance p0, Landroidx/interpolator/view/animation/LinearOutSlowInInterpolator; invoke-direct {p0}, Landroidx/interpolator/view/animation/LinearOutSlowInInterpolator;->()V return-object p0 :cond_3 invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources; move-result-object v1 invoke-virtual {v1, p1}, Landroid/content/res/Resources;->getAnimation(I)Landroid/content/res/XmlResourceParser; move-result-object v1 :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 :try_start_1 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 v2 invoke-static {p0, v0, v2, v1}, Landroidx/vectordrawable/graphics/drawable/AnimationUtilsCompat;->createInterpolatorFromXml(Landroid/content/Context;Landroid/content/res/Resources;Landroid/content/res/Resources$Theme;Lorg/xmlpull/v1/XmlPullParser;)Landroid/view/animation/Interpolator; move-result-object p0 :try_end_1 .catch Lorg/xmlpull/v1/XmlPullParserException; {:try_start_1 .. :try_end_1} :catch_3 .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_2 .catchall {:try_start_1 .. :try_end_1} :catchall_1 if-eqz v1, :cond_4 invoke-interface {v1}, Landroid/content/res/XmlResourceParser;->close()V :cond_4 return-object p0 :catchall_1 move-exception p0 move-object v0, v1 goto :goto_2 :catch_2 move-exception p0 move-object v0, v1 goto :goto_0 :catch_3 move-exception p0 move-object v0, v1 goto :goto_1 :goto_0 :try_start_2 new-instance v1, Landroid/content/res/Resources$NotFoundException; new-instance v2, Ljava/lang/StringBuilder; const-string v3, "Can\'t load animation resource ID #0x" invoke-direct {v2, v3}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-static {p1}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String; move-result-object p1 invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 invoke-direct {v1, p1}, Landroid/content/res/Resources$NotFoundException;->(Ljava/lang/String;)V invoke-virtual {v1, p0}, Landroid/content/res/Resources$NotFoundException;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable; throw v1 :goto_1 new-instance v1, Landroid/content/res/Resources$NotFoundException; new-instance v2, Ljava/lang/StringBuilder; const-string v3, "Can\'t load animation resource ID #0x" invoke-direct {v2, v3}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-static {p1}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String; move-result-object p1 invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 invoke-direct {v1, p1}, Landroid/content/res/Resources$NotFoundException;->(Ljava/lang/String;)V invoke-virtual {v1, p0}, Landroid/content/res/Resources$NotFoundException;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable; throw v1 :try_end_2 .catchall {:try_start_2 .. :try_end_2} :catchall_0 :goto_2 if-eqz v0, :cond_5 invoke-interface {v0}, Landroid/content/res/XmlResourceParser;->close()V :cond_5 throw p0 .end method