620 lines
19 KiB
Smali
620 lines
19 KiB
Smali
.class public final Landroidx/core/content/res/GradientColorInflaterCompat;
|
|
.super Ljava/lang/Object;
|
|
.source "GradientColorInflaterCompat.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/core/content/res/GradientColorInflaterCompat$ColorStops;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final TILE_MODE_CLAMP:I = 0x0
|
|
|
|
.field public static final TILE_MODE_MIRROR:I = 0x2
|
|
|
|
.field public static final TILE_MODE_REPEAT:I = 0x1
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static checkColors(Landroidx/core/content/res/GradientColorInflaterCompat$ColorStops;IIZI)Landroidx/core/content/res/GradientColorInflaterCompat$ColorStops;
|
|
.locals 0
|
|
.param p0 # Landroidx/core/content/res/GradientColorInflaterCompat$ColorStops;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/ColorInt;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # I
|
|
.annotation build Landroidx/annotation/ColorInt;
|
|
.end annotation
|
|
.end param
|
|
.param p4 # I
|
|
.annotation build Landroidx/annotation/ColorInt;
|
|
.end annotation
|
|
.end param
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
return-object p0
|
|
|
|
:cond_0
|
|
if-eqz p3, :cond_1
|
|
|
|
new-instance p0, Landroidx/core/content/res/GradientColorInflaterCompat$ColorStops;
|
|
|
|
invoke-direct {p0, p1, p4, p2}, Landroidx/core/content/res/GradientColorInflaterCompat$ColorStops;-><init>(III)V
|
|
|
|
return-object p0
|
|
|
|
:cond_1
|
|
new-instance p0, Landroidx/core/content/res/GradientColorInflaterCompat$ColorStops;
|
|
|
|
invoke-direct {p0, p1, p2}, Landroidx/core/content/res/GradientColorInflaterCompat$ColorStops;-><init>(II)V
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static createFromXml(Landroid/content/res/Resources;Lorg/xmlpull/v1/XmlPullParser;Landroid/content/res/Resources$Theme;)Landroid/graphics/Shader;
|
|
.locals 4
|
|
.param p0 # Landroid/content/res/Resources;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p1 # Lorg/xmlpull/v1/XmlPullParser;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Landroid/content/res/Resources$Theme;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lorg/xmlpull/v1/XmlPullParserException;,
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
invoke-static {p1}, Landroid/util/Xml;->asAttributeSet(Lorg/xmlpull/v1/XmlPullParser;)Landroid/util/AttributeSet;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
invoke-interface {p1}, Lorg/xmlpull/v1/XmlPullParser;->next()I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x2
|
|
|
|
if-eq v1, v2, :cond_0
|
|
|
|
const/4 v3, 0x1
|
|
|
|
if-eq v1, v3, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
if-ne v1, v2, :cond_1
|
|
|
|
invoke-static {p0, p1, v0, p2}, Landroidx/core/content/res/GradientColorInflaterCompat;->createFromXmlInner(Landroid/content/res/Resources;Lorg/xmlpull/v1/XmlPullParser;Landroid/util/AttributeSet;Landroid/content/res/Resources$Theme;)Landroid/graphics/Shader;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
:cond_1
|
|
new-instance p0, Lorg/xmlpull/v1/XmlPullParserException;
|
|
|
|
const-string p1, "No start tag found"
|
|
|
|
invoke-direct {p0, p1}, Lorg/xmlpull/v1/XmlPullParserException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method public static createFromXmlInner(Landroid/content/res/Resources;Lorg/xmlpull/v1/XmlPullParser;Landroid/util/AttributeSet;Landroid/content/res/Resources$Theme;)Landroid/graphics/Shader;
|
|
.locals 20
|
|
.param p0 # Landroid/content/res/Resources;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p1 # Lorg/xmlpull/v1/XmlPullParser;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Landroid/util/AttributeSet;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p3 # Landroid/content/res/Resources$Theme;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;,
|
|
Lorg/xmlpull/v1/XmlPullParserException;
|
|
}
|
|
.end annotation
|
|
|
|
move-object/from16 v0, p1
|
|
|
|
invoke-interface/range {p1 .. p1}, Lorg/xmlpull/v1/XmlPullParser;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "gradient"
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
sget-object v1, Landroidx/core/R$styleable;->GradientColor:[I
|
|
|
|
move-object/from16 v2, p0
|
|
|
|
move-object/from16 v3, p2
|
|
|
|
move-object/from16 v4, p3
|
|
|
|
invoke-static {v2, v4, v3, 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 v1
|
|
|
|
sget v5, Landroidx/core/R$styleable;->GradientColor_android_startX:I
|
|
|
|
const-string v6, "startX"
|
|
|
|
const/4 v7, 0x0
|
|
|
|
invoke-static {v1, v0, v6, v5, v7}, Landroidx/core/content/res/TypedArrayUtils;->getNamedFloat(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;IF)F
|
|
|
|
move-result v9
|
|
|
|
sget v5, Landroidx/core/R$styleable;->GradientColor_android_startY:I
|
|
|
|
const-string v6, "startY"
|
|
|
|
invoke-static {v1, v0, v6, v5, v7}, Landroidx/core/content/res/TypedArrayUtils;->getNamedFloat(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;IF)F
|
|
|
|
move-result v10
|
|
|
|
sget v5, Landroidx/core/R$styleable;->GradientColor_android_endX:I
|
|
|
|
const-string v6, "endX"
|
|
|
|
invoke-static {v1, v0, v6, v5, v7}, Landroidx/core/content/res/TypedArrayUtils;->getNamedFloat(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;IF)F
|
|
|
|
move-result v11
|
|
|
|
sget v5, Landroidx/core/R$styleable;->GradientColor_android_endY:I
|
|
|
|
const-string v6, "endY"
|
|
|
|
invoke-static {v1, v0, v6, v5, v7}, Landroidx/core/content/res/TypedArrayUtils;->getNamedFloat(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;IF)F
|
|
|
|
move-result v12
|
|
|
|
sget v5, Landroidx/core/R$styleable;->GradientColor_android_centerX:I
|
|
|
|
const-string v6, "centerX"
|
|
|
|
invoke-static {v1, v0, v6, v5, v7}, Landroidx/core/content/res/TypedArrayUtils;->getNamedFloat(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;IF)F
|
|
|
|
move-result v14
|
|
|
|
sget v5, Landroidx/core/R$styleable;->GradientColor_android_centerY:I
|
|
|
|
const-string v6, "centerY"
|
|
|
|
invoke-static {v1, v0, v6, v5, v7}, Landroidx/core/content/res/TypedArrayUtils;->getNamedFloat(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;IF)F
|
|
|
|
move-result v15
|
|
|
|
sget v5, Landroidx/core/R$styleable;->GradientColor_android_type:I
|
|
|
|
const-string v6, "type"
|
|
|
|
const/4 v8, 0x0
|
|
|
|
invoke-static {v1, v0, v6, v5, v8}, Landroidx/core/content/res/TypedArrayUtils;->getNamedInt(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;II)I
|
|
|
|
move-result v5
|
|
|
|
sget v6, Landroidx/core/R$styleable;->GradientColor_android_startColor:I
|
|
|
|
const-string v13, "startColor"
|
|
|
|
invoke-static {v1, v0, v13, v6, v8}, Landroidx/core/content/res/TypedArrayUtils;->getNamedColor(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;II)I
|
|
|
|
move-result v6
|
|
|
|
const-string v13, "centerColor"
|
|
|
|
invoke-static {v0, v13}, Landroidx/core/content/res/TypedArrayUtils;->hasAttribute(Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;)Z
|
|
|
|
move-result v7
|
|
|
|
sget v2, Landroidx/core/R$styleable;->GradientColor_android_centerColor:I
|
|
|
|
invoke-static {v1, v0, v13, v2, v8}, Landroidx/core/content/res/TypedArrayUtils;->getNamedColor(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;II)I
|
|
|
|
move-result v2
|
|
|
|
sget v13, Landroidx/core/R$styleable;->GradientColor_android_endColor:I
|
|
|
|
const-string v3, "endColor"
|
|
|
|
invoke-static {v1, v0, v3, v13, v8}, Landroidx/core/content/res/TypedArrayUtils;->getNamedColor(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;II)I
|
|
|
|
move-result v3
|
|
|
|
sget v13, Landroidx/core/R$styleable;->GradientColor_android_tileMode:I
|
|
|
|
const-string v4, "tileMode"
|
|
|
|
invoke-static {v1, v0, v4, v13, v8}, Landroidx/core/content/res/TypedArrayUtils;->getNamedInt(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;II)I
|
|
|
|
move-result v4
|
|
|
|
sget v8, Landroidx/core/R$styleable;->GradientColor_android_gradientRadius:I
|
|
|
|
const-string v13, "gradientRadius"
|
|
|
|
move/from16 v17, v14
|
|
|
|
const/4 v14, 0x0
|
|
|
|
invoke-static {v1, v0, v13, v8, v14}, Landroidx/core/content/res/TypedArrayUtils;->getNamedFloat(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;IF)F
|
|
|
|
move-result v8
|
|
|
|
invoke-virtual {v1}, Landroid/content/res/TypedArray;->recycle()V
|
|
|
|
invoke-static/range {p0 .. p3}, Landroidx/core/content/res/GradientColorInflaterCompat;->inflateChildElements(Landroid/content/res/Resources;Lorg/xmlpull/v1/XmlPullParser;Landroid/util/AttributeSet;Landroid/content/res/Resources$Theme;)Landroidx/core/content/res/GradientColorInflaterCompat$ColorStops;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0, v6, v3, v7, v2}, Landroidx/core/content/res/GradientColorInflaterCompat;->checkColors(Landroidx/core/content/res/GradientColorInflaterCompat$ColorStops;IIZI)Landroidx/core/content/res/GradientColorInflaterCompat$ColorStops;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-eq v5, v1, :cond_1
|
|
|
|
const/4 v1, 0x2
|
|
|
|
if-eq v5, v1, :cond_0
|
|
|
|
new-instance v1, Landroid/graphics/LinearGradient;
|
|
|
|
iget-object v13, v0, Landroidx/core/content/res/GradientColorInflaterCompat$ColorStops;->mColors:[I
|
|
|
|
iget-object v14, v0, Landroidx/core/content/res/GradientColorInflaterCompat$ColorStops;->mOffsets:[F
|
|
|
|
invoke-static {v4}, Landroidx/core/content/res/GradientColorInflaterCompat;->parseTileMode(I)Landroid/graphics/Shader$TileMode;
|
|
|
|
move-result-object v15
|
|
|
|
move-object v8, v1
|
|
|
|
invoke-direct/range {v8 .. v15}, Landroid/graphics/LinearGradient;-><init>(FFFF[I[FLandroid/graphics/Shader$TileMode;)V
|
|
|
|
return-object v1
|
|
|
|
:cond_0
|
|
new-instance v1, Landroid/graphics/SweepGradient;
|
|
|
|
iget-object v2, v0, Landroidx/core/content/res/GradientColorInflaterCompat$ColorStops;->mColors:[I
|
|
|
|
iget-object v0, v0, Landroidx/core/content/res/GradientColorInflaterCompat$ColorStops;->mOffsets:[F
|
|
|
|
move/from16 v3, v17
|
|
|
|
invoke-direct {v1, v3, v15, v2, v0}, Landroid/graphics/SweepGradient;-><init>(FF[I[F)V
|
|
|
|
return-object v1
|
|
|
|
:cond_1
|
|
move/from16 v3, v17
|
|
|
|
const/4 v1, 0x0
|
|
|
|
cmpg-float v1, v8, v1
|
|
|
|
if-lez v1, :cond_2
|
|
|
|
new-instance v1, Landroid/graphics/RadialGradient;
|
|
|
|
iget-object v2, v0, Landroidx/core/content/res/GradientColorInflaterCompat$ColorStops;->mColors:[I
|
|
|
|
iget-object v0, v0, Landroidx/core/content/res/GradientColorInflaterCompat$ColorStops;->mOffsets:[F
|
|
|
|
invoke-static {v4}, Landroidx/core/content/res/GradientColorInflaterCompat;->parseTileMode(I)Landroid/graphics/Shader$TileMode;
|
|
|
|
move-result-object v19
|
|
|
|
move-object v13, v1
|
|
|
|
move v14, v3
|
|
|
|
move/from16 v16, v8
|
|
|
|
move-object/from16 v17, v2
|
|
|
|
move-object/from16 v18, v0
|
|
|
|
invoke-direct/range {v13 .. v19}, Landroid/graphics/RadialGradient;-><init>(FFF[I[FLandroid/graphics/Shader$TileMode;)V
|
|
|
|
return-object v1
|
|
|
|
:cond_2
|
|
new-instance v0, Lorg/xmlpull/v1/XmlPullParserException;
|
|
|
|
const-string v1, "<gradient> tag requires \'gradientRadius\' attribute with radial type"
|
|
|
|
invoke-direct {v0, v1}, Lorg/xmlpull/v1/XmlPullParserException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_3
|
|
new-instance v2, Lorg/xmlpull/v1/XmlPullParserException;
|
|
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-interface/range {p1 .. p1}, Lorg/xmlpull/v1/XmlPullParser;->getPositionDescription()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, ": invalid gradient color tag "
|
|
|
|
invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {v2, v0}, Lorg/xmlpull/v1/XmlPullParserException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v2
|
|
.end method
|
|
|
|
.method public static inflateChildElements(Landroid/content/res/Resources;Lorg/xmlpull/v1/XmlPullParser;Landroid/util/AttributeSet;Landroid/content/res/Resources$Theme;)Landroidx/core/content/res/GradientColorInflaterCompat$ColorStops;
|
|
.locals 8
|
|
.param p0 # Landroid/content/res/Resources;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p1 # Lorg/xmlpull/v1/XmlPullParser;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Landroid/util/AttributeSet;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p3 # Landroid/content/res/Resources$Theme;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lorg/xmlpull/v1/XmlPullParserException;,
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
invoke-interface {p1}, Lorg/xmlpull/v1/XmlPullParser;->getDepth()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
add-int/2addr v0, v1
|
|
|
|
new-instance v2, Ljava/util/ArrayList;
|
|
|
|
const/16 v3, 0x14
|
|
|
|
invoke-direct {v2, v3}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
new-instance v4, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v4, v3}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
:cond_0
|
|
:goto_0
|
|
invoke-interface {p1}, Lorg/xmlpull/v1/XmlPullParser;->next()I
|
|
|
|
move-result v3
|
|
|
|
if-eq v3, v1, :cond_5
|
|
|
|
invoke-interface {p1}, Lorg/xmlpull/v1/XmlPullParser;->getDepth()I
|
|
|
|
move-result v5
|
|
|
|
if-ge v5, v0, :cond_1
|
|
|
|
const/4 v6, 0x3
|
|
|
|
if-eq v3, v6, :cond_5
|
|
|
|
:cond_1
|
|
const/4 v6, 0x2
|
|
|
|
if-eq v3, v6, :cond_2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
if-gt v5, v0, :cond_0
|
|
|
|
invoke-interface {p1}, Lorg/xmlpull/v1/XmlPullParser;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v5, "item"
|
|
|
|
invoke-virtual {v3, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v3
|
|
|
|
if-nez v3, :cond_3
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
sget-object v3, Landroidx/core/R$styleable;->GradientColorItem:[I
|
|
|
|
invoke-static {p0, p3, p2, v3}, 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 v3
|
|
|
|
sget v5, Landroidx/core/R$styleable;->GradientColorItem_android_color:I
|
|
|
|
invoke-virtual {v3, v5}, Landroid/content/res/TypedArray;->hasValue(I)Z
|
|
|
|
move-result v5
|
|
|
|
sget v6, Landroidx/core/R$styleable;->GradientColorItem_android_offset:I
|
|
|
|
invoke-virtual {v3, v6}, Landroid/content/res/TypedArray;->hasValue(I)Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v5, :cond_4
|
|
|
|
if-eqz v6, :cond_4
|
|
|
|
sget v5, Landroidx/core/R$styleable;->GradientColorItem_android_color:I
|
|
|
|
const/4 v6, 0x0
|
|
|
|
invoke-virtual {v3, v5, v6}, Landroid/content/res/TypedArray;->getColor(II)I
|
|
|
|
move-result v5
|
|
|
|
sget v6, Landroidx/core/R$styleable;->GradientColorItem_android_offset:I
|
|
|
|
const/4 v7, 0x0
|
|
|
|
invoke-virtual {v3, v6, v7}, Landroid/content/res/TypedArray;->getFloat(IF)F
|
|
|
|
move-result v6
|
|
|
|
invoke-virtual {v3}, Landroid/content/res/TypedArray;->recycle()V
|
|
|
|
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v4, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
invoke-static {v6}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v2, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_4
|
|
new-instance p0, Lorg/xmlpull/v1/XmlPullParserException;
|
|
|
|
new-instance p2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-interface {p1}, Lorg/xmlpull/v1/XmlPullParser;->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, ": <item> tag requires a \'color\' attribute and a \'offset\' attribute!"
|
|
|
|
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}, Lorg/xmlpull/v1/XmlPullParserException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
|
|
:cond_5
|
|
invoke-virtual {v4}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result p0
|
|
|
|
if-lez p0, :cond_6
|
|
|
|
new-instance p0, Landroidx/core/content/res/GradientColorInflaterCompat$ColorStops;
|
|
|
|
invoke-direct {p0, v4, v2}, Landroidx/core/content/res/GradientColorInflaterCompat$ColorStops;-><init>(Ljava/util/List;Ljava/util/List;)V
|
|
|
|
return-object p0
|
|
|
|
:cond_6
|
|
const/4 p0, 0x0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static parseTileMode(I)Landroid/graphics/Shader$TileMode;
|
|
.locals 1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-eq p0, v0, :cond_1
|
|
|
|
const/4 v0, 0x2
|
|
|
|
if-eq p0, v0, :cond_0
|
|
|
|
sget-object p0, Landroid/graphics/Shader$TileMode;->CLAMP:Landroid/graphics/Shader$TileMode;
|
|
|
|
return-object p0
|
|
|
|
:cond_0
|
|
sget-object p0, Landroid/graphics/Shader$TileMode;->MIRROR:Landroid/graphics/Shader$TileMode;
|
|
|
|
return-object p0
|
|
|
|
:cond_1
|
|
sget-object p0, Landroid/graphics/Shader$TileMode;->REPEAT:Landroid/graphics/Shader$TileMode;
|
|
|
|
return-object p0
|
|
.end method
|