apkfuckery/com.discord/smali/androidx/constraintlayout/widget/ConstraintLayoutStates$Variant.smali
2020-09-16 23:45:23 +00:00

283 lines
7.5 KiB
Smali

.class public Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;
.super Ljava/lang/Object;
.source "ConstraintLayoutStates.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/constraintlayout/widget/ConstraintLayoutStates;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "Variant"
.end annotation
# instance fields
.field public mConstraintID:I
.field public mConstraintSet:Landroidx/constraintlayout/widget/ConstraintSet;
.field public mId:I
.field public mMaxHeight:F
.field public mMaxWidth:F
.field public mMinHeight:F
.field public mMinWidth:F
# direct methods
.method public constructor <init>(Landroid/content/Context;Lorg/xmlpull/v1/XmlPullParser;)V
.locals 5
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/high16 v0, 0x7fc00000 # Float.NaN
iput v0, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->mMinWidth:F
iput v0, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->mMinHeight:F
iput v0, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->mMaxWidth:F
iput v0, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->mMaxHeight:F
const/4 v0, -0x1
iput v0, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->mConstraintID:I
invoke-static {p2}, Landroid/util/Xml;->asAttributeSet(Lorg/xmlpull/v1/XmlPullParser;)Landroid/util/AttributeSet;
move-result-object p2
sget-object v0, Landroidx/constraintlayout/widget/R$styleable;->Variant:[I
invoke-virtual {p1, p2, v0}, 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 v0
const/4 v1, 0x0
:goto_0
if-ge v1, v0, :cond_6
invoke-virtual {p2, v1}, Landroid/content/res/TypedArray;->getIndex(I)I
move-result v2
sget v3, Landroidx/constraintlayout/widget/R$styleable;->Variant_constraints:I
if-ne v2, v3, :cond_0
iget v3, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->mConstraintID:I
invoke-virtual {p2, v2, v3}, Landroid/content/res/TypedArray;->getResourceId(II)I
move-result v2
iput v2, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->mConstraintID:I
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v2
iget v3, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->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/ConstraintLayoutStates$Variant;->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_5
new-instance v2, Landroidx/constraintlayout/widget/ConstraintSet;
invoke-direct {v2}, Landroidx/constraintlayout/widget/ConstraintSet;-><init>()V
iput-object v2, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->mConstraintSet:Landroidx/constraintlayout/widget/ConstraintSet;
iget v3, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->mConstraintID:I
invoke-virtual {v2, p1, v3}, Landroidx/constraintlayout/widget/ConstraintSet;->clone(Landroid/content/Context;I)V
goto :goto_1
:cond_0
sget v3, Landroidx/constraintlayout/widget/R$styleable;->Variant_region_heightLessThan:I
if-ne v2, v3, :cond_1
iget v3, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->mMaxHeight:F
invoke-virtual {p2, v2, v3}, Landroid/content/res/TypedArray;->getDimension(IF)F
move-result v2
iput v2, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->mMaxHeight:F
goto :goto_1
:cond_1
sget v3, Landroidx/constraintlayout/widget/R$styleable;->Variant_region_heightMoreThan:I
if-ne v2, v3, :cond_2
iget v3, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->mMinHeight:F
invoke-virtual {p2, v2, v3}, Landroid/content/res/TypedArray;->getDimension(IF)F
move-result v2
iput v2, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->mMinHeight:F
goto :goto_1
:cond_2
sget v3, Landroidx/constraintlayout/widget/R$styleable;->Variant_region_widthLessThan:I
if-ne v2, v3, :cond_3
iget v3, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->mMaxWidth:F
invoke-virtual {p2, v2, v3}, Landroid/content/res/TypedArray;->getDimension(IF)F
move-result v2
iput v2, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->mMaxWidth:F
goto :goto_1
:cond_3
sget v3, Landroidx/constraintlayout/widget/R$styleable;->Variant_region_widthMoreThan:I
if-ne v2, v3, :cond_4
iget v3, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->mMinWidth:F
invoke-virtual {p2, v2, v3}, Landroid/content/res/TypedArray;->getDimension(IF)F
move-result v2
iput v2, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->mMinWidth:F
goto :goto_1
:cond_4
const-string v2, "ConstraintLayoutStates"
const-string v3, "Unknown tag"
invoke-static {v2, v3}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
:cond_5
:goto_1
add-int/lit8 v1, v1, 0x1
goto :goto_0
:cond_6
invoke-virtual {p2}, Landroid/content/res/TypedArray;->recycle()V
return-void
.end method
# virtual methods
.method public match(FF)Z
.locals 2
iget v0, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->mMinWidth:F
invoke-static {v0}, Ljava/lang/Float;->isNaN(F)Z
move-result v0
const/4 v1, 0x0
if-nez v0, :cond_0
iget v0, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->mMinWidth:F
cmpg-float v0, p1, v0
if-gez v0, :cond_0
return v1
:cond_0
iget v0, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->mMinHeight:F
invoke-static {v0}, Ljava/lang/Float;->isNaN(F)Z
move-result v0
if-nez v0, :cond_1
iget v0, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->mMinHeight:F
cmpg-float v0, p2, v0
if-gez v0, :cond_1
return v1
:cond_1
iget v0, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->mMaxWidth:F
invoke-static {v0}, Ljava/lang/Float;->isNaN(F)Z
move-result v0
if-nez v0, :cond_2
iget v0, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->mMaxWidth:F
cmpl-float p1, p1, v0
if-lez p1, :cond_2
return v1
:cond_2
iget p1, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->mMaxHeight:F
invoke-static {p1}, Ljava/lang/Float;->isNaN(F)Z
move-result p1
if-nez p1, :cond_3
iget p1, p0, Landroidx/constraintlayout/widget/ConstraintLayoutStates$Variant;->mMaxHeight:F
cmpl-float p1, p2, p1
if-lez p1, :cond_3
return v1
:cond_3
const/4 p1, 0x1
return p1
.end method