apkfuckery/com.discord/smali/androidx/constraintlayout/widget/ConstraintHelper.smali

1233 lines
31 KiB
Smali
Raw Normal View History

2020-05-17 12:40:10 +00:00
.class public abstract Landroidx/constraintlayout/widget/ConstraintHelper;
.super Landroid/view/View;
.source "ConstraintHelper.java"
# instance fields
.field public mCount:I
.field public mHelperWidget:Landroidx/constraintlayout/solver/widgets/Helper;
.field public mIds:[I
2020-09-16 23:45:23 +00:00
.field public mMap:Ljava/util/HashMap;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/HashMap<",
"Ljava/lang/Integer;",
"Ljava/lang/String;",
">;"
}
.end annotation
.end field
2020-05-17 12:40:10 +00:00
.field public mReferenceIds:Ljava/lang/String;
.field public mUseViewMeasure:Z
2020-09-16 23:45:23 +00:00
.field public mViews:[Landroid/view/View;
2020-05-17 12:40:10 +00:00
.field public myContext:Landroid/content/Context;
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
2020-09-16 23:45:23 +00:00
.locals 2
2020-05-17 12:40:10 +00:00
invoke-direct {p0, p1}, Landroid/view/View;-><init>(Landroid/content/Context;)V
const/16 v0, 0x20
new-array v0, v0, [I
iput-object v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mIds:[I
const/4 v0, 0x0
iput-boolean v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mUseViewMeasure:Z
2020-09-16 23:45:23 +00:00
const/4 v0, 0x0
2020-09-09 19:21:20 +00:00
2020-09-16 23:45:23 +00:00
iput-object v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mViews:[Landroid/view/View;
new-instance v1, Ljava/util/HashMap;
2020-09-16 21:45:36 +00:00
2020-09-16 23:45:23 +00:00
invoke-direct {v1}, Ljava/util/HashMap;-><init>()V
iput-object v1, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mMap:Ljava/util/HashMap;
iput-object p1, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->myContext:Landroid/content/Context;
invoke-virtual {p0, v0}, Landroidx/constraintlayout/widget/ConstraintHelper;->init(Landroid/util/AttributeSet;)V
2020-05-17 12:40:10 +00:00
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 1
invoke-direct {p0, p1, p2}, Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
const/16 v0, 0x20
new-array v0, v0, [I
iput-object v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mIds:[I
const/4 v0, 0x0
iput-boolean v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mUseViewMeasure:Z
2020-09-16 23:45:23 +00:00
const/4 v0, 0x0
iput-object v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mViews:[Landroid/view/View;
new-instance v0, Ljava/util/HashMap;
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
iput-object v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mMap:Ljava/util/HashMap;
2020-05-17 12:40:10 +00:00
iput-object p1, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->myContext:Landroid/content/Context;
invoke-virtual {p0, p2}, Landroidx/constraintlayout/widget/ConstraintHelper;->init(Landroid/util/AttributeSet;)V
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.locals 0
invoke-direct {p0, p1, p2, p3}, Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
const/16 p3, 0x20
new-array p3, p3, [I
iput-object p3, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mIds:[I
const/4 p3, 0x0
iput-boolean p3, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mUseViewMeasure:Z
2020-09-16 23:45:23 +00:00
const/4 p3, 0x0
iput-object p3, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mViews:[Landroid/view/View;
new-instance p3, Ljava/util/HashMap;
invoke-direct {p3}, Ljava/util/HashMap;-><init>()V
iput-object p3, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mMap:Ljava/util/HashMap;
2020-05-17 12:40:10 +00:00
iput-object p1, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->myContext:Landroid/content/Context;
invoke-virtual {p0, p2}, Landroidx/constraintlayout/widget/ConstraintHelper;->init(Landroid/util/AttributeSet;)V
return-void
.end method
.method private addID(Ljava/lang/String;)V
2020-09-16 23:45:23 +00:00
.locals 3
2020-09-09 19:21:20 +00:00
2020-09-16 23:45:23 +00:00
if-eqz p1, :cond_4
2020-09-09 19:21:20 +00:00
2020-09-16 23:45:23 +00:00
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v0
if-nez v0, :cond_0
goto :goto_0
2020-05-17 12:40:10 +00:00
:cond_0
iget-object v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->myContext:Landroid/content/Context;
if-nez v0, :cond_1
return-void
:cond_1
invoke-virtual {p1}, Ljava/lang/String;->trim()Ljava/lang/String;
move-result-object p1
2020-09-16 21:45:36 +00:00
invoke-virtual {p0}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
2020-09-16 23:45:23 +00:00
move-result-object v0
2020-09-16 21:45:36 +00:00
2020-09-16 23:45:23 +00:00
instance-of v0, v0, Landroidx/constraintlayout/widget/ConstraintLayout;
2020-09-16 21:45:36 +00:00
2020-09-16 23:45:23 +00:00
if-eqz v0, :cond_2
2020-09-16 21:45:36 +00:00
invoke-virtual {p0}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
2020-09-16 23:45:23 +00:00
move-result-object v0
2020-09-16 21:45:36 +00:00
2020-09-16 23:45:23 +00:00
check-cast v0, Landroidx/constraintlayout/widget/ConstraintLayout;
2020-09-16 21:45:36 +00:00
2020-09-16 23:45:23 +00:00
:cond_2
invoke-direct {p0, p1}, Landroidx/constraintlayout/widget/ConstraintHelper;->findId(Ljava/lang/String;)I
2020-09-16 21:45:36 +00:00
2020-09-16 23:45:23 +00:00
move-result v0
2020-09-16 21:45:36 +00:00
2020-09-16 23:45:23 +00:00
if-eqz v0, :cond_3
2020-09-16 21:45:36 +00:00
2020-09-16 23:45:23 +00:00
iget-object v1, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mMap:Ljava/util/HashMap;
2020-09-16 21:45:36 +00:00
2020-09-16 23:45:23 +00:00
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
2020-09-16 21:45:36 +00:00
2020-09-16 23:45:23 +00:00
move-result-object v2
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
invoke-virtual {v1, v2, p1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
2020-09-16 21:45:36 +00:00
2020-09-16 23:45:23 +00:00
invoke-direct {p0, v0}, Landroidx/constraintlayout/widget/ConstraintHelper;->addRscID(I)V
2020-09-16 21:45:36 +00:00
2020-09-16 23:45:23 +00:00
goto :goto_0
2020-09-16 21:45:36 +00:00
2020-09-16 23:45:23 +00:00
:cond_3
2020-05-17 12:40:10 +00:00
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "Could not find id of \""
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p1, "\""
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
const-string v0, "ConstraintHelper"
invoke-static {v0, p1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
2020-09-16 23:45:23 +00:00
:cond_4
:goto_0
2020-05-17 12:40:10 +00:00
return-void
.end method
2020-09-16 23:45:23 +00:00
.method private addRscID(I)V
2020-05-17 12:40:10 +00:00
.locals 3
2020-09-16 23:45:23 +00:00
invoke-virtual {p0}, Landroid/view/View;->getId()I
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
move-result v0
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
if-ne p1, v0, :cond_0
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
return-void
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
:cond_0
iget v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mCount:I
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
add-int/lit8 v0, v0, 0x1
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
iget-object v1, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mIds:[I
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
array-length v2, v1
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
if-le v0, v2, :cond_1
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
array-length v0, v1
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
mul-int/lit8 v0, v0, 0x2
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
invoke-static {v1, v0}, Ljava/util/Arrays;->copyOf([II)[I
2020-09-16 21:45:36 +00:00
move-result-object v0
2020-09-16 23:45:23 +00:00
iput-object v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mIds:[I
2020-09-16 21:45:36 +00:00
2020-09-16 23:45:23 +00:00
:cond_1
2020-05-17 12:40:10 +00:00
iget-object v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mIds:[I
iget v1, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mCount:I
2020-09-16 23:45:23 +00:00
aput p1, v0, v1
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
add-int/lit8 v1, v1, 0x1
2020-09-09 19:21:20 +00:00
2020-09-16 23:45:23 +00:00
iput v1, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mCount:I
return-void
2020-05-17 12:40:10 +00:00
.end method
2020-09-16 23:45:23 +00:00
.method private convertReferenceString(Landroid/view/View;Ljava/lang/String;)[I
2020-05-17 12:40:10 +00:00
.locals 4
2020-09-16 23:45:23 +00:00
const-string v0, ","
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
invoke-virtual {p2, v0}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
2020-09-16 21:45:36 +00:00
2020-09-16 23:45:23 +00:00
move-result-object p2
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
array-length p1, p2
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
new-array p1, p1, [I
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
const/4 v0, 0x0
2020-05-17 12:40:10 +00:00
const/4 v1, 0x0
:goto_0
2020-09-16 23:45:23 +00:00
array-length v2, p2
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
if-ge v0, v2, :cond_1
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
aget-object v2, p2, v0
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
invoke-virtual {v2}, Ljava/lang/String;->trim()Ljava/lang/String;
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
move-result-object v2
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
invoke-direct {p0, v2}, Landroidx/constraintlayout/widget/ConstraintHelper;->findId(Ljava/lang/String;)I
2020-09-09 19:21:20 +00:00
2020-09-16 23:45:23 +00:00
move-result v2
2020-09-09 19:21:20 +00:00
2020-09-16 23:45:23 +00:00
if-eqz v2, :cond_0
add-int/lit8 v3, v1, 0x1
aput v2, p1, v1
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
move v1, v3
2020-05-17 12:40:10 +00:00
:cond_0
2020-09-16 23:45:23 +00:00
add-int/lit8 v0, v0, 0x1
2020-05-17 12:40:10 +00:00
goto :goto_0
:cond_1
2020-09-16 23:45:23 +00:00
array-length p2, p2
2020-09-09 19:21:20 +00:00
2020-09-16 23:45:23 +00:00
if-eq v1, p2, :cond_2
2020-09-09 19:21:20 +00:00
2020-09-16 23:45:23 +00:00
invoke-static {p1, v1}, Ljava/util/Arrays;->copyOf([II)[I
move-result-object p1
:cond_2
return-object p1
2020-05-17 12:40:10 +00:00
.end method
2020-09-16 23:45:23 +00:00
.method private findId(Landroidx/constraintlayout/widget/ConstraintLayout;Ljava/lang/String;)I
.locals 7
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
const/4 v0, 0x0
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
if-eqz p2, :cond_3
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
if-nez p1, :cond_0
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
goto :goto_2
2020-05-17 12:40:10 +00:00
:cond_0
2020-09-16 23:45:23 +00:00
iget-object v1, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->myContext:Landroid/content/Context;
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
move-result-object v1
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
if-nez v1, :cond_1
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
return v0
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
:cond_1
invoke-virtual {p1}, Landroid/view/ViewGroup;->getChildCount()I
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
move-result v2
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
const/4 v3, 0x0
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
:goto_0
if-ge v3, v2, :cond_3
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
invoke-virtual {p1, v3}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
move-result-object v4
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
invoke-virtual {v4}, Landroid/view/View;->getId()I
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
move-result v5
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
const/4 v6, -0x1
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
if-eq v5, v6, :cond_2
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
const/4 v5, 0x0
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
:try_start_0
invoke-virtual {v4}, Landroid/view/View;->getId()I
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
move-result v6
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
invoke-virtual {v1, v6}, Landroid/content/res/Resources;->getResourceEntryName(I)Ljava/lang/String;
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
move-result-object v5
:try_end_0
.catch Landroid/content/res/Resources$NotFoundException; {:try_start_0 .. :try_end_0} :catch_0
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
goto :goto_1
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
:catch_0
nop
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
:goto_1
invoke-virtual {p2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
move-result v5
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
if-eqz v5, :cond_2
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
invoke-virtual {v4}, Landroid/view/View;->getId()I
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
move-result p1
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
return p1
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
:cond_2
add-int/lit8 v3, v3, 0x1
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
goto :goto_0
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
:cond_3
:goto_2
return v0
2020-05-17 12:40:10 +00:00
.end method
2020-09-16 23:45:23 +00:00
.method private findId(Ljava/lang/String;)I
.locals 5
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
invoke-virtual {p0}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
move-result-object v0
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
instance-of v0, v0, Landroidx/constraintlayout/widget/ConstraintLayout;
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
const/4 v1, 0x0
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
if-eqz v0, :cond_0
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
invoke-virtual {p0}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
move-result-object v0
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
check-cast v0, Landroidx/constraintlayout/widget/ConstraintLayout;
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
goto :goto_0
2020-05-17 12:40:10 +00:00
:cond_0
2020-09-16 23:45:23 +00:00
move-object v0, v1
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
:goto_0
invoke-virtual {p0}, Landroid/view/View;->isInEditMode()Z
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
move-result v2
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
const/4 v3, 0x0
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
if-eqz v2, :cond_1
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
if-eqz v0, :cond_1
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
invoke-virtual {v0, v3, p1}, Landroidx/constraintlayout/widget/ConstraintLayout;->getDesignInformation(ILjava/lang/Object;)Ljava/lang/Object;
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
move-result-object v2
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
instance-of v4, v2, Ljava/lang/Integer;
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
if-eqz v4, :cond_1
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
check-cast v2, Ljava/lang/Integer;
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
move-result v3
:cond_1
if-nez v3, :cond_2
if-eqz v0, :cond_2
invoke-direct {p0, v0, p1}, Landroidx/constraintlayout/widget/ConstraintHelper;->findId(Landroidx/constraintlayout/widget/ConstraintLayout;Ljava/lang/String;)I
move-result v3
:cond_2
if-nez v3, :cond_3
:try_start_0
const-class v0, Landroidx/constraintlayout/widget/R$id;
invoke-virtual {v0, p1}, Ljava/lang/Class;->getField(Ljava/lang/String;)Ljava/lang/reflect/Field;
move-result-object v0
invoke-virtual {v0, v1}, Ljava/lang/reflect/Field;->getInt(Ljava/lang/Object;)I
move-result v3
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_1
:catch_0
nop
:cond_3
:goto_1
if-nez v3, :cond_4
iget-object v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->myContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
iget-object v1, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->myContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object v1
const-string v2, "id"
invoke-virtual {v0, p1, v2, v1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v3
:cond_4
return v3
.end method
# virtual methods
.method public addView(Landroid/view/View;)V
.locals 3
if-ne p1, p0, :cond_0
return-void
:cond_0
invoke-virtual {p1}, Landroid/view/View;->getId()I
move-result v0
const/4 v1, -0x1
const-string v2, "ConstraintHelper"
if-ne v0, v1, :cond_1
const-string p1, "Views added to a ConstraintHelper need to have an id"
invoke-static {v2, p1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
return-void
:cond_1
invoke-virtual {p1}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
move-result-object v0
if-nez v0, :cond_2
const-string p1, "Views added to a ConstraintHelper need to have a parent"
invoke-static {v2, p1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
return-void
:cond_2
const/4 v0, 0x0
iput-object v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mReferenceIds:Ljava/lang/String;
invoke-virtual {p1}, Landroid/view/View;->getId()I
move-result p1
invoke-direct {p0, p1}, Landroidx/constraintlayout/widget/ConstraintHelper;->addRscID(I)V
invoke-virtual {p0}, Landroid/view/View;->requestLayout()V
return-void
.end method
.method public applyLayoutFeatures()V
.locals 2
invoke-virtual {p0}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
move-result-object v0
if-eqz v0, :cond_0
instance-of v1, v0, Landroidx/constraintlayout/widget/ConstraintLayout;
if-eqz v1, :cond_0
check-cast v0, Landroidx/constraintlayout/widget/ConstraintLayout;
invoke-virtual {p0, v0}, Landroidx/constraintlayout/widget/ConstraintHelper;->applyLayoutFeatures(Landroidx/constraintlayout/widget/ConstraintLayout;)V
:cond_0
return-void
.end method
.method public applyLayoutFeatures(Landroidx/constraintlayout/widget/ConstraintLayout;)V
.locals 5
invoke-virtual {p0}, Landroid/view/View;->getVisibility()I
move-result v0
invoke-virtual {p0}, Landroid/view/View;->getElevation()F
move-result v1
const/4 v2, 0x0
:goto_0
iget v3, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mCount:I
if-ge v2, v3, :cond_1
iget-object v3, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mIds:[I
aget v3, v3, v2
invoke-virtual {p1, v3}, Landroidx/constraintlayout/widget/ConstraintLayout;->getViewById(I)Landroid/view/View;
move-result-object v3
if-eqz v3, :cond_0
invoke-virtual {v3, v0}, Landroid/view/View;->setVisibility(I)V
const/4 v4, 0x0
cmpl-float v4, v1, v4
if-lez v4, :cond_0
invoke-virtual {v3}, Landroid/view/View;->getTranslationZ()F
move-result v4
add-float/2addr v4, v1
invoke-virtual {v3, v4}, Landroid/view/View;->setTranslationZ(F)V
:cond_0
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_1
return-void
.end method
.method public getReferencedIds()[I
.locals 2
iget-object v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mIds:[I
iget v1, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mCount:I
invoke-static {v0, v1}, Ljava/util/Arrays;->copyOf([II)[I
move-result-object v0
return-object v0
.end method
.method public getViews(Landroidx/constraintlayout/widget/ConstraintLayout;)[Landroid/view/View;
.locals 3
iget-object v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mViews:[Landroid/view/View;
if-eqz v0, :cond_0
array-length v0, v0
iget v1, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mCount:I
if-eq v0, v1, :cond_1
:cond_0
iget v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mCount:I
new-array v0, v0, [Landroid/view/View;
iput-object v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mViews:[Landroid/view/View;
:cond_1
const/4 v0, 0x0
:goto_0
iget v1, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mCount:I
if-ge v0, v1, :cond_2
iget-object v1, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mIds:[I
aget v1, v1, v0
iget-object v2, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mViews:[Landroid/view/View;
invoke-virtual {p1, v1}, Landroidx/constraintlayout/widget/ConstraintLayout;->getViewById(I)Landroid/view/View;
move-result-object v1
aput-object v1, v2, v0
add-int/lit8 v0, v0, 0x1
goto :goto_0
:cond_2
iget-object p1, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mViews:[Landroid/view/View;
return-object p1
.end method
.method public init(Landroid/util/AttributeSet;)V
.locals 4
if-eqz p1, :cond_1
invoke-virtual {p0}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v0
sget-object v1, Landroidx/constraintlayout/widget/R$styleable;->ConstraintLayout_Layout:[I
invoke-virtual {v0, p1, v1}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;
move-result-object p1
invoke-virtual {p1}, Landroid/content/res/TypedArray;->getIndexCount()I
move-result v0
const/4 v1, 0x0
:goto_0
if-ge v1, v0, :cond_1
invoke-virtual {p1, v1}, Landroid/content/res/TypedArray;->getIndex(I)I
move-result v2
sget v3, Landroidx/constraintlayout/widget/R$styleable;->ConstraintLayout_Layout_constraint_referenced_ids:I
if-ne v2, v3, :cond_0
invoke-virtual {p1, v2}, Landroid/content/res/TypedArray;->getString(I)Ljava/lang/String;
move-result-object v2
iput-object v2, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mReferenceIds:Ljava/lang/String;
invoke-virtual {p0, v2}, Landroidx/constraintlayout/widget/ConstraintHelper;->setIds(Ljava/lang/String;)V
:cond_0
add-int/lit8 v1, v1, 0x1
goto :goto_0
:cond_1
return-void
.end method
.method public loadParameters(Landroidx/constraintlayout/widget/ConstraintSet$Constraint;Landroidx/constraintlayout/solver/widgets/HelperWidget;Landroidx/constraintlayout/widget/ConstraintLayout$LayoutParams;Landroid/util/SparseArray;)V
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/constraintlayout/widget/ConstraintSet$Constraint;",
"Landroidx/constraintlayout/solver/widgets/HelperWidget;",
"Landroidx/constraintlayout/widget/ConstraintLayout$LayoutParams;",
"Landroid/util/SparseArray<",
"Landroidx/constraintlayout/solver/widgets/ConstraintWidget;",
">;)V"
}
.end annotation
iget-object p3, p1, Landroidx/constraintlayout/widget/ConstraintSet$Constraint;->layout:Landroidx/constraintlayout/widget/ConstraintSet$Layout;
iget-object v0, p3, Landroidx/constraintlayout/widget/ConstraintSet$Layout;->mReferenceIds:[I
if-eqz v0, :cond_0
invoke-virtual {p0, v0}, Landroidx/constraintlayout/widget/ConstraintHelper;->setReferencedIds([I)V
goto :goto_0
:cond_0
iget-object p3, p3, Landroidx/constraintlayout/widget/ConstraintSet$Layout;->mReferenceIdString:Ljava/lang/String;
if-eqz p3, :cond_1
invoke-virtual {p3}, Ljava/lang/String;->length()I
move-result p3
if-lez p3, :cond_1
iget-object p3, p1, Landroidx/constraintlayout/widget/ConstraintSet$Constraint;->layout:Landroidx/constraintlayout/widget/ConstraintSet$Layout;
iget-object v0, p3, Landroidx/constraintlayout/widget/ConstraintSet$Layout;->mReferenceIdString:Ljava/lang/String;
invoke-direct {p0, p0, v0}, Landroidx/constraintlayout/widget/ConstraintHelper;->convertReferenceString(Landroid/view/View;Ljava/lang/String;)[I
move-result-object v0
iput-object v0, p3, Landroidx/constraintlayout/widget/ConstraintSet$Layout;->mReferenceIds:[I
:cond_1
:goto_0
invoke-virtual {p2}, Landroidx/constraintlayout/solver/widgets/HelperWidget;->removeAllIds()V
iget-object p3, p1, Landroidx/constraintlayout/widget/ConstraintSet$Constraint;->layout:Landroidx/constraintlayout/widget/ConstraintSet$Layout;
iget-object p3, p3, Landroidx/constraintlayout/widget/ConstraintSet$Layout;->mReferenceIds:[I
if-eqz p3, :cond_3
const/4 p3, 0x0
:goto_1
iget-object v0, p1, Landroidx/constraintlayout/widget/ConstraintSet$Constraint;->layout:Landroidx/constraintlayout/widget/ConstraintSet$Layout;
iget-object v0, v0, Landroidx/constraintlayout/widget/ConstraintSet$Layout;->mReferenceIds:[I
array-length v1, v0
if-ge p3, v1, :cond_3
aget v0, v0, p3
invoke-virtual {p4, v0}, Landroid/util/SparseArray;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroidx/constraintlayout/solver/widgets/ConstraintWidget;
if-eqz v0, :cond_2
invoke-virtual {p2, v0}, Landroidx/constraintlayout/solver/widgets/HelperWidget;->add(Landroidx/constraintlayout/solver/widgets/ConstraintWidget;)V
:cond_2
add-int/lit8 p3, p3, 0x1
goto :goto_1
:cond_3
return-void
.end method
.method public onAttachedToWindow()V
.locals 1
invoke-super {p0}, Landroid/view/View;->onAttachedToWindow()V
iget-object v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mReferenceIds:Ljava/lang/String;
if-eqz v0, :cond_0
invoke-virtual {p0, v0}, Landroidx/constraintlayout/widget/ConstraintHelper;->setIds(Ljava/lang/String;)V
:cond_0
return-void
.end method
.method public onDraw(Landroid/graphics/Canvas;)V
.locals 0
return-void
.end method
.method public onMeasure(II)V
.locals 1
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
iget-boolean v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mUseViewMeasure:Z
2020-09-09 19:21:20 +00:00
2020-09-16 23:45:23 +00:00
if-eqz v0, :cond_0
invoke-super {p0, p1, p2}, Landroid/view/View;->onMeasure(II)V
goto :goto_0
:cond_0
const/4 p1, 0x0
invoke-virtual {p0, p1, p1}, Landroid/view/View;->setMeasuredDimension(II)V
:goto_0
return-void
.end method
.method public removeView(Landroid/view/View;)V
.locals 4
invoke-virtual {p1}, Landroid/view/View;->getId()I
move-result p1
const/4 v0, -0x1
if-ne p1, v0, :cond_0
return-void
:cond_0
const/4 v0, 0x0
iput-object v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mReferenceIds:Ljava/lang/String;
const/4 v0, 0x0
const/4 v1, 0x0
2020-09-09 19:21:20 +00:00
2020-09-16 23:45:23 +00:00
:goto_0
iget v2, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mCount:I
if-ge v1, v2, :cond_3
iget-object v2, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mIds:[I
aget v2, v2, v1
if-ne v2, p1, :cond_2
:goto_1
iget p1, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mCount:I
add-int/lit8 v2, p1, -0x1
if-ge v1, v2, :cond_1
iget-object p1, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mIds:[I
add-int/lit8 v2, v1, 0x1
aget v3, p1, v2
aput v3, p1, v1
move v1, v2
goto :goto_1
:cond_1
iget-object v1, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mIds:[I
add-int/lit8 v2, p1, -0x1
aput v0, v1, v2
add-int/lit8 p1, p1, -0x1
iput p1, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mCount:I
goto :goto_2
2020-09-09 19:21:20 +00:00
:cond_2
2020-09-16 23:45:23 +00:00
add-int/lit8 v1, v1, 0x1
goto :goto_0
:cond_3
:goto_2
invoke-virtual {p0}, Landroid/view/View;->requestLayout()V
return-void
.end method
.method public resolveRtl(Landroidx/constraintlayout/solver/widgets/ConstraintWidget;Z)V
.locals 0
return-void
.end method
.method public setIds(Ljava/lang/String;)V
.locals 3
iput-object p1, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mReferenceIds:Ljava/lang/String;
if-nez p1, :cond_0
return-void
:cond_0
const/4 v0, 0x0
iput v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mCount:I
:goto_0
const/16 v1, 0x2c
invoke-virtual {p1, v1, v0}, Ljava/lang/String;->indexOf(II)I
move-result v1
const/4 v2, -0x1
if-ne v1, v2, :cond_1
invoke-virtual {p1, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Landroidx/constraintlayout/widget/ConstraintHelper;->addID(Ljava/lang/String;)V
return-void
:cond_1
invoke-virtual {p1, v0, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;
move-result-object v0
invoke-direct {p0, v0}, Landroidx/constraintlayout/widget/ConstraintHelper;->addID(Ljava/lang/String;)V
add-int/lit8 v0, v1, 0x1
goto :goto_0
.end method
.method public setReferencedIds([I)V
.locals 2
const/4 v0, 0x0
iput-object v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mReferenceIds:Ljava/lang/String;
const/4 v0, 0x0
iput v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mCount:I
:goto_0
array-length v1, p1
if-ge v0, v1, :cond_0
aget v1, p1, v0
invoke-direct {p0, v1}, Landroidx/constraintlayout/widget/ConstraintHelper;->addRscID(I)V
2020-09-09 19:21:20 +00:00
add-int/lit8 v0, v0, 0x1
goto :goto_0
2020-09-16 23:45:23 +00:00
:cond_0
return-void
.end method
.method public updatePostConstraints(Landroidx/constraintlayout/widget/ConstraintLayout;)V
.locals 0
return-void
.end method
.method public updatePostLayout(Landroidx/constraintlayout/widget/ConstraintLayout;)V
.locals 0
return-void
.end method
.method public updatePostMeasure(Landroidx/constraintlayout/widget/ConstraintLayout;)V
.locals 0
return-void
.end method
.method public updatePreDraw(Landroidx/constraintlayout/widget/ConstraintLayout;)V
.locals 0
return-void
.end method
.method public updatePreLayout(Landroidx/constraintlayout/solver/widgets/ConstraintWidgetContainer;Landroidx/constraintlayout/solver/widgets/Helper;Landroid/util/SparseArray;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/constraintlayout/solver/widgets/ConstraintWidgetContainer;",
"Landroidx/constraintlayout/solver/widgets/Helper;",
"Landroid/util/SparseArray<",
"Landroidx/constraintlayout/solver/widgets/ConstraintWidget;",
">;)V"
}
.end annotation
invoke-interface {p2}, Landroidx/constraintlayout/solver/widgets/Helper;->removeAllIds()V
const/4 p1, 0x0
:goto_0
iget v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mCount:I
if-ge p1, v0, :cond_0
iget-object v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mIds:[I
aget v0, v0, p1
invoke-virtual {p3, v0}, Landroid/util/SparseArray;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroidx/constraintlayout/solver/widgets/ConstraintWidget;
invoke-interface {p2, v0}, Landroidx/constraintlayout/solver/widgets/Helper;->add(Landroidx/constraintlayout/solver/widgets/ConstraintWidget;)V
add-int/lit8 p1, p1, 0x1
goto :goto_0
:cond_0
return-void
.end method
.method public updatePreLayout(Landroidx/constraintlayout/widget/ConstraintLayout;)V
.locals 5
invoke-virtual {p0}, Landroid/view/View;->isInEditMode()Z
move-result v0
if-eqz v0, :cond_0
iget-object v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mReferenceIds:Ljava/lang/String;
invoke-virtual {p0, v0}, Landroidx/constraintlayout/widget/ConstraintHelper;->setIds(Ljava/lang/String;)V
:cond_0
iget-object v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mHelperWidget:Landroidx/constraintlayout/solver/widgets/Helper;
if-nez v0, :cond_1
return-void
:cond_1
invoke-interface {v0}, Landroidx/constraintlayout/solver/widgets/Helper;->removeAllIds()V
const/4 v0, 0x0
:goto_0
iget v1, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mCount:I
if-ge v0, v1, :cond_4
iget-object v1, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mIds:[I
aget v1, v1, v0
invoke-virtual {p1, v1}, Landroidx/constraintlayout/widget/ConstraintLayout;->getViewById(I)Landroid/view/View;
move-result-object v2
if-nez v2, :cond_2
iget-object v3, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mMap:Ljava/util/HashMap;
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
invoke-virtual {v3, v1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/lang/String;
invoke-direct {p0, p1, v1}, Landroidx/constraintlayout/widget/ConstraintHelper;->findId(Landroidx/constraintlayout/widget/ConstraintLayout;Ljava/lang/String;)I
move-result v3
if-eqz v3, :cond_2
iget-object v2, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mIds:[I
aput v3, v2, v0
iget-object v2, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mMap:Ljava/util/HashMap;
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
invoke-virtual {v2, v4, v1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
invoke-virtual {p1, v3}, Landroidx/constraintlayout/widget/ConstraintLayout;->getViewById(I)Landroid/view/View;
move-result-object v2
:cond_2
if-eqz v2, :cond_3
iget-object v1, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mHelperWidget:Landroidx/constraintlayout/solver/widgets/Helper;
invoke-virtual {p1, v2}, Landroidx/constraintlayout/widget/ConstraintLayout;->getViewWidget(Landroid/view/View;)Landroidx/constraintlayout/solver/widgets/ConstraintWidget;
move-result-object v2
invoke-interface {v1, v2}, Landroidx/constraintlayout/solver/widgets/Helper;->add(Landroidx/constraintlayout/solver/widgets/ConstraintWidget;)V
2020-09-16 21:45:36 +00:00
:cond_3
2020-09-16 23:45:23 +00:00
add-int/lit8 v0, v0, 0x1
goto :goto_0
:cond_4
iget-object v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mHelperWidget:Landroidx/constraintlayout/solver/widgets/Helper;
iget-object p1, p1, Landroidx/constraintlayout/widget/ConstraintLayout;->mLayoutWidget:Landroidx/constraintlayout/solver/widgets/ConstraintWidgetContainer;
invoke-interface {v0, p1}, Landroidx/constraintlayout/solver/widgets/Helper;->updateConstraints(Landroidx/constraintlayout/solver/widgets/ConstraintWidgetContainer;)V
2020-05-17 12:40:10 +00:00
return-void
.end method
.method public validateParams()V
.locals 2
iget-object v0, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mHelperWidget:Landroidx/constraintlayout/solver/widgets/Helper;
if-nez v0, :cond_0
return-void
:cond_0
invoke-virtual {p0}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object v0
instance-of v1, v0, Landroidx/constraintlayout/widget/ConstraintLayout$LayoutParams;
if-eqz v1, :cond_1
check-cast v0, Landroidx/constraintlayout/widget/ConstraintLayout$LayoutParams;
iget-object v1, p0, Landroidx/constraintlayout/widget/ConstraintHelper;->mHelperWidget:Landroidx/constraintlayout/solver/widgets/Helper;
2020-09-16 23:45:23 +00:00
check-cast v1, Landroidx/constraintlayout/solver/widgets/ConstraintWidget;
2020-05-17 12:40:10 +00:00
iput-object v1, v0, Landroidx/constraintlayout/widget/ConstraintLayout$LayoutParams;->widget:Landroidx/constraintlayout/solver/widgets/ConstraintWidget;
:cond_1
return-void
.end method