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

315 lines
8.1 KiB
Smali

.class Lcom/airbnb/lottie/parser/GradientFillParser;
.super Ljava/lang/Object;
.source "GradientFillParser.java"
# static fields
.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 8
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, "r"
const-string v7, "hd"
.line 18
filled-new-array/range {v0 .. v7}, [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/GradientFillParser;->NAMES:Lcom/airbnb/lottie/parser/moshi/JsonReader$Options;
const-string v0, "p"
const-string v1, "k"
.line 28
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/GradientFillParser;->GRADIENT_NAMES:Lcom/airbnb/lottie/parser/moshi/JsonReader$Options;
return-void
.end method
.method private constructor <init>()V
.locals 0
.line 33
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/GradientFill;
.locals 14
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 44
sget-object v0, Landroid/graphics/Path$FillType;->WINDING:Landroid/graphics/Path$FillType;
const/4 v1, 0x0
const/4 v2, 0x0
move-object v6, v0
move-object v4, v1
move-object v5, v4
move-object v7, v5
move-object v9, v7
move-object v10, v9
move v13, v2
.line 47
:goto_0
invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->hasNext()Z
move-result v0
if-eqz v0, :cond_5
sget-object v0, Lcom/airbnb/lottie/parser/GradientFillParser;->NAMES:Lcom/airbnb/lottie/parser/moshi/JsonReader$Options;
.line 48
invoke-virtual {p0, v0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->selectName(Lcom/airbnb/lottie/parser/moshi/JsonReader$Options;)I
move-result v0
const/4 v2, 0x1
packed-switch v0, :pswitch_data_0
.line 89
invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->skipName()V
.line 90
invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->skipValue()V
goto :goto_0
.line 86
:pswitch_0
invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->nextBoolean()Z
move-result v13
goto :goto_0
.line 83
:pswitch_1
invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->nextInt()I
move-result v0
if-ne v0, v2, :cond_0
sget-object v0, Landroid/graphics/Path$FillType;->WINDING:Landroid/graphics/Path$FillType;
goto :goto_1
:cond_0
sget-object v0, Landroid/graphics/Path$FillType;->EVEN_ODD:Landroid/graphics/Path$FillType;
:goto_1
move-object v6, v0
goto :goto_0
.line 80
:pswitch_2
invoke-static {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 v10
goto :goto_0
.line 77
:pswitch_3
invoke-static {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 v9
goto :goto_0
.line 74
:pswitch_4
invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->nextInt()I
move-result v0
if-ne v0, v2, :cond_1
sget-object v0, Lcom/airbnb/lottie/model/content/GradientType;->LINEAR:Lcom/airbnb/lottie/model/content/GradientType;
goto :goto_2
:cond_1
sget-object v0, Lcom/airbnb/lottie/model/content/GradientType;->RADIAL:Lcom/airbnb/lottie/model/content/GradientType;
:goto_2
move-object v5, v0
goto :goto_0
.line 71
:pswitch_5
invoke-static {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 v1
goto :goto_0
.line 54
:pswitch_6
invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->beginObject()V
const/4 v0, -0x1
.line 55
:goto_3
invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->hasNext()Z
move-result v3
if-eqz v3, :cond_4
sget-object v3, Lcom/airbnb/lottie/parser/GradientFillParser;->GRADIENT_NAMES:Lcom/airbnb/lottie/parser/moshi/JsonReader$Options;
.line 56
invoke-virtual {p0, v3}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->selectName(Lcom/airbnb/lottie/parser/moshi/JsonReader$Options;)I
move-result v3
if-eqz v3, :cond_3
if-eq v3, v2, :cond_2
.line 64
invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->skipName()V
.line 65
invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->skipValue()V
goto :goto_3
.line 61
:cond_2
invoke-static {p0, p1, v0}, 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 v7
goto :goto_3
.line 58
:cond_3
invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->nextInt()I
move-result v0
goto :goto_3
.line 68
:cond_4
invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->endObject()V
goto :goto_0
.line 50
:pswitch_7
invoke-virtual {p0}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->nextString()Ljava/lang/String;
move-result-object v4
goto :goto_0
:cond_5
if-nez v1, :cond_6
.line 96
new-instance p0, Lcom/airbnb/lottie/model/animatable/AnimatableIntegerValue;
new-instance p1, Lcom/airbnb/lottie/value/Keyframe;
const/16 v0, 0x64
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v0
invoke-direct {p1, v0}, Lcom/airbnb/lottie/value/Keyframe;-><init>(Ljava/lang/Object;)V
invoke-static {p1}, Ljava/util/Collections;->singletonList(Ljava/lang/Object;)Ljava/util/List;
move-result-object p1
invoke-direct {p0, p1}, Lcom/airbnb/lottie/model/animatable/AnimatableIntegerValue;-><init>(Ljava/util/List;)V
move-object v8, p0
goto :goto_4
:cond_6
move-object v8, v1
.line 97
:goto_4
new-instance p0, Lcom/airbnb/lottie/model/content/GradientFill;
const/4 v11, 0x0
const/4 v12, 0x0
move-object v3, p0
invoke-direct/range {v3 .. v13}, Lcom/airbnb/lottie/model/content/GradientFill;-><init>(Ljava/lang/String;Lcom/airbnb/lottie/model/content/GradientType;Landroid/graphics/Path$FillType;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/animatable/AnimatableFloatValue;Z)V
return-object p0
:pswitch_data_0
.packed-switch 0x0
:pswitch_7
:pswitch_6
:pswitch_5
:pswitch_4
:pswitch_3
:pswitch_2
:pswitch_1
:pswitch_0
.end packed-switch
.end method