.class public Lcom/airbnb/lottie/parser/AnimatablePathValueParser; .super Ljava/lang/Object; .source "AnimatablePathValueParser.java" # static fields .field private static final NAMES:Lcom/airbnb/lottie/parser/moshi/JsonReader$Options; # direct methods .method static constructor ()V .locals 3 const-string v0, "x" const-string v1, "y" const-string v2, "k" .line 20 filled-new-array {v2, v0, v1}, [Ljava/lang/String; move-result-object v0 invoke-static {v0}, Lcom/airbnb/lottie/parser/moshi/JsonReader$Options;->of([Ljava/lang/String;)Lcom/airbnb/lottie/parser/moshi/JsonReader$Options; move-result-object v0 sput-object v0, Lcom/airbnb/lottie/parser/AnimatablePathValueParser;->NAMES:Lcom/airbnb/lottie/parser/moshi/JsonReader$Options; return-void .end method .method private constructor ()V .locals 0 .line 26 invoke-direct {p0}, Ljava/lang/Object;->()V return-void .end method .method public static parse(Lcom/airbnb/lottie/parser/moshi/JsonReader;Lcom/airbnb/lottie/LottieComposition;)Lcom/airbnb/lottie/model/animatable/AnimatablePathValue; .locals 3 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation .line 31 new-instance v0, Ljava/util/ArrayList; invoke-direct {v0}, Ljava/util/ArrayList;->()V .line 32 invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->peek()Lcom/airbnb/lottie/parser/moshi/JsonReader$Token; move-result-object v1 sget-object v2, Lcom/airbnb/lottie/parser/moshi/JsonReader$Token;->BEGIN_ARRAY:Lcom/airbnb/lottie/parser/moshi/JsonReader$Token; if-ne v1, v2, :cond_1 .line 33 invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->beginArray()V .line 34 :goto_0 invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->hasNext()Z move-result v1 if-eqz v1, :cond_0 .line 35 invoke-static {p0, p1}, Lcom/airbnb/lottie/parser/PathKeyframeParser;->parse(Lcom/airbnb/lottie/parser/moshi/JsonReader;Lcom/airbnb/lottie/LottieComposition;)Lcom/airbnb/lottie/animation/keyframe/PathKeyframe; move-result-object v1 invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z goto :goto_0 .line 37 :cond_0 invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->endArray()V .line 38 invoke-static {v0}, Lcom/airbnb/lottie/parser/KeyframesParser;->setEndFrames(Ljava/util/List;)V goto :goto_1 .line 40 :cond_1 new-instance p1, Lcom/airbnb/lottie/value/Keyframe; invoke-static {}, Lcom/airbnb/lottie/utils/Utils;->dpScale()F move-result v1 invoke-static {p0, v1}, Lcom/airbnb/lottie/parser/JsonUtils;->jsonToPoint(Lcom/airbnb/lottie/parser/moshi/JsonReader;F)Landroid/graphics/PointF; move-result-object p0 invoke-direct {p1, p0}, Lcom/airbnb/lottie/value/Keyframe;->(Ljava/lang/Object;)V invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z .line 42 :goto_1 new-instance p0, Lcom/airbnb/lottie/model/animatable/AnimatablePathValue; invoke-direct {p0, v0}, Lcom/airbnb/lottie/model/animatable/AnimatablePathValue;->(Ljava/util/List;)V return-object p0 .end method .method static parseSplitPath(Lcom/airbnb/lottie/parser/moshi/JsonReader;Lcom/airbnb/lottie/LottieComposition;)Lcom/airbnb/lottie/model/animatable/AnimatableValue; .locals 7 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lcom/airbnb/lottie/parser/moshi/JsonReader;", "Lcom/airbnb/lottie/LottieComposition;", ")", "Lcom/airbnb/lottie/model/animatable/AnimatableValue<", "Landroid/graphics/PointF;", "Landroid/graphics/PointF;", ">;" } .end annotation .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation .line 57 invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->beginObject()V const/4 v0, 0x0 const/4 v1, 0x0 move-object v2, v0 move v3, v1 move-object v1, v2 .line 58 :goto_0 invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->peek()Lcom/airbnb/lottie/parser/moshi/JsonReader$Token; move-result-object v4 sget-object v5, Lcom/airbnb/lottie/parser/moshi/JsonReader$Token;->END_OBJECT:Lcom/airbnb/lottie/parser/moshi/JsonReader$Token; if-eq v4, v5, :cond_5 sget-object v4, Lcom/airbnb/lottie/parser/AnimatablePathValueParser;->NAMES:Lcom/airbnb/lottie/parser/moshi/JsonReader$Options; .line 59 invoke-virtual {p0, v4}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->selectName(Lcom/airbnb/lottie/parser/moshi/JsonReader$Options;)I move-result v4 if-eqz v4, :cond_4 const/4 v5, 0x1 if-eq v4, v5, :cond_2 const/4 v6, 0x2 if-eq v4, v6, :cond_0 .line 80 invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->skipName()V .line 81 invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->skipValue()V goto :goto_0 .line 72 :cond_0 invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->peek()Lcom/airbnb/lottie/parser/moshi/JsonReader$Token; move-result-object v4 sget-object v6, Lcom/airbnb/lottie/parser/moshi/JsonReader$Token;->STRING:Lcom/airbnb/lottie/parser/moshi/JsonReader$Token; if-ne v4, v6, :cond_1 .line 74 invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->skipValue()V goto :goto_1 .line 76 :cond_1 invoke-static {p0, p1}, Lcom/airbnb/lottie/parser/AnimatableValueParser;->parseFloat(Lcom/airbnb/lottie/parser/moshi/JsonReader;Lcom/airbnb/lottie/LottieComposition;)Lcom/airbnb/lottie/model/animatable/AnimatableFloatValue; move-result-object v2 goto :goto_0 .line 64 :cond_2 invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->peek()Lcom/airbnb/lottie/parser/moshi/JsonReader$Token; move-result-object v4 sget-object v6, Lcom/airbnb/lottie/parser/moshi/JsonReader$Token;->STRING:Lcom/airbnb/lottie/parser/moshi/JsonReader$Token; if-ne v4, v6, :cond_3 .line 66 invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->skipValue()V :goto_1 move v3, v5 goto :goto_0 .line 68 :cond_3 invoke-static {p0, p1}, Lcom/airbnb/lottie/parser/AnimatableValueParser;->parseFloat(Lcom/airbnb/lottie/parser/moshi/JsonReader;Lcom/airbnb/lottie/LottieComposition;)Lcom/airbnb/lottie/model/animatable/AnimatableFloatValue; move-result-object v1 goto :goto_0 .line 61 :cond_4 invoke-static {p0, p1}, Lcom/airbnb/lottie/parser/AnimatablePathValueParser;->parse(Lcom/airbnb/lottie/parser/moshi/JsonReader;Lcom/airbnb/lottie/LottieComposition;)Lcom/airbnb/lottie/model/animatable/AnimatablePathValue; move-result-object v0 goto :goto_0 .line 84 :cond_5 invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->endObject()V if-eqz v3, :cond_6 const-string p0, "Lottie doesn\'t support expressions." .line 87 invoke-virtual {p1, p0}, Lcom/airbnb/lottie/LottieComposition;->addWarning(Ljava/lang/String;)V :cond_6 if-eqz v0, :cond_7 return-object v0 .line 93 :cond_7 new-instance p0, Lcom/airbnb/lottie/model/animatable/AnimatableSplitDimensionPathValue; invoke-direct {p0, v1, v2}, Lcom/airbnb/lottie/model/animatable/AnimatableSplitDimensionPathValue;->(Lcom/airbnb/lottie/model/animatable/AnimatableFloatValue;Lcom/airbnb/lottie/model/animatable/AnimatableFloatValue;)V return-object p0 .end method