522 lines
32 KiB
Java
522 lines
32 KiB
Java
package androidx.constraintlayout.solver.widgets;
|
|
|
|
import androidx.constraintlayout.solver.ArrayRow;
|
|
import androidx.constraintlayout.solver.LinearSystem;
|
|
import androidx.constraintlayout.solver.SolverVariable;
|
|
import androidx.constraintlayout.solver.widgets.ConstraintWidget;
|
|
import java.util.ArrayList;
|
|
/* loaded from: classes.dex */
|
|
public class Chain {
|
|
private static final boolean DEBUG = false;
|
|
public static final boolean USE_CHAIN_OPTIMIZATION = false;
|
|
|
|
/* JADX WARN: Code restructure failed: missing block: B:15:0x002d, code lost:
|
|
if (r8 == 2) goto L_0x003e;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:23:0x003c, code lost:
|
|
if (r8 == 2) goto L_0x003e;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:24:0x003e, code lost:
|
|
r5 = true;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:25:0x0040, code lost:
|
|
r5 = false;
|
|
*/
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
/* JADX WARN: Removed duplicated region for block: B:102:0x0197 */
|
|
/* JADX WARN: Removed duplicated region for block: B:105:0x01b4 */
|
|
/* JADX WARN: Removed duplicated region for block: B:115:0x01d1 */
|
|
/* JADX WARN: Removed duplicated region for block: B:133:0x0258 A[ADDED_TO_REGION] */
|
|
/* JADX WARN: Removed duplicated region for block: B:152:0x02b1 A[ADDED_TO_REGION] */
|
|
/* JADX WARN: Removed duplicated region for block: B:210:0x039a */
|
|
/* JADX WARN: Removed duplicated region for block: B:214:0x03a3 A[ADDED_TO_REGION] */
|
|
/* JADX WARN: Removed duplicated region for block: B:223:0x03b6 */
|
|
/* JADX WARN: Removed duplicated region for block: B:269:0x0488 */
|
|
/* JADX WARN: Removed duplicated region for block: B:274:0x04bd */
|
|
/* JADX WARN: Removed duplicated region for block: B:279:0x04d0 A[ADDED_TO_REGION] */
|
|
/* JADX WARN: Removed duplicated region for block: B:284:0x04e4 */
|
|
/* JADX WARN: Removed duplicated region for block: B:285:0x04e7 */
|
|
/* JADX WARN: Removed duplicated region for block: B:288:0x04ed */
|
|
/* JADX WARN: Removed duplicated region for block: B:289:0x04f0 */
|
|
/* JADX WARN: Removed duplicated region for block: B:291:0x04f4 */
|
|
/* JADX WARN: Removed duplicated region for block: B:296:0x0504 */
|
|
/* JADX WARN: Removed duplicated region for block: B:298:0x050a A[ADDED_TO_REGION] */
|
|
/* JADX WARN: Removed duplicated region for block: B:309:0x039b A[SYNTHETIC] */
|
|
/* JADX WARN: Removed duplicated region for block: B:320:? A[ADDED_TO_REGION, RETURN, SYNTHETIC] */
|
|
/* JADX WARN: Unknown variable types count: 1 */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
*/
|
|
public static void applyChainConstraints(ConstraintWidgetContainer constraintWidgetContainer, LinearSystem linearSystem, int i, int i2, ChainHead chainHead) {
|
|
boolean z2;
|
|
boolean z3;
|
|
boolean z4;
|
|
SolverVariable solverVariable;
|
|
ArrayList<ConstraintWidget> arrayList;
|
|
SolverVariable solverVariable2;
|
|
ConstraintWidget constraintWidget;
|
|
ConstraintAnchor constraintAnchor;
|
|
ConstraintAnchor constraintAnchor2;
|
|
ConstraintAnchor constraintAnchor3;
|
|
int i3;
|
|
int i4;
|
|
SolverVariable solverVariable3;
|
|
SolverVariable solverVariable4;
|
|
ConstraintAnchor constraintAnchor4;
|
|
SolverVariable solverVariable5;
|
|
SolverVariable solverVariable6;
|
|
ConstraintAnchor constraintAnchor5;
|
|
int size;
|
|
int i5;
|
|
boolean z5;
|
|
int i6;
|
|
ConstraintWidget constraintWidget2 = chainHead.mFirst;
|
|
ConstraintWidget constraintWidget3 = chainHead.mLast;
|
|
ConstraintWidget constraintWidget4 = chainHead.mFirstVisibleWidget;
|
|
ConstraintWidget constraintWidget5 = chainHead.mLastVisibleWidget;
|
|
ConstraintWidget constraintWidget6 = chainHead.mHead;
|
|
float f = chainHead.mTotalWeight;
|
|
boolean z6 = constraintWidgetContainer.mListDimensionBehaviors[i] == ConstraintWidget.DimensionBehaviour.WRAP_CONTENT;
|
|
if (i == 0) {
|
|
int i7 = constraintWidget6.mHorizontalChainStyle;
|
|
z3 = i7 == 0;
|
|
z2 = i7 == 1;
|
|
} else {
|
|
int i8 = constraintWidget6.mVerticalChainStyle;
|
|
z3 = i8 == 0;
|
|
z2 = i8 == 1;
|
|
}
|
|
ConstraintWidget constraintWidget7 = constraintWidget2;
|
|
boolean z7 = false;
|
|
while (true) {
|
|
solverVariable = null;
|
|
if (z7) {
|
|
break;
|
|
}
|
|
ConstraintAnchor constraintAnchor6 = constraintWidget7.mListAnchors[i2];
|
|
int i9 = z4 ? 1 : 4;
|
|
int margin = constraintAnchor6.getMargin();
|
|
ConstraintWidget.DimensionBehaviour dimensionBehaviour = constraintWidget7.mListDimensionBehaviors[i];
|
|
ConstraintWidget.DimensionBehaviour dimensionBehaviour2 = ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT;
|
|
if (dimensionBehaviour == dimensionBehaviour2 && constraintWidget7.mResolvedMatchConstraintDefault[i] == 0) {
|
|
z2 = z2;
|
|
z5 = true;
|
|
} else {
|
|
z2 = z2;
|
|
z5 = false;
|
|
}
|
|
ConstraintAnchor constraintAnchor7 = constraintAnchor6.mTarget;
|
|
if (!(constraintAnchor7 == null || constraintWidget7 == constraintWidget2)) {
|
|
margin = constraintAnchor7.getMargin() + margin;
|
|
}
|
|
if (!z4 || constraintWidget7 == constraintWidget2 || constraintWidget7 == constraintWidget4) {
|
|
z3 = z3;
|
|
} else {
|
|
z3 = z3;
|
|
i9 = 8;
|
|
}
|
|
ConstraintAnchor constraintAnchor8 = constraintAnchor6.mTarget;
|
|
if (constraintAnchor8 != null) {
|
|
if (constraintWidget7 == constraintWidget4) {
|
|
constraintWidget6 = constraintWidget6;
|
|
constraintWidget2 = constraintWidget2;
|
|
linearSystem.addGreaterThan(constraintAnchor6.mSolverVariable, constraintAnchor8.mSolverVariable, margin, 6);
|
|
} else {
|
|
constraintWidget6 = constraintWidget6;
|
|
constraintWidget2 = constraintWidget2;
|
|
linearSystem.addGreaterThan(constraintAnchor6.mSolverVariable, constraintAnchor8.mSolverVariable, margin, 8);
|
|
}
|
|
if (z5 && !z4) {
|
|
i9 = 5;
|
|
}
|
|
linearSystem.addEquality(constraintAnchor6.mSolverVariable, constraintAnchor6.mTarget.mSolverVariable, margin, i9);
|
|
} else {
|
|
constraintWidget6 = constraintWidget6;
|
|
constraintWidget2 = constraintWidget2;
|
|
}
|
|
if (z6) {
|
|
if (constraintWidget7.getVisibility() == 8 || constraintWidget7.mListDimensionBehaviors[i] != dimensionBehaviour2) {
|
|
i6 = 0;
|
|
} else {
|
|
ConstraintAnchor[] constraintAnchorArr = constraintWidget7.mListAnchors;
|
|
i6 = 0;
|
|
linearSystem.addGreaterThan(constraintAnchorArr[i2 + 1].mSolverVariable, constraintAnchorArr[i2].mSolverVariable, 0, 5);
|
|
}
|
|
linearSystem.addGreaterThan(constraintWidget7.mListAnchors[i2].mSolverVariable, constraintWidgetContainer.mListAnchors[i2].mSolverVariable, i6, 8);
|
|
}
|
|
ConstraintAnchor constraintAnchor9 = constraintWidget7.mListAnchors[i2 + 1].mTarget;
|
|
if (constraintAnchor9 != null) {
|
|
?? r2 = constraintAnchor9.mOwner;
|
|
ConstraintAnchor[] constraintAnchorArr2 = r2.mListAnchors;
|
|
if (constraintAnchorArr2[i2].mTarget != null && constraintAnchorArr2[i2].mTarget.mOwner == constraintWidget7) {
|
|
solverVariable = r2;
|
|
}
|
|
}
|
|
if (solverVariable != null) {
|
|
constraintWidget7 = solverVariable;
|
|
z7 = z7;
|
|
} else {
|
|
z7 = true;
|
|
}
|
|
f = f;
|
|
}
|
|
if (constraintWidget5 != null) {
|
|
int i10 = i2 + 1;
|
|
if (constraintWidget3.mListAnchors[i10].mTarget != null) {
|
|
ConstraintAnchor constraintAnchor10 = constraintWidget5.mListAnchors[i10];
|
|
if ((constraintWidget5.mListDimensionBehaviors[i] == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT && constraintWidget5.mResolvedMatchConstraintDefault[i] == 0) && !z4) {
|
|
ConstraintAnchor constraintAnchor11 = constraintAnchor10.mTarget;
|
|
if (constraintAnchor11.mOwner == constraintWidgetContainer) {
|
|
linearSystem.addEquality(constraintAnchor10.mSolverVariable, constraintAnchor11.mSolverVariable, -constraintAnchor10.getMargin(), 5);
|
|
linearSystem.addLowerThan(constraintAnchor10.mSolverVariable, constraintWidget3.mListAnchors[i10].mTarget.mSolverVariable, -constraintAnchor10.getMargin(), 6);
|
|
if (z6) {
|
|
int i11 = i2 + 1;
|
|
SolverVariable solverVariable7 = constraintWidgetContainer.mListAnchors[i11].mSolverVariable;
|
|
ConstraintAnchor[] constraintAnchorArr3 = constraintWidget3.mListAnchors;
|
|
linearSystem.addGreaterThan(solverVariable7, constraintAnchorArr3[i11].mSolverVariable, constraintAnchorArr3[i11].getMargin(), 8);
|
|
}
|
|
arrayList = chainHead.mWeightedMatchConstraintsWidgets;
|
|
if (arrayList != null && (size = arrayList.size()) > 1) {
|
|
float f2 = (chainHead.mHasUndefinedWeights || chainHead.mHasComplexMatchWeights) ? f : chainHead.mWidgetsMatchCount;
|
|
float f3 = 0.0f;
|
|
ConstraintWidget constraintWidget8 = null;
|
|
i5 = 0;
|
|
float f4 = 0.0f;
|
|
while (i5 < size) {
|
|
ConstraintWidget constraintWidget9 = arrayList.get(i5);
|
|
float f5 = constraintWidget9.mWeight[i];
|
|
if (f5 < f3) {
|
|
if (chainHead.mHasComplexMatchWeights) {
|
|
ConstraintAnchor[] constraintAnchorArr4 = constraintWidget9.mListAnchors;
|
|
linearSystem.addEquality(constraintAnchorArr4[i2 + 1].mSolverVariable, constraintAnchorArr4[i2].mSolverVariable, 0, 4);
|
|
arrayList = arrayList;
|
|
i5++;
|
|
f3 = 0.0f;
|
|
} else {
|
|
f5 = 1.0f;
|
|
}
|
|
}
|
|
if (f5 == f3) {
|
|
ConstraintAnchor[] constraintAnchorArr5 = constraintWidget9.mListAnchors;
|
|
linearSystem.addEquality(constraintAnchorArr5[i2 + 1].mSolverVariable, constraintAnchorArr5[i2].mSolverVariable, 0, 8);
|
|
arrayList = arrayList;
|
|
i5++;
|
|
f3 = 0.0f;
|
|
} else {
|
|
if (constraintWidget8 != null) {
|
|
ConstraintAnchor[] constraintAnchorArr6 = constraintWidget8.mListAnchors;
|
|
SolverVariable solverVariable8 = constraintAnchorArr6[i2].mSolverVariable;
|
|
int i12 = i2 + 1;
|
|
SolverVariable solverVariable9 = constraintAnchorArr6[i12].mSolverVariable;
|
|
ConstraintAnchor[] constraintAnchorArr7 = constraintWidget9.mListAnchors;
|
|
SolverVariable solverVariable10 = constraintAnchorArr7[i2].mSolverVariable;
|
|
SolverVariable solverVariable11 = constraintAnchorArr7[i12].mSolverVariable;
|
|
arrayList = arrayList;
|
|
ArrayRow createRow = linearSystem.createRow();
|
|
createRow.createRowEqualMatchDimensions(f4, f2, f5, solverVariable8, solverVariable9, solverVariable10, solverVariable11);
|
|
linearSystem.addConstraint(createRow);
|
|
} else {
|
|
arrayList = arrayList;
|
|
}
|
|
constraintWidget8 = constraintWidget9;
|
|
f4 = f5;
|
|
i5++;
|
|
f3 = 0.0f;
|
|
}
|
|
}
|
|
}
|
|
if (constraintWidget4 == null && (constraintWidget4 == constraintWidget5 || z4)) {
|
|
ConstraintAnchor constraintAnchor12 = constraintWidget2.mListAnchors[i2];
|
|
int i13 = i2 + 1;
|
|
ConstraintAnchor constraintAnchor13 = constraintWidget3.mListAnchors[i13];
|
|
ConstraintAnchor constraintAnchor14 = constraintAnchor12.mTarget;
|
|
SolverVariable solverVariable12 = constraintAnchor14 != null ? constraintAnchor14.mSolverVariable : null;
|
|
ConstraintAnchor constraintAnchor15 = constraintAnchor13.mTarget;
|
|
SolverVariable solverVariable13 = constraintAnchor15 != null ? constraintAnchor15.mSolverVariable : null;
|
|
ConstraintAnchor constraintAnchor16 = constraintWidget4.mListAnchors[i2];
|
|
ConstraintAnchor constraintAnchor17 = constraintWidget5.mListAnchors[i13];
|
|
if (!(solverVariable12 == null || solverVariable13 == null)) {
|
|
linearSystem.addCentering(constraintAnchor16.mSolverVariable, solverVariable12, constraintAnchor16.getMargin(), i == 0 ? constraintWidget6.mHorizontalBiasPercent : constraintWidget6.mVerticalBiasPercent, solverVariable13, constraintAnchor17.mSolverVariable, constraintAnchor17.getMargin(), 7);
|
|
}
|
|
} else if (z3 || constraintWidget4 == null) {
|
|
int i14 = 8;
|
|
if (z2 && constraintWidget4 != null) {
|
|
int i15 = chainHead.mWidgetsMatchCount;
|
|
boolean z8 = i15 <= 0 && chainHead.mWidgetsCount == i15;
|
|
constraintWidget = constraintWidget4;
|
|
constraintWidget = constraintWidget;
|
|
while (constraintWidget != null) {
|
|
constraintWidget = constraintWidget.mNextChainWidget[i];
|
|
while (constraintWidget != null && constraintWidget.getVisibility() == i14) {
|
|
constraintWidget = constraintWidget.mNextChainWidget[i];
|
|
}
|
|
if (constraintWidget == constraintWidget4 || constraintWidget == constraintWidget5 || constraintWidget == null) {
|
|
constraintWidget = constraintWidget;
|
|
i4 = 8;
|
|
} else {
|
|
ConstraintWidget constraintWidget10 = constraintWidget == constraintWidget5 ? null : constraintWidget;
|
|
ConstraintAnchor constraintAnchor18 = constraintWidget.mListAnchors[i2];
|
|
SolverVariable solverVariable14 = constraintAnchor18.mSolverVariable;
|
|
ConstraintAnchor constraintAnchor19 = constraintAnchor18.mTarget;
|
|
if (constraintAnchor19 != null) {
|
|
SolverVariable solverVariable15 = constraintAnchor19.mSolverVariable;
|
|
}
|
|
int i16 = i2 + 1;
|
|
SolverVariable solverVariable16 = constraintWidget.mListAnchors[i16].mSolverVariable;
|
|
int margin2 = constraintAnchor18.getMargin();
|
|
int margin3 = constraintWidget.mListAnchors[i16].getMargin();
|
|
if (constraintWidget10 != null) {
|
|
constraintAnchor4 = constraintWidget10.mListAnchors[i2];
|
|
solverVariable4 = constraintAnchor4.mSolverVariable;
|
|
ConstraintAnchor constraintAnchor20 = constraintAnchor4.mTarget;
|
|
solverVariable3 = constraintAnchor20 != null ? constraintAnchor20.mSolverVariable : null;
|
|
} else {
|
|
constraintAnchor4 = constraintWidget5.mListAnchors[i2];
|
|
solverVariable4 = constraintAnchor4 != null ? constraintAnchor4.mSolverVariable : null;
|
|
solverVariable3 = constraintWidget.mListAnchors[i16].mSolverVariable;
|
|
}
|
|
int margin4 = constraintAnchor4 != null ? constraintAnchor4.getMargin() + margin3 : margin3;
|
|
int margin5 = constraintWidget.mListAnchors[i16].getMargin() + margin2;
|
|
int i17 = z8 ? 8 : 4;
|
|
if (solverVariable14 == null || solverVariable16 == null || solverVariable4 == null || solverVariable3 == null) {
|
|
constraintWidget = constraintWidget10;
|
|
constraintWidget = constraintWidget;
|
|
i4 = 8;
|
|
} else {
|
|
constraintWidget = constraintWidget10;
|
|
constraintWidget = constraintWidget;
|
|
i4 = 8;
|
|
linearSystem.addCentering(solverVariable14, solverVariable16, margin5, 0.5f, solverVariable4, solverVariable3, margin4, i17);
|
|
}
|
|
}
|
|
if (constraintWidget.getVisibility() != i4) {
|
|
}
|
|
i14 = 8;
|
|
}
|
|
ConstraintAnchor constraintAnchor21 = constraintWidget4.mListAnchors[i2];
|
|
constraintAnchor = constraintWidget2.mListAnchors[i2].mTarget;
|
|
int i18 = i2 + 1;
|
|
constraintAnchor2 = constraintWidget5.mListAnchors[i18];
|
|
constraintAnchor3 = constraintWidget3.mListAnchors[i18].mTarget;
|
|
if (constraintAnchor != null) {
|
|
i3 = 5;
|
|
} else if (constraintWidget4 != constraintWidget5) {
|
|
i3 = 5;
|
|
linearSystem.addEquality(constraintAnchor21.mSolverVariable, constraintAnchor.mSolverVariable, constraintAnchor21.getMargin(), 5);
|
|
} else {
|
|
i3 = 5;
|
|
if (constraintAnchor3 != null) {
|
|
linearSystem.addCentering(constraintAnchor21.mSolverVariable, constraintAnchor.mSolverVariable, constraintAnchor21.getMargin(), 0.5f, constraintAnchor2.mSolverVariable, constraintAnchor3.mSolverVariable, constraintAnchor2.getMargin(), 5);
|
|
}
|
|
}
|
|
if (!(constraintAnchor3 == null || constraintWidget4 == constraintWidget5)) {
|
|
linearSystem.addEquality(constraintAnchor2.mSolverVariable, constraintAnchor3.mSolverVariable, -constraintAnchor2.getMargin(), i3);
|
|
}
|
|
}
|
|
} else {
|
|
int i19 = chainHead.mWidgetsMatchCount;
|
|
boolean z9 = i19 > 0 && chainHead.mWidgetsCount == i19;
|
|
ConstraintWidget constraintWidget11 = constraintWidget4;
|
|
ConstraintWidget constraintWidget12 = constraintWidget11;
|
|
while (constraintWidget11 != null) {
|
|
ConstraintWidget constraintWidget13 = constraintWidget11.mNextChainWidget[i];
|
|
while (constraintWidget13 != null && constraintWidget13.getVisibility() == 8) {
|
|
constraintWidget13 = constraintWidget13.mNextChainWidget[i];
|
|
}
|
|
if (constraintWidget13 != null || constraintWidget11 == constraintWidget5) {
|
|
ConstraintAnchor constraintAnchor22 = constraintWidget11.mListAnchors[i2];
|
|
SolverVariable solverVariable17 = constraintAnchor22.mSolverVariable;
|
|
ConstraintAnchor constraintAnchor23 = constraintAnchor22.mTarget;
|
|
SolverVariable solverVariable18 = constraintAnchor23 != null ? constraintAnchor23.mSolverVariable : null;
|
|
if (constraintWidget12 != constraintWidget11) {
|
|
solverVariable18 = constraintWidget12.mListAnchors[i2 + 1].mSolverVariable;
|
|
} else if (constraintWidget11 == constraintWidget4 && constraintWidget12 == constraintWidget11) {
|
|
ConstraintAnchor[] constraintAnchorArr8 = constraintWidget2.mListAnchors;
|
|
solverVariable18 = constraintAnchorArr8[i2].mTarget != null ? constraintAnchorArr8[i2].mTarget.mSolverVariable : null;
|
|
}
|
|
int margin6 = constraintAnchor22.getMargin();
|
|
int i20 = i2 + 1;
|
|
int margin7 = constraintWidget11.mListAnchors[i20].getMargin();
|
|
if (constraintWidget13 != null) {
|
|
constraintAnchor5 = constraintWidget13.mListAnchors[i2];
|
|
solverVariable6 = constraintAnchor5.mSolverVariable;
|
|
solverVariable5 = constraintWidget11.mListAnchors[i20].mSolverVariable;
|
|
} else {
|
|
constraintAnchor5 = constraintWidget3.mListAnchors[i20].mTarget;
|
|
solverVariable6 = constraintAnchor5 != null ? constraintAnchor5.mSolverVariable : null;
|
|
solverVariable5 = constraintWidget11.mListAnchors[i20].mSolverVariable;
|
|
}
|
|
if (constraintAnchor5 != null) {
|
|
margin7 += constraintAnchor5.getMargin();
|
|
}
|
|
if (constraintWidget12 != null) {
|
|
margin6 += constraintWidget12.mListAnchors[i20].getMargin();
|
|
}
|
|
if (!(solverVariable17 == null || solverVariable18 == null || solverVariable6 == null || solverVariable5 == null)) {
|
|
if (constraintWidget11 == constraintWidget4) {
|
|
margin6 = constraintWidget4.mListAnchors[i2].getMargin();
|
|
}
|
|
if (constraintWidget11 == constraintWidget5) {
|
|
margin7 = constraintWidget5.mListAnchors[i20].getMargin();
|
|
}
|
|
constraintWidget11 = constraintWidget13;
|
|
linearSystem.addCentering(solverVariable17, solverVariable18, margin6, 0.5f, solverVariable6, solverVariable5, margin7, z9 ? 8 : 5);
|
|
if (constraintWidget11.getVisibility() == 8) {
|
|
constraintWidget12 = constraintWidget11;
|
|
}
|
|
}
|
|
}
|
|
constraintWidget11 = constraintWidget13;
|
|
if (constraintWidget11.getVisibility() == 8) {
|
|
}
|
|
}
|
|
}
|
|
if ((!z3 || z2) && constraintWidget4 != null && constraintWidget4 != constraintWidget5) {
|
|
ConstraintAnchor[] constraintAnchorArr9 = constraintWidget4.mListAnchors;
|
|
ConstraintAnchor constraintAnchor24 = constraintAnchorArr9[i2];
|
|
int i21 = i2 + 1;
|
|
ConstraintAnchor constraintAnchor25 = constraintWidget5.mListAnchors[i21];
|
|
ConstraintAnchor constraintAnchor26 = constraintAnchor24.mTarget;
|
|
solverVariable2 = constraintAnchor26 != null ? constraintAnchor26.mSolverVariable : null;
|
|
ConstraintAnchor constraintAnchor27 = constraintAnchor25.mTarget;
|
|
solverVariable = constraintAnchor27 != null ? constraintAnchor27.mSolverVariable : null;
|
|
if (constraintWidget3 != constraintWidget5) {
|
|
ConstraintAnchor constraintAnchor28 = constraintWidget3.mListAnchors[i21].mTarget;
|
|
if (constraintAnchor28 != null) {
|
|
solverVariable = constraintAnchor28.mSolverVariable;
|
|
}
|
|
}
|
|
if (constraintWidget4 == constraintWidget5) {
|
|
constraintAnchor24 = constraintAnchorArr9[i2];
|
|
constraintAnchor25 = constraintAnchorArr9[i21];
|
|
}
|
|
if (solverVariable2 == null && solverVariable != null) {
|
|
linearSystem.addCentering(constraintAnchor24.mSolverVariable, solverVariable2, constraintAnchor24.getMargin(), 0.5f, solverVariable, constraintAnchor25.mSolverVariable, constraintWidget5.mListAnchors[i21].getMargin(), 5);
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
}
|
|
if (z4) {
|
|
ConstraintAnchor constraintAnchor29 = constraintAnchor10.mTarget;
|
|
if (constraintAnchor29.mOwner == constraintWidgetContainer) {
|
|
linearSystem.addEquality(constraintAnchor10.mSolverVariable, constraintAnchor29.mSolverVariable, -constraintAnchor10.getMargin(), 4);
|
|
}
|
|
}
|
|
linearSystem.addLowerThan(constraintAnchor10.mSolverVariable, constraintWidget3.mListAnchors[i10].mTarget.mSolverVariable, -constraintAnchor10.getMargin(), 6);
|
|
if (z6) {
|
|
}
|
|
arrayList = chainHead.mWeightedMatchConstraintsWidgets;
|
|
if (arrayList != null) {
|
|
if (chainHead.mHasUndefinedWeights) {
|
|
}
|
|
float f32 = 0.0f;
|
|
ConstraintWidget constraintWidget82 = null;
|
|
i5 = 0;
|
|
float f42 = 0.0f;
|
|
while (i5 < size) {
|
|
}
|
|
}
|
|
if (constraintWidget4 == null) {
|
|
}
|
|
if (z3) {
|
|
}
|
|
int i142 = 8;
|
|
if (z2) {
|
|
int i152 = chainHead.mWidgetsMatchCount;
|
|
if (i152 <= 0) {
|
|
}
|
|
constraintWidget = constraintWidget4;
|
|
constraintWidget = constraintWidget;
|
|
while (constraintWidget != null) {
|
|
}
|
|
ConstraintAnchor constraintAnchor212 = constraintWidget4.mListAnchors[i2];
|
|
constraintAnchor = constraintWidget2.mListAnchors[i2].mTarget;
|
|
int i182 = i2 + 1;
|
|
constraintAnchor2 = constraintWidget5.mListAnchors[i182];
|
|
constraintAnchor3 = constraintWidget3.mListAnchors[i182].mTarget;
|
|
if (constraintAnchor != null) {
|
|
}
|
|
if (constraintAnchor3 == null) {
|
|
linearSystem.addEquality(constraintAnchor2.mSolverVariable, constraintAnchor3.mSolverVariable, -constraintAnchor2.getMargin(), i3);
|
|
}
|
|
}
|
|
if (!z3) {
|
|
}
|
|
ConstraintAnchor[] constraintAnchorArr92 = constraintWidget4.mListAnchors;
|
|
ConstraintAnchor constraintAnchor242 = constraintAnchorArr92[i2];
|
|
int i212 = i2 + 1;
|
|
ConstraintAnchor constraintAnchor252 = constraintWidget5.mListAnchors[i212];
|
|
ConstraintAnchor constraintAnchor262 = constraintAnchor242.mTarget;
|
|
if (constraintAnchor262 != null) {
|
|
}
|
|
ConstraintAnchor constraintAnchor272 = constraintAnchor252.mTarget;
|
|
if (constraintAnchor272 != null) {
|
|
}
|
|
if (constraintWidget3 != constraintWidget5) {
|
|
}
|
|
if (constraintWidget4 == constraintWidget5) {
|
|
}
|
|
if (solverVariable2 == null) {
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
}
|
|
if (z6) {
|
|
}
|
|
arrayList = chainHead.mWeightedMatchConstraintsWidgets;
|
|
if (arrayList != null) {
|
|
}
|
|
if (constraintWidget4 == null) {
|
|
}
|
|
if (z3) {
|
|
}
|
|
int i1422 = 8;
|
|
if (z2) {
|
|
}
|
|
if (!z3) {
|
|
}
|
|
ConstraintAnchor[] constraintAnchorArr922 = constraintWidget4.mListAnchors;
|
|
ConstraintAnchor constraintAnchor2422 = constraintAnchorArr922[i2];
|
|
int i2122 = i2 + 1;
|
|
ConstraintAnchor constraintAnchor2522 = constraintWidget5.mListAnchors[i2122];
|
|
ConstraintAnchor constraintAnchor2622 = constraintAnchor2422.mTarget;
|
|
if (constraintAnchor2622 != null) {
|
|
}
|
|
ConstraintAnchor constraintAnchor2722 = constraintAnchor2522.mTarget;
|
|
if (constraintAnchor2722 != null) {
|
|
}
|
|
if (constraintWidget3 != constraintWidget5) {
|
|
}
|
|
if (constraintWidget4 == constraintWidget5) {
|
|
}
|
|
if (solverVariable2 == null) {
|
|
}
|
|
}
|
|
|
|
public static void applyChainConstraints(ConstraintWidgetContainer constraintWidgetContainer, LinearSystem linearSystem, ArrayList<ConstraintWidget> arrayList, int i) {
|
|
ChainHead[] chainHeadArr;
|
|
int i2;
|
|
int i3;
|
|
if (i == 0) {
|
|
i3 = constraintWidgetContainer.mHorizontalChainsSize;
|
|
chainHeadArr = constraintWidgetContainer.mHorizontalChainsArray;
|
|
i2 = 0;
|
|
} else {
|
|
i3 = constraintWidgetContainer.mVerticalChainsSize;
|
|
chainHeadArr = constraintWidgetContainer.mVerticalChainsArray;
|
|
i2 = 2;
|
|
}
|
|
for (int i4 = 0; i4 < i3; i4++) {
|
|
ChainHead chainHead = chainHeadArr[i4];
|
|
chainHead.define();
|
|
if (arrayList == null || arrayList.contains(chainHead.mFirst)) {
|
|
applyChainConstraints(constraintWidgetContainer, linearSystem, i, i2, chainHead);
|
|
}
|
|
}
|
|
}
|
|
}
|