apkfuckery/com.discord/smali/androidx/constraintlayout/widget/StateSet$State.smali

197 lines
4.9 KiB
Smali
Raw Normal View History

2020-09-16 23:45:23 +00:00
.class public Landroidx/constraintlayout/widget/StateSet$State;
.super Ljava/lang/Object;
.source "StateSet.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/constraintlayout/widget/StateSet;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "State"
.end annotation
# instance fields
.field public mConstraintID:I
.field public mId:I
.field public mIsLayout:Z
.field public mVariants:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList<",
"Landroidx/constraintlayout/widget/StateSet$Variant;",
">;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Landroid/content/Context;Lorg/xmlpull/v1/XmlPullParser;)V
.locals 5
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Landroidx/constraintlayout/widget/StateSet$State;->mVariants:Ljava/util/ArrayList;
const/4 v0, -0x1
iput v0, p0, Landroidx/constraintlayout/widget/StateSet$State;->mConstraintID:I
const/4 v0, 0x0
iput-boolean v0, p0, Landroidx/constraintlayout/widget/StateSet$State;->mIsLayout:Z
invoke-static {p2}, Landroid/util/Xml;->asAttributeSet(Lorg/xmlpull/v1/XmlPullParser;)Landroid/util/AttributeSet;
move-result-object p2
sget-object v1, Landroidx/constraintlayout/widget/R$styleable;->State:[I
invoke-virtual {p1, p2, v1}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;
move-result-object p2
invoke-virtual {p2}, Landroid/content/res/TypedArray;->getIndexCount()I
move-result v1
:goto_0
if-ge v0, v1, :cond_2
invoke-virtual {p2, v0}, Landroid/content/res/TypedArray;->getIndex(I)I
move-result v2
sget v3, Landroidx/constraintlayout/widget/R$styleable;->State_android_id:I
if-ne v2, v3, :cond_0
iget v3, p0, Landroidx/constraintlayout/widget/StateSet$State;->mId:I
invoke-virtual {p2, v2, v3}, Landroid/content/res/TypedArray;->getResourceId(II)I
move-result v2
iput v2, p0, Landroidx/constraintlayout/widget/StateSet$State;->mId:I
goto :goto_1
:cond_0
sget v3, Landroidx/constraintlayout/widget/R$styleable;->State_constraints:I
if-ne v2, v3, :cond_1
iget v3, p0, Landroidx/constraintlayout/widget/StateSet$State;->mConstraintID:I
invoke-virtual {p2, v2, v3}, Landroid/content/res/TypedArray;->getResourceId(II)I
move-result v2
iput v2, p0, Landroidx/constraintlayout/widget/StateSet$State;->mConstraintID:I
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v2
iget v3, p0, Landroidx/constraintlayout/widget/StateSet$State;->mConstraintID:I
invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getResourceTypeName(I)Ljava/lang/String;
move-result-object v2
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
iget v4, p0, Landroidx/constraintlayout/widget/StateSet$State;->mConstraintID:I
invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getResourceName(I)Ljava/lang/String;
const-string v3, "layout"
invoke-virtual {v3, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_1
const/4 v2, 0x1
iput-boolean v2, p0, Landroidx/constraintlayout/widget/StateSet$State;->mIsLayout:Z
:cond_1
:goto_1
add-int/lit8 v0, v0, 0x1
goto :goto_0
:cond_2
invoke-virtual {p2}, Landroid/content/res/TypedArray;->recycle()V
return-void
.end method
# virtual methods
.method public add(Landroidx/constraintlayout/widget/StateSet$Variant;)V
.locals 1
iget-object v0, p0, Landroidx/constraintlayout/widget/StateSet$State;->mVariants:Ljava/util/ArrayList;
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
return-void
.end method
.method public findMatch(FF)I
.locals 2
const/4 v0, 0x0
:goto_0
iget-object v1, p0, Landroidx/constraintlayout/widget/StateSet$State;->mVariants:Ljava/util/ArrayList;
invoke-virtual {v1}, Ljava/util/ArrayList;->size()I
move-result v1
if-ge v0, v1, :cond_1
iget-object v1, p0, Landroidx/constraintlayout/widget/StateSet$State;->mVariants:Ljava/util/ArrayList;
invoke-virtual {v1, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroidx/constraintlayout/widget/StateSet$Variant;
invoke-virtual {v1, p1, p2}, Landroidx/constraintlayout/widget/StateSet$Variant;->match(FF)Z
move-result v1
if-eqz v1, :cond_0
return v0
:cond_0
add-int/lit8 v0, v0, 0x1
goto :goto_0
:cond_1
const/4 p1, -0x1
return p1
.end method