Rabbit-R1/android (non root)/smali/smali_classes2/com/airbnb/lottie/parser/GradientStrokeParser.smali
2024-05-21 17:08:36 -04:00

621 lines
14 KiB
Smali

.class Lcom/airbnb/lottie/parser/GradientStrokeParser;
.super Ljava/lang/Object;
.source "GradientStrokeParser.java"
# static fields
.field private static final DASH_PATTERN_NAMES:Lcom/airbnb/lottie/parser/moshi/JsonReader$Options;
.field private static final GRADIENT_NAMES:Lcom/airbnb/lottie/parser/moshi/JsonReader$Options;
.field private static final NAMES:Lcom/airbnb/lottie/parser/moshi/JsonReader$Options;
# direct methods
.method static constructor <clinit>()V
.locals 12
const-string v0, "nm"
const-string v1, "g"
const-string v2, "o"
const-string v3, "t"
const-string v4, "s"
const-string v5, "e"
const-string v6, "w"
const-string v7, "lc"
const-string v8, "lj"
const-string v9, "ml"
const-string v10, "hd"
const-string v11, "d"
.line 25
filled-new-array/range {v0 .. v11}, [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/GradientStrokeParser;->NAMES:Lcom/airbnb/lottie/parser/moshi/JsonReader$Options;
const-string v0, "p"
const-string v1, "k"
.line 39
filled-new-array {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/GradientStrokeParser;->GRADIENT_NAMES:Lcom/airbnb/lottie/parser/moshi/JsonReader$Options;
const-string v0, "n"
const-string v1, "v"
.line 43
filled-new-array {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/GradientStrokeParser;->DASH_PATTERN_NAMES:Lcom/airbnb/lottie/parser/moshi/JsonReader$Options;
return-void
.end method
.method private constructor <init>()V
.locals 0
.line 22
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method static parse(Lcom/airbnb/lottie/parser/moshi/JsonReader;Lcom/airbnb/lottie/LottieComposition;)Lcom/airbnb/lottie/model/content/GradientStroke;
.locals 21
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
move-object/from16 v0, p0
move-object/from16 v1, p1
.line 64
new-instance v11, Ljava/util/ArrayList;
invoke-direct {v11}, Ljava/util/ArrayList;-><init>()V
const/4 v3, 0x0
move v13, v3
const/4 v3, 0x0
const/4 v5, 0x0
const/4 v6, 0x0
const/4 v7, 0x0
const/4 v8, 0x0
const/4 v9, 0x0
const/4 v10, 0x0
const/4 v12, 0x0
const/4 v14, 0x0
const/4 v15, 0x0
const/16 v16, 0x0
.line 66
:goto_0
invoke-virtual/range {p0 .. p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->hasNext()Z
move-result v17
if-eqz v17, :cond_c
sget-object v2, Lcom/airbnb/lottie/parser/GradientStrokeParser;->NAMES:Lcom/airbnb/lottie/parser/moshi/JsonReader$Options;
.line 67
invoke-virtual {v0, v2}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->selectName(Lcom/airbnb/lottie/parser/moshi/JsonReader$Options;)I
move-result v2
packed-switch v2, :pswitch_data_0
move-object v4, v3
.line 151
invoke-virtual/range {p0 .. p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->skipName()V
.line 152
invoke-virtual/range {p0 .. p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->skipValue()V
goto :goto_0
.line 117
:pswitch_0
invoke-virtual/range {p0 .. p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->beginArray()V
.line 118
:goto_1
invoke-virtual/range {p0 .. p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->hasNext()Z
move-result v2
if-eqz v2, :cond_6
.line 121
invoke-virtual/range {p0 .. p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->beginObject()V
const/4 v2, 0x0
const/16 v18, 0x0
.line 122
:goto_2
invoke-virtual/range {p0 .. p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->hasNext()Z
move-result v19
if-eqz v19, :cond_2
sget-object v4, Lcom/airbnb/lottie/parser/GradientStrokeParser;->DASH_PATTERN_NAMES:Lcom/airbnb/lottie/parser/moshi/JsonReader$Options;
.line 123
invoke-virtual {v0, v4}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->selectName(Lcom/airbnb/lottie/parser/moshi/JsonReader$Options;)I
move-result v4
if-eqz v4, :cond_1
move-object/from16 v20, v14
const/4 v14, 0x1
if-eq v4, v14, :cond_0
.line 131
invoke-virtual/range {p0 .. p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->skipName()V
.line 132
invoke-virtual/range {p0 .. p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->skipValue()V
goto :goto_3
.line 128
:cond_0
invoke-static/range {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 v18
:goto_3
move-object/from16 v14, v20
goto :goto_2
:cond_1
move-object/from16 v20, v14
.line 125
invoke-virtual/range {p0 .. p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->nextString()Ljava/lang/String;
move-result-object v2
goto :goto_2
:cond_2
move-object/from16 v20, v14
.line 135
invoke-virtual/range {p0 .. p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->endObject()V
const-string v4, "o"
.line 137
invoke-virtual {v2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_3
move-object/from16 v14, v18
const/4 v2, 0x1
goto :goto_1
:cond_3
const-string v4, "d"
.line 139
invoke-virtual {v2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
if-nez v4, :cond_5
const-string v4, "g"
invoke-virtual {v2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_4
goto :goto_4
:cond_4
const/4 v2, 0x1
goto :goto_5
:cond_5
:goto_4
const/4 v2, 0x1
.line 140
invoke-virtual {v1, v2}, Lcom/airbnb/lottie/LottieComposition;->setHasDashPattern(Z)V
move-object/from16 v4, v18
.line 141
invoke-interface {v11, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
:goto_5
move-object/from16 v14, v20
goto :goto_1
:cond_6
move-object/from16 v20, v14
const/4 v2, 0x1
.line 144
invoke-virtual/range {p0 .. p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->endArray()V
.line 145
invoke-interface {v11}, Ljava/util/List;->size()I
move-result v4
if-ne v4, v2, :cond_7
const/4 v2, 0x0
.line 147
invoke-interface {v11, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v4
check-cast v4, Lcom/airbnb/lottie/model/animatable/AnimatableFloatValue;
invoke-interface {v11, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
goto :goto_6
:cond_7
const/4 v2, 0x0
:goto_6
move-object/from16 v14, v20
goto/16 :goto_0
:pswitch_1
const/4 v2, 0x0
.line 114
invoke-virtual/range {p0 .. p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->nextBoolean()Z
move-result v15
goto/16 :goto_0
:pswitch_2
move-object v4, v3
.line 111
invoke-virtual/range {p0 .. p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->nextDouble()D
move-result-wide v2
double-to-float v13, v2
goto :goto_7
:pswitch_3
move-object v4, v3
.line 108
invoke-static {}, Lcom/airbnb/lottie/model/content/ShapeStroke$LineJoinType;->values()[Lcom/airbnb/lottie/model/content/ShapeStroke$LineJoinType;
move-result-object v2
invoke-virtual/range {p0 .. p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->nextInt()I
move-result v3
const/4 v12, 0x1
sub-int/2addr v3, v12
aget-object v12, v2, v3
goto :goto_7
:pswitch_4
move-object v4, v3
const/4 v2, 0x1
.line 105
invoke-static {}, Lcom/airbnb/lottie/model/content/ShapeStroke$LineCapType;->values()[Lcom/airbnb/lottie/model/content/ShapeStroke$LineCapType;
move-result-object v3
invoke-virtual/range {p0 .. p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->nextInt()I
move-result v10
sub-int/2addr v10, v2
aget-object v10, v3, v10
:goto_7
move-object v3, v4
goto/16 :goto_0
:pswitch_5
move-object v4, v3
.line 102
invoke-static/range {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 v9
goto/16 :goto_0
:pswitch_6
move-object v4, v3
.line 99
invoke-static/range {p0 .. p1}, Lcom/airbnb/lottie/parser/AnimatableValueParser;->parsePoint(Lcom/airbnb/lottie/parser/moshi/JsonReader;Lcom/airbnb/lottie/LottieComposition;)Lcom/airbnb/lottie/model/animatable/AnimatablePointValue;
move-result-object v8
goto/16 :goto_0
:pswitch_7
move-object v4, v3
.line 96
invoke-static/range {p0 .. p1}, Lcom/airbnb/lottie/parser/AnimatableValueParser;->parsePoint(Lcom/airbnb/lottie/parser/moshi/JsonReader;Lcom/airbnb/lottie/LottieComposition;)Lcom/airbnb/lottie/model/animatable/AnimatablePointValue;
move-result-object v7
goto/16 :goto_0
:pswitch_8
move-object v4, v3
const/4 v2, 0x1
.line 93
invoke-virtual/range {p0 .. p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->nextInt()I
move-result v3
if-ne v3, v2, :cond_8
sget-object v2, Lcom/airbnb/lottie/model/content/GradientType;->LINEAR:Lcom/airbnb/lottie/model/content/GradientType;
goto :goto_8
:cond_8
sget-object v2, Lcom/airbnb/lottie/model/content/GradientType;->RADIAL:Lcom/airbnb/lottie/model/content/GradientType;
:goto_8
move-object v5, v2
goto :goto_7
:pswitch_9
move-object v4, v3
.line 90
invoke-static/range {p0 .. p1}, Lcom/airbnb/lottie/parser/AnimatableValueParser;->parseInteger(Lcom/airbnb/lottie/parser/moshi/JsonReader;Lcom/airbnb/lottie/LottieComposition;)Lcom/airbnb/lottie/model/animatable/AnimatableIntegerValue;
move-result-object v16
goto/16 :goto_0
:pswitch_a
move-object v4, v3
.line 73
invoke-virtual/range {p0 .. p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->beginObject()V
const/4 v2, -0x1
.line 74
:goto_9
invoke-virtual/range {p0 .. p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->hasNext()Z
move-result v3
if-eqz v3, :cond_b
sget-object v3, Lcom/airbnb/lottie/parser/GradientStrokeParser;->GRADIENT_NAMES:Lcom/airbnb/lottie/parser/moshi/JsonReader$Options;
.line 75
invoke-virtual {v0, v3}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->selectName(Lcom/airbnb/lottie/parser/moshi/JsonReader$Options;)I
move-result v3
if-eqz v3, :cond_a
move-object/from16 v18, v6
const/4 v6, 0x1
if-eq v3, v6, :cond_9
.line 83
invoke-virtual/range {p0 .. p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->skipName()V
.line 84
invoke-virtual/range {p0 .. p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->skipValue()V
goto :goto_a
.line 80
:cond_9
invoke-static {v0, v1, v2}, Lcom/airbnb/lottie/parser/AnimatableValueParser;->parseGradientColor(Lcom/airbnb/lottie/parser/moshi/JsonReader;Lcom/airbnb/lottie/LottieComposition;I)Lcom/airbnb/lottie/model/animatable/AnimatableGradientColorValue;
move-result-object v3
move-object v6, v3
goto :goto_9
:cond_a
move-object/from16 v18, v6
const/4 v6, 0x1
.line 77
invoke-virtual/range {p0 .. p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->nextInt()I
move-result v2
:goto_a
move-object/from16 v6, v18
goto :goto_9
:cond_b
move-object/from16 v18, v6
.line 87
invoke-virtual/range {p0 .. p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->endObject()V
goto :goto_7
.line 69
:pswitch_b
invoke-virtual/range {p0 .. p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->nextString()Ljava/lang/String;
move-result-object v3
goto/16 :goto_0
:cond_c
move-object v4, v3
if-nez v16, :cond_d
.line 158
new-instance v0, Lcom/airbnb/lottie/model/animatable/AnimatableIntegerValue;
new-instance v1, Lcom/airbnb/lottie/value/Keyframe;
const/16 v2, 0x64
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
invoke-direct {v1, v2}, Lcom/airbnb/lottie/value/Keyframe;-><init>(Ljava/lang/Object;)V
invoke-static {v1}, Ljava/util/Collections;->singletonList(Ljava/lang/Object;)Ljava/util/List;
move-result-object v1
invoke-direct {v0, v1}, Lcom/airbnb/lottie/model/animatable/AnimatableIntegerValue;-><init>(Ljava/util/List;)V
move-object/from16 v16, v0
.line 159
:cond_d
new-instance v17, Lcom/airbnb/lottie/model/content/GradientStroke;
move-object/from16 v0, v17
move-object v1, v4
move-object v2, v5
move-object v3, v6
move-object/from16 v4, v16
move-object v5, v7
move-object v6, v8
move-object v7, v9
move-object v8, v10
move-object v9, v12
move v10, v13
move-object v12, v14
move v13, v15
invoke-direct/range {v0 .. v13}, Lcom/airbnb/lottie/model/content/GradientStroke;-><init>(Ljava/lang/String;Lcom/airbnb/lottie/model/content/GradientType;Lcom/airbnb/lottie/model/animatable/AnimatableGradientColorValue;Lcom/airbnb/lottie/model/animatable/AnimatableIntegerValue;Lcom/airbnb/lottie/model/animatable/AnimatablePointValue;Lcom/airbnb/lottie/model/animatable/AnimatablePointValue;Lcom/airbnb/lottie/model/animatable/AnimatableFloatValue;Lcom/airbnb/lottie/model/content/ShapeStroke$LineCapType;Lcom/airbnb/lottie/model/content/ShapeStroke$LineJoinType;FLjava/util/List;Lcom/airbnb/lottie/model/animatable/AnimatableFloatValue;Z)V
return-object v17
nop
:pswitch_data_0
.packed-switch 0x0
:pswitch_b
:pswitch_a
:pswitch_9
:pswitch_8
:pswitch_7
:pswitch_6
:pswitch_5
:pswitch_4
:pswitch_3
:pswitch_2
:pswitch_1
:pswitch_0
.end packed-switch
.end method