Initial commit

This commit is contained in:
2025-05-13 19:24:51 +02:00
commit a950f49678
10604 changed files with 932663 additions and 0 deletions

View File

@@ -0,0 +1,309 @@
package androidx.constraintlayout.solver.widgets;
import androidx.constraintlayout.solver.widgets.ConstraintWidget;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/* loaded from: classes.dex */
public class Analyzer {
public static void a(ConstraintWidgetContainer constraintWidgetContainer) {
if ((constraintWidgetContainer.M() & 32) != 32) {
b(constraintWidgetContainer);
return;
}
constraintWidgetContainer.D0 = true;
constraintWidgetContainer.x0 = false;
constraintWidgetContainer.y0 = false;
constraintWidgetContainer.z0 = false;
ArrayList<ConstraintWidget> arrayList = constraintWidgetContainer.k0;
List<ConstraintWidgetGroup> list = constraintWidgetContainer.w0;
boolean z = constraintWidgetContainer.j() == ConstraintWidget.DimensionBehaviour.WRAP_CONTENT;
boolean z2 = constraintWidgetContainer.q() == ConstraintWidget.DimensionBehaviour.WRAP_CONTENT;
boolean z3 = z || z2;
list.clear();
for (ConstraintWidget constraintWidget : arrayList) {
constraintWidget.p = null;
constraintWidget.d0 = false;
constraintWidget.F();
}
for (ConstraintWidget constraintWidget2 : arrayList) {
if (constraintWidget2.p == null && !a(constraintWidget2, list, z3)) {
b(constraintWidgetContainer);
constraintWidgetContainer.D0 = false;
return;
}
}
int i = 0;
int i2 = 0;
for (ConstraintWidgetGroup constraintWidgetGroup : list) {
i = Math.max(i, a(constraintWidgetGroup, 0));
i2 = Math.max(i2, a(constraintWidgetGroup, 1));
}
if (z) {
constraintWidgetContainer.a(ConstraintWidget.DimensionBehaviour.FIXED);
constraintWidgetContainer.o(i);
constraintWidgetContainer.x0 = true;
constraintWidgetContainer.y0 = true;
constraintWidgetContainer.A0 = i;
}
if (z2) {
constraintWidgetContainer.b(ConstraintWidget.DimensionBehaviour.FIXED);
constraintWidgetContainer.g(i2);
constraintWidgetContainer.x0 = true;
constraintWidgetContainer.z0 = true;
constraintWidgetContainer.B0 = i2;
}
a(list, 0, constraintWidgetContainer.s());
a(list, 1, constraintWidgetContainer.i());
}
private static void b(ConstraintWidgetContainer constraintWidgetContainer) {
constraintWidgetContainer.w0.clear();
constraintWidgetContainer.w0.add(0, new ConstraintWidgetGroup(constraintWidgetContainer.k0));
}
private static boolean a(ConstraintWidget constraintWidget, List<ConstraintWidgetGroup> list, boolean z) {
ConstraintWidgetGroup constraintWidgetGroup = new ConstraintWidgetGroup(new ArrayList(), true);
list.add(constraintWidgetGroup);
return a(constraintWidget, constraintWidgetGroup, list, z);
}
/* JADX WARN: Code restructure failed: missing block: B:139:0x0181, code lost:
if (r3.b == r4) goto L123;
*/
/* JADX WARN: Code restructure failed: missing block: B:159:0x0128, code lost:
if (r3.b == r4) goto L92;
*/
/* JADX WARN: Removed duplicated region for block: B:134:0x0173 */
/* JADX WARN: Removed duplicated region for block: B:85:0x01a0 */
/* JADX WARN: Removed duplicated region for block: B:99:0x01c2 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
private static boolean a(androidx.constraintlayout.solver.widgets.ConstraintWidget r8, androidx.constraintlayout.solver.widgets.ConstraintWidgetGroup r9, java.util.List<androidx.constraintlayout.solver.widgets.ConstraintWidgetGroup> r10, boolean r11) {
/*
Method dump skipped, instructions count: 560
To view this dump change 'Code comments level' option to 'DEBUG'
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.constraintlayout.solver.widgets.Analyzer.a(androidx.constraintlayout.solver.widgets.ConstraintWidget, androidx.constraintlayout.solver.widgets.ConstraintWidgetGroup, java.util.List, boolean):boolean");
}
private static void a(ConstraintWidgetContainer constraintWidgetContainer, ConstraintWidget constraintWidget, ConstraintWidgetGroup constraintWidgetGroup) {
constraintWidgetGroup.d = false;
constraintWidgetContainer.D0 = false;
constraintWidget.b0 = false;
}
private static int a(ConstraintWidgetGroup constraintWidgetGroup, int i) {
int i2 = i * 2;
List<ConstraintWidget> a = constraintWidgetGroup.a(i);
int size = a.size();
int i3 = 0;
for (int i4 = 0; i4 < size; i4++) {
ConstraintWidget constraintWidget = a.get(i4);
ConstraintAnchor[] constraintAnchorArr = constraintWidget.A;
int i5 = i2 + 1;
i3 = Math.max(i3, a(constraintWidget, i, constraintAnchorArr[i5].d == null || !(constraintAnchorArr[i2].d == null || constraintAnchorArr[i5].d == null), 0));
}
constraintWidgetGroup.e[i] = i3;
return i3;
}
private static int a(ConstraintWidget constraintWidget, int i, boolean z, int i2) {
int i3;
int c;
int i4;
int i5;
int i6;
int i7;
int s;
int i8;
int i9;
int i10;
int i11 = 0;
if (!constraintWidget.b0) {
return 0;
}
boolean z2 = constraintWidget.w.d != null && i == 1;
if (z) {
i3 = constraintWidget.c();
c = constraintWidget.i() - constraintWidget.c();
i5 = i * 2;
i4 = i5 + 1;
} else {
i3 = constraintWidget.i() - constraintWidget.c();
c = constraintWidget.c();
i4 = i * 2;
i5 = i4 + 1;
}
ConstraintAnchor[] constraintAnchorArr = constraintWidget.A;
if (constraintAnchorArr[i4].d == null || constraintAnchorArr[i5].d != null) {
i6 = i4;
i7 = 1;
} else {
i6 = i5;
i5 = i4;
i7 = -1;
}
int i12 = z2 ? i2 - i3 : i2;
int b = (constraintWidget.A[i5].b() * i7) + a(constraintWidget, i);
int i13 = i12 + b;
int s2 = (i == 0 ? constraintWidget.s() : constraintWidget.i()) * i7;
Iterator<ResolutionNode> it = constraintWidget.A[i5].d().a.iterator();
while (it.hasNext()) {
i11 = Math.max(i11, a(((ResolutionAnchor) it.next()).c.b, i, z, i13));
}
int i14 = 0;
for (Iterator<ResolutionNode> it2 = constraintWidget.A[i6].d().a.iterator(); it2.hasNext(); it2 = it2) {
i14 = Math.max(i14, a(((ResolutionAnchor) it2.next()).c.b, i, z, s2 + i13));
}
if (z2) {
i11 -= i3;
s = i14 + c;
} else {
s = i14 + ((i == 0 ? constraintWidget.s() : constraintWidget.i()) * i7);
}
int i15 = 1;
if (i == 1) {
Iterator<ResolutionNode> it3 = constraintWidget.w.d().a.iterator();
int i16 = 0;
while (it3.hasNext()) {
Iterator<ResolutionNode> it4 = it3;
ResolutionAnchor resolutionAnchor = (ResolutionAnchor) it3.next();
if (i7 == i15) {
i16 = Math.max(i16, a(resolutionAnchor.c.b, i, z, i3 + i13));
i10 = i6;
} else {
i10 = i6;
i16 = Math.max(i16, a(resolutionAnchor.c.b, i, z, (c * i7) + i13));
}
it3 = it4;
i6 = i10;
i15 = 1;
}
i8 = i6;
int i17 = i16;
i9 = (constraintWidget.w.d().a.size() <= 0 || z2) ? i17 : i7 == 1 ? i17 + i3 : i17 - c;
} else {
i8 = i6;
i9 = 0;
}
int max = b + Math.max(i11, Math.max(s, i9));
int i18 = i13 + s2;
if (i7 != -1) {
i13 = i18;
i18 = i13;
}
if (z) {
Optimizer.a(constraintWidget, i, i18);
constraintWidget.a(i18, i13, i);
} else {
constraintWidget.p.a(constraintWidget, i);
constraintWidget.d(i18, i);
}
if (constraintWidget.c(i) == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT && constraintWidget.G != 0.0f) {
constraintWidget.p.a(constraintWidget, i);
}
ConstraintAnchor[] constraintAnchorArr2 = constraintWidget.A;
if (constraintAnchorArr2[i5].d != null && constraintAnchorArr2[i8].d != null) {
ConstraintWidget k = constraintWidget.k();
ConstraintAnchor[] constraintAnchorArr3 = constraintWidget.A;
if (constraintAnchorArr3[i5].d.b == k && constraintAnchorArr3[i8].d.b == k) {
constraintWidget.p.a(constraintWidget, i);
}
}
return max;
}
private static void a(ConstraintAnchor constraintAnchor) {
ResolutionAnchor d = constraintAnchor.d();
ConstraintAnchor constraintAnchor2 = constraintAnchor.d;
if (constraintAnchor2 == null || constraintAnchor2.d == constraintAnchor) {
return;
}
constraintAnchor2.d().a(d);
}
public static void a(List<ConstraintWidgetGroup> list, int i, int i2) {
int size = list.size();
for (int i3 = 0; i3 < size; i3++) {
for (ConstraintWidget constraintWidget : list.get(i3).b(i)) {
if (constraintWidget.b0) {
a(constraintWidget, i, i2);
}
}
}
}
private static void a(ConstraintWidget constraintWidget, int i, int i2) {
int i3 = i * 2;
ConstraintAnchor[] constraintAnchorArr = constraintWidget.A;
ConstraintAnchor constraintAnchor = constraintAnchorArr[i3];
ConstraintAnchor constraintAnchor2 = constraintAnchorArr[i3 + 1];
if ((constraintAnchor.d == null || constraintAnchor2.d == null) ? false : true) {
Optimizer.a(constraintWidget, i, a(constraintWidget, i) + constraintAnchor.b());
return;
}
if (constraintWidget.G != 0.0f && constraintWidget.c(i) == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT) {
int a = a(constraintWidget);
int i4 = (int) constraintWidget.A[i3].d().g;
constraintAnchor2.d().f = constraintAnchor.d();
constraintAnchor2.d().g = a;
constraintAnchor2.d().b = 1;
constraintWidget.a(i4, i4 + a, i);
return;
}
int e = i2 - constraintWidget.e(i);
int d = e - constraintWidget.d(i);
constraintWidget.a(d, e, i);
Optimizer.a(constraintWidget, i, d);
}
private static int a(ConstraintWidget constraintWidget, int i) {
ConstraintAnchor constraintAnchor;
int i2 = i * 2;
ConstraintAnchor[] constraintAnchorArr = constraintWidget.A;
ConstraintAnchor constraintAnchor2 = constraintAnchorArr[i2];
ConstraintAnchor constraintAnchor3 = constraintAnchorArr[i2 + 1];
ConstraintAnchor constraintAnchor4 = constraintAnchor2.d;
if (constraintAnchor4 == null) {
return 0;
}
ConstraintWidget constraintWidget2 = constraintAnchor4.b;
ConstraintWidget constraintWidget3 = constraintWidget.D;
if (constraintWidget2 != constraintWidget3 || (constraintAnchor = constraintAnchor3.d) == null || constraintAnchor.b != constraintWidget3) {
return 0;
}
return (int) ((((constraintWidget3.d(i) - constraintAnchor2.b()) - constraintAnchor3.b()) - constraintWidget.d(i)) * (i == 0 ? constraintWidget.V : constraintWidget.W));
}
private static int a(ConstraintWidget constraintWidget) {
float s;
float i;
if (constraintWidget.j() == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT) {
if (constraintWidget.H == 0) {
i = constraintWidget.i() * constraintWidget.G;
} else {
i = constraintWidget.i() / constraintWidget.G;
}
int i2 = (int) i;
constraintWidget.o(i2);
return i2;
}
if (constraintWidget.q() != ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT) {
return -1;
}
if (constraintWidget.H == 1) {
s = constraintWidget.s() * constraintWidget.G;
} else {
s = constraintWidget.s() / constraintWidget.G;
}
int i3 = (int) s;
constraintWidget.g(i3);
return i3;
}
}

View File

@@ -0,0 +1,226 @@
package androidx.constraintlayout.solver.widgets;
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 Barrier extends Helper {
private int m0 = 0;
private ArrayList<ResolutionAnchor> n0 = new ArrayList<>(4);
private boolean o0 = true;
@Override // androidx.constraintlayout.solver.widgets.ConstraintWidget
public void F() {
super.F();
this.n0.clear();
}
@Override // androidx.constraintlayout.solver.widgets.ConstraintWidget
public void G() {
ResolutionAnchor d;
float f;
ResolutionAnchor resolutionAnchor;
int i = this.m0;
float f2 = Float.MAX_VALUE;
if (i != 0) {
if (i == 1) {
d = this.u.d();
} else if (i == 2) {
d = this.t.d();
} else if (i != 3) {
return;
} else {
d = this.v.d();
}
f2 = 0.0f;
} else {
d = this.s.d();
}
int size = this.n0.size();
ResolutionAnchor resolutionAnchor2 = null;
for (int i2 = 0; i2 < size; i2++) {
ResolutionAnchor resolutionAnchor3 = this.n0.get(i2);
if (resolutionAnchor3.b != 1) {
return;
}
int i3 = this.m0;
if (i3 == 0 || i3 == 2) {
f = resolutionAnchor3.g;
if (f < f2) {
resolutionAnchor = resolutionAnchor3.f;
resolutionAnchor2 = resolutionAnchor;
f2 = f;
}
} else {
f = resolutionAnchor3.g;
if (f > f2) {
resolutionAnchor = resolutionAnchor3.f;
resolutionAnchor2 = resolutionAnchor;
f2 = f;
}
}
}
if (LinearSystem.h() != null) {
LinearSystem.h().y++;
}
d.f = resolutionAnchor2;
d.g = f2;
d.a();
int i4 = this.m0;
if (i4 == 0) {
this.u.d().a(resolutionAnchor2, f2);
return;
}
if (i4 == 1) {
this.s.d().a(resolutionAnchor2, f2);
} else if (i4 == 2) {
this.v.d().a(resolutionAnchor2, f2);
} else {
if (i4 != 3) {
return;
}
this.t.d().a(resolutionAnchor2, f2);
}
}
@Override // androidx.constraintlayout.solver.widgets.ConstraintWidget
public void a(int i) {
ResolutionAnchor d;
ConstraintWidget constraintWidget = this.D;
if (constraintWidget != null && ((ConstraintWidgetContainer) constraintWidget).t(2)) {
int i2 = this.m0;
if (i2 == 0) {
d = this.s.d();
} else if (i2 == 1) {
d = this.u.d();
} else if (i2 == 2) {
d = this.t.d();
} else if (i2 != 3) {
return;
} else {
d = this.v.d();
}
d.b(5);
int i3 = this.m0;
if (i3 == 0 || i3 == 1) {
this.t.d().a((ResolutionAnchor) null, 0.0f);
this.v.d().a((ResolutionAnchor) null, 0.0f);
} else {
this.s.d().a((ResolutionAnchor) null, 0.0f);
this.u.d().a((ResolutionAnchor) null, 0.0f);
}
this.n0.clear();
for (int i4 = 0; i4 < this.l0; i4++) {
ConstraintWidget constraintWidget2 = this.k0[i4];
if (this.o0 || constraintWidget2.a()) {
int i5 = this.m0;
ResolutionAnchor d2 = i5 != 0 ? i5 != 1 ? i5 != 2 ? i5 != 3 ? null : constraintWidget2.v.d() : constraintWidget2.t.d() : constraintWidget2.u.d() : constraintWidget2.s.d();
if (d2 != null) {
this.n0.add(d2);
d2.a(d);
}
}
}
}
}
@Override // androidx.constraintlayout.solver.widgets.ConstraintWidget
public boolean a() {
return true;
}
public void c(boolean z) {
this.o0 = z;
}
public void t(int i) {
this.m0 = i;
}
@Override // androidx.constraintlayout.solver.widgets.ConstraintWidget
public void a(LinearSystem linearSystem) {
ConstraintAnchor[] constraintAnchorArr;
boolean z;
int i;
int i2;
ConstraintAnchor[] constraintAnchorArr2 = this.A;
constraintAnchorArr2[0] = this.s;
constraintAnchorArr2[2] = this.t;
constraintAnchorArr2[1] = this.u;
constraintAnchorArr2[3] = this.v;
int i3 = 0;
while (true) {
constraintAnchorArr = this.A;
if (i3 >= constraintAnchorArr.length) {
break;
}
constraintAnchorArr[i3].i = linearSystem.a(constraintAnchorArr[i3]);
i3++;
}
int i4 = this.m0;
if (i4 < 0 || i4 >= 4) {
return;
}
ConstraintAnchor constraintAnchor = constraintAnchorArr[i4];
for (int i5 = 0; i5 < this.l0; i5++) {
ConstraintWidget constraintWidget = this.k0[i5];
if ((this.o0 || constraintWidget.a()) && ((((i = this.m0) == 0 || i == 1) && constraintWidget.j() == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT) || (((i2 = this.m0) == 2 || i2 == 3) && constraintWidget.q() == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT))) {
z = true;
break;
}
}
z = false;
int i6 = this.m0;
if (i6 == 0 || i6 == 1 ? k().j() == ConstraintWidget.DimensionBehaviour.WRAP_CONTENT : k().q() == ConstraintWidget.DimensionBehaviour.WRAP_CONTENT) {
z = false;
}
for (int i7 = 0; i7 < this.l0; i7++) {
ConstraintWidget constraintWidget2 = this.k0[i7];
if (this.o0 || constraintWidget2.a()) {
SolverVariable a = linearSystem.a(constraintWidget2.A[this.m0]);
ConstraintAnchor[] constraintAnchorArr3 = constraintWidget2.A;
int i8 = this.m0;
constraintAnchorArr3[i8].i = a;
if (i8 != 0 && i8 != 2) {
linearSystem.a(constraintAnchor.i, a, z);
} else {
linearSystem.b(constraintAnchor.i, a, z);
}
}
}
int i9 = this.m0;
if (i9 == 0) {
linearSystem.a(this.u.i, this.s.i, 0, 6);
if (z) {
return;
}
linearSystem.a(this.s.i, this.D.u.i, 0, 5);
return;
}
if (i9 == 1) {
linearSystem.a(this.s.i, this.u.i, 0, 6);
if (z) {
return;
}
linearSystem.a(this.s.i, this.D.s.i, 0, 5);
return;
}
if (i9 == 2) {
linearSystem.a(this.v.i, this.t.i, 0, 6);
if (z) {
return;
}
linearSystem.a(this.t.i, this.D.v.i, 0, 5);
return;
}
if (i9 == 3) {
linearSystem.a(this.t.i, this.v.i, 0, 6);
if (z) {
return;
}
linearSystem.a(this.t.i, this.D.t.i, 0, 5);
}
}
}

View File

@@ -0,0 +1,72 @@
package androidx.constraintlayout.solver.widgets;
import androidx.constraintlayout.solver.LinearSystem;
/* loaded from: classes.dex */
class Chain {
static void a(ConstraintWidgetContainer constraintWidgetContainer, LinearSystem linearSystem, int i) {
int i2;
int i3;
ChainHead[] chainHeadArr;
if (i == 0) {
int i4 = constraintWidgetContainer.s0;
chainHeadArr = constraintWidgetContainer.v0;
i3 = i4;
i2 = 0;
} else {
i2 = 2;
i3 = constraintWidgetContainer.t0;
chainHeadArr = constraintWidgetContainer.u0;
}
for (int i5 = 0; i5 < i3; i5++) {
ChainHead chainHead = chainHeadArr[i5];
chainHead.a();
if (!constraintWidgetContainer.t(4)) {
a(constraintWidgetContainer, linearSystem, i, i2, chainHead);
} else if (!Optimizer.a(constraintWidgetContainer, linearSystem, i, i2, chainHead)) {
a(constraintWidgetContainer, linearSystem, i, i2, chainHead);
}
}
}
/* JADX WARN: Code restructure failed: missing block: B:13:0x0035, code lost:
if (r2.e0 == 2) goto L29;
*/
/* JADX WARN: Code restructure failed: missing block: B:14:0x004c, code lost:
r5 = false;
*/
/* JADX WARN: Code restructure failed: missing block: B:294:0x004a, code lost:
r5 = true;
*/
/* JADX WARN: Code restructure failed: missing block: B:304:0x0048, code lost:
if (r2.f0 == 2) goto L29;
*/
/* JADX WARN: Removed duplicated region for block: B:128:0x04ae */
/* JADX WARN: Removed duplicated region for block: B:131:0x04b7 */
/* JADX WARN: Removed duplicated region for block: B:133:0x04be */
/* JADX WARN: Removed duplicated region for block: B:139:0x04ce */
/* JADX WARN: Removed duplicated region for block: B:149:0x04ba */
/* JADX WARN: Removed duplicated region for block: B:150:0x04b1 */
/* JADX WARN: Removed duplicated region for block: B:174:0x0366 */
/* JADX WARN: Removed duplicated region for block: B:177:0x0367 A[SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:230:0x0386 */
/* JADX WARN: Removed duplicated region for block: B:283:0x0454 */
/* JADX WARN: Removed duplicated region for block: B:291:0x0489 */
/* JADX WARN: Removed duplicated region for block: B:71:0x014f */
/* JADX WARN: Removed duplicated region for block: B:83:0x0188 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
static void a(androidx.constraintlayout.solver.widgets.ConstraintWidgetContainer r36, androidx.constraintlayout.solver.LinearSystem r37, int r38, int r39, androidx.constraintlayout.solver.widgets.ChainHead r40) {
/*
Method dump skipped, instructions count: 1279
To view this dump change 'Code comments level' option to 'DEBUG'
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.constraintlayout.solver.widgets.Chain.a(androidx.constraintlayout.solver.widgets.ConstraintWidgetContainer, androidx.constraintlayout.solver.LinearSystem, int, int, androidx.constraintlayout.solver.widgets.ChainHead):void");
}
}

View File

@@ -0,0 +1,131 @@
package androidx.constraintlayout.solver.widgets;
import androidx.constraintlayout.solver.widgets.ConstraintWidget;
import java.util.ArrayList;
/* loaded from: classes.dex */
public class ChainHead {
protected ConstraintWidget a;
protected ConstraintWidget b;
protected ConstraintWidget c;
protected ConstraintWidget d;
protected ConstraintWidget e;
protected ConstraintWidget f;
protected ConstraintWidget g;
protected ArrayList<ConstraintWidget> h;
protected int i;
protected int j;
protected float k = 0.0f;
private int l;
private boolean m;
protected boolean n;
protected boolean o;
protected boolean p;
private boolean q;
public ChainHead(ConstraintWidget constraintWidget, int i, boolean z) {
this.m = false;
this.a = constraintWidget;
this.l = i;
this.m = z;
}
private static boolean a(ConstraintWidget constraintWidget, int i) {
if (constraintWidget.r() != 8 && constraintWidget.C[i] == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT) {
int[] iArr = constraintWidget.g;
if (iArr[i] == 0 || iArr[i] == 3) {
return true;
}
}
return false;
}
private void b() {
int i = this.l * 2;
boolean z = false;
ConstraintWidget constraintWidget = this.a;
ConstraintWidget constraintWidget2 = constraintWidget;
boolean z2 = false;
while (!z2) {
this.i++;
ConstraintWidget[] constraintWidgetArr = constraintWidget.i0;
int i2 = this.l;
ConstraintWidget constraintWidget3 = null;
constraintWidgetArr[i2] = null;
constraintWidget.h0[i2] = null;
if (constraintWidget.r() != 8) {
if (this.b == null) {
this.b = constraintWidget;
}
this.d = constraintWidget;
ConstraintWidget.DimensionBehaviour[] dimensionBehaviourArr = constraintWidget.C;
int i3 = this.l;
if (dimensionBehaviourArr[i3] == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT) {
int[] iArr = constraintWidget.g;
if (iArr[i3] == 0 || iArr[i3] == 3 || iArr[i3] == 2) {
this.j++;
float[] fArr = constraintWidget.g0;
int i4 = this.l;
float f = fArr[i4];
if (f > 0.0f) {
this.k += fArr[i4];
}
if (a(constraintWidget, this.l)) {
if (f < 0.0f) {
this.n = true;
} else {
this.o = true;
}
if (this.h == null) {
this.h = new ArrayList<>();
}
this.h.add(constraintWidget);
}
if (this.f == null) {
this.f = constraintWidget;
}
ConstraintWidget constraintWidget4 = this.g;
if (constraintWidget4 != null) {
constraintWidget4.h0[this.l] = constraintWidget;
}
this.g = constraintWidget;
}
}
}
if (constraintWidget2 != constraintWidget) {
constraintWidget2.i0[this.l] = constraintWidget;
}
ConstraintAnchor constraintAnchor = constraintWidget.A[i + 1].d;
if (constraintAnchor != null) {
ConstraintWidget constraintWidget5 = constraintAnchor.b;
ConstraintAnchor[] constraintAnchorArr = constraintWidget5.A;
if (constraintAnchorArr[i].d != null && constraintAnchorArr[i].d.b == constraintWidget) {
constraintWidget3 = constraintWidget5;
}
}
if (constraintWidget3 == null) {
constraintWidget3 = constraintWidget;
z2 = true;
}
constraintWidget2 = constraintWidget;
constraintWidget = constraintWidget3;
}
this.c = constraintWidget;
if (this.l == 0 && this.m) {
this.e = this.c;
} else {
this.e = this.a;
}
if (this.o && this.n) {
z = true;
}
this.p = z;
}
public void a() {
if (!this.q) {
b();
}
this.q = true;
}
}

View File

@@ -0,0 +1,212 @@
package androidx.constraintlayout.solver.widgets;
import androidx.constraintlayout.solver.Cache;
import androidx.constraintlayout.solver.SolverVariable;
/* loaded from: classes.dex */
public class ConstraintAnchor {
final ConstraintWidget b;
final Type c;
ConstraintAnchor d;
private int h;
SolverVariable i;
private ResolutionAnchor a = new ResolutionAnchor(this);
public int e = 0;
int f = -1;
private Strength g = Strength.NONE;
/* renamed from: androidx.constraintlayout.solver.widgets.ConstraintAnchor$1, reason: invalid class name */
static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] a = new int[Type.values().length];
static {
try {
a[Type.CENTER.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
a[Type.LEFT.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
a[Type.RIGHT.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
a[Type.TOP.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
a[Type.BOTTOM.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
a[Type.BASELINE.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
a[Type.CENTER_X.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
try {
a[Type.CENTER_Y.ordinal()] = 8;
} catch (NoSuchFieldError unused8) {
}
try {
a[Type.NONE.ordinal()] = 9;
} catch (NoSuchFieldError unused9) {
}
}
}
public enum ConnectionType {
RELAXED,
STRICT
}
public enum Strength {
NONE,
STRONG,
WEAK
}
public enum Type {
NONE,
LEFT,
TOP,
RIGHT,
BOTTOM,
BASELINE,
CENTER,
CENTER_X,
CENTER_Y
}
public ConstraintAnchor(ConstraintWidget constraintWidget, Type type) {
ConnectionType connectionType = ConnectionType.RELAXED;
this.h = 0;
this.b = constraintWidget;
this.c = type;
}
public void a(Cache cache) {
SolverVariable solverVariable = this.i;
if (solverVariable == null) {
this.i = new SolverVariable(SolverVariable.Type.UNRESTRICTED, null);
} else {
solverVariable.a();
}
}
public int b() {
ConstraintAnchor constraintAnchor;
if (this.b.r() == 8) {
return 0;
}
return (this.f <= -1 || (constraintAnchor = this.d) == null || constraintAnchor.b.r() != 8) ? this.e : this.f;
}
public ConstraintWidget c() {
return this.b;
}
public ResolutionAnchor d() {
return this.a;
}
public SolverVariable e() {
return this.i;
}
public Strength f() {
return this.g;
}
public ConstraintAnchor g() {
return this.d;
}
public Type h() {
return this.c;
}
public boolean i() {
return this.d != null;
}
public void j() {
this.d = null;
this.e = 0;
this.f = -1;
this.g = Strength.STRONG;
this.h = 0;
ConnectionType connectionType = ConnectionType.RELAXED;
this.a.d();
}
public String toString() {
return this.b.f() + ":" + this.c.toString();
}
public int a() {
return this.h;
}
public boolean a(ConstraintAnchor constraintAnchor, int i, Strength strength, int i2) {
return a(constraintAnchor, i, -1, strength, i2, false);
}
public boolean a(ConstraintAnchor constraintAnchor, int i, int i2, Strength strength, int i3, boolean z) {
if (constraintAnchor == null) {
this.d = null;
this.e = 0;
this.f = -1;
this.g = Strength.NONE;
this.h = 2;
return true;
}
if (!z && !a(constraintAnchor)) {
return false;
}
this.d = constraintAnchor;
if (i > 0) {
this.e = i;
} else {
this.e = 0;
}
this.f = i2;
this.g = strength;
this.h = i3;
return true;
}
public boolean a(ConstraintAnchor constraintAnchor) {
if (constraintAnchor == null) {
return false;
}
Type h = constraintAnchor.h();
Type type = this.c;
if (h == type) {
return type != Type.BASELINE || (constraintAnchor.c().x() && c().x());
}
switch (AnonymousClass1.a[type.ordinal()]) {
case 1:
return (h == Type.BASELINE || h == Type.CENTER_X || h == Type.CENTER_Y) ? false : true;
case 2:
case 3:
boolean z = h == Type.LEFT || h == Type.RIGHT;
return constraintAnchor.c() instanceof Guideline ? z || h == Type.CENTER_X : z;
case 4:
case 5:
boolean z2 = h == Type.TOP || h == Type.BOTTOM;
return constraintAnchor.c() instanceof Guideline ? z2 || h == Type.CENTER_Y : z2;
case 6:
case 7:
case 8:
case 9:
return false;
default:
throw new AssertionError(this.c.name());
}
}
}

View File

@@ -0,0 +1,13 @@
package androidx.constraintlayout.solver.widgets;
/* loaded from: classes.dex */
public enum ConstraintHorizontalLayout$ContentAlignment {
BEGIN,
MIDDLE,
END,
TOP,
VERTICAL_MIDDLE,
BOTTOM,
LEFT,
RIGHT
}

View File

@@ -0,0 +1,972 @@
package androidx.constraintlayout.solver.widgets;
import androidx.constraintlayout.solver.Cache;
import androidx.constraintlayout.solver.LinearSystem;
import androidx.constraintlayout.solver.widgets.ConstraintAnchor;
import java.util.ArrayList;
/* loaded from: classes.dex */
public class ConstraintWidget {
public static float j0 = 0.5f;
protected DimensionBehaviour[] C;
ConstraintWidget D;
int E;
int F;
protected float G;
protected int H;
protected int I;
protected int J;
int K;
int L;
private int M;
private int N;
protected int O;
protected int P;
int Q;
protected int R;
protected int S;
private int T;
private int U;
float V;
float W;
private Object X;
private int Y;
private String Z;
private String a0;
boolean b0;
ResolutionDimension c;
boolean c0;
ResolutionDimension d;
boolean d0;
int e0;
int f0;
float[] g0;
protected ConstraintWidget[] h0;
protected ConstraintWidget[] i0;
public int a = -1;
public int b = -1;
int e = 0;
int f = 0;
int[] g = new int[2];
int h = 0;
int i = 0;
float j = 1.0f;
int k = 0;
int l = 0;
float m = 1.0f;
int n = -1;
float o = 1.0f;
ConstraintWidgetGroup p = null;
private int[] q = {Integer.MAX_VALUE, Integer.MAX_VALUE};
private float r = 0.0f;
ConstraintAnchor s = new ConstraintAnchor(this, ConstraintAnchor.Type.LEFT);
ConstraintAnchor t = new ConstraintAnchor(this, ConstraintAnchor.Type.TOP);
ConstraintAnchor u = new ConstraintAnchor(this, ConstraintAnchor.Type.RIGHT);
ConstraintAnchor v = new ConstraintAnchor(this, ConstraintAnchor.Type.BOTTOM);
ConstraintAnchor w = new ConstraintAnchor(this, ConstraintAnchor.Type.BASELINE);
ConstraintAnchor x = new ConstraintAnchor(this, ConstraintAnchor.Type.CENTER_X);
ConstraintAnchor y = new ConstraintAnchor(this, ConstraintAnchor.Type.CENTER_Y);
ConstraintAnchor z = new ConstraintAnchor(this, ConstraintAnchor.Type.CENTER);
protected ConstraintAnchor[] A = {this.s, this.u, this.t, this.v, this.w, this.z};
protected ArrayList<ConstraintAnchor> B = new ArrayList<>();
/* renamed from: androidx.constraintlayout.solver.widgets.ConstraintWidget$1, reason: invalid class name */
static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] a;
static final /* synthetic */ int[] b = new int[DimensionBehaviour.values().length];
static {
try {
b[DimensionBehaviour.FIXED.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
b[DimensionBehaviour.WRAP_CONTENT.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
b[DimensionBehaviour.MATCH_PARENT.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
b[DimensionBehaviour.MATCH_CONSTRAINT.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
a = new int[ConstraintAnchor.Type.values().length];
try {
a[ConstraintAnchor.Type.LEFT.ordinal()] = 1;
} catch (NoSuchFieldError unused5) {
}
try {
a[ConstraintAnchor.Type.TOP.ordinal()] = 2;
} catch (NoSuchFieldError unused6) {
}
try {
a[ConstraintAnchor.Type.RIGHT.ordinal()] = 3;
} catch (NoSuchFieldError unused7) {
}
try {
a[ConstraintAnchor.Type.BOTTOM.ordinal()] = 4;
} catch (NoSuchFieldError unused8) {
}
try {
a[ConstraintAnchor.Type.BASELINE.ordinal()] = 5;
} catch (NoSuchFieldError unused9) {
}
try {
a[ConstraintAnchor.Type.CENTER.ordinal()] = 6;
} catch (NoSuchFieldError unused10) {
}
try {
a[ConstraintAnchor.Type.CENTER_X.ordinal()] = 7;
} catch (NoSuchFieldError unused11) {
}
try {
a[ConstraintAnchor.Type.CENTER_Y.ordinal()] = 8;
} catch (NoSuchFieldError unused12) {
}
try {
a[ConstraintAnchor.Type.NONE.ordinal()] = 9;
} catch (NoSuchFieldError unused13) {
}
}
}
public enum ContentAlignment {
BEGIN,
MIDDLE,
END,
TOP,
VERTICAL_MIDDLE,
BOTTOM,
LEFT,
RIGHT
}
public enum DimensionBehaviour {
FIXED,
WRAP_CONTENT,
MATCH_CONSTRAINT,
MATCH_PARENT
}
public ConstraintWidget() {
DimensionBehaviour dimensionBehaviour = DimensionBehaviour.FIXED;
this.C = new DimensionBehaviour[]{dimensionBehaviour, dimensionBehaviour};
this.D = null;
this.E = 0;
this.F = 0;
this.G = 0.0f;
this.H = -1;
this.I = 0;
this.J = 0;
this.K = 0;
this.L = 0;
this.M = 0;
this.N = 0;
this.O = 0;
this.P = 0;
this.Q = 0;
float f = j0;
this.V = f;
this.W = f;
this.Y = 0;
this.Z = null;
this.a0 = null;
this.b0 = false;
this.c0 = false;
this.d0 = false;
this.e0 = 0;
this.f0 = 0;
this.g0 = new float[]{-1.0f, -1.0f};
this.h0 = new ConstraintWidget[]{null, null};
this.i0 = new ConstraintWidget[]{null, null};
J();
}
private void J() {
this.B.add(this.s);
this.B.add(this.t);
this.B.add(this.u);
this.B.add(this.v);
this.B.add(this.x);
this.B.add(this.y);
this.B.add(this.z);
this.B.add(this.w);
}
public boolean A() {
ConstraintAnchor constraintAnchor = this.t;
ConstraintAnchor constraintAnchor2 = constraintAnchor.d;
if (constraintAnchor2 != null && constraintAnchor2.d == constraintAnchor) {
return true;
}
ConstraintAnchor constraintAnchor3 = this.v;
ConstraintAnchor constraintAnchor4 = constraintAnchor3.d;
return constraintAnchor4 != null && constraintAnchor4.d == constraintAnchor3;
}
public boolean B() {
return this.f == 0 && this.G == 0.0f && this.k == 0 && this.l == 0 && this.C[1] == DimensionBehaviour.MATCH_CONSTRAINT;
}
public boolean C() {
return this.e == 0 && this.G == 0.0f && this.h == 0 && this.i == 0 && this.C[0] == DimensionBehaviour.MATCH_CONSTRAINT;
}
public void D() {
this.s.j();
this.t.j();
this.u.j();
this.v.j();
this.w.j();
this.x.j();
this.y.j();
this.z.j();
this.D = null;
this.r = 0.0f;
this.E = 0;
this.F = 0;
this.G = 0.0f;
this.H = -1;
this.I = 0;
this.J = 0;
this.M = 0;
this.N = 0;
this.O = 0;
this.P = 0;
this.Q = 0;
this.R = 0;
this.S = 0;
this.T = 0;
this.U = 0;
float f = j0;
this.V = f;
this.W = f;
DimensionBehaviour[] dimensionBehaviourArr = this.C;
DimensionBehaviour dimensionBehaviour = DimensionBehaviour.FIXED;
dimensionBehaviourArr[0] = dimensionBehaviour;
dimensionBehaviourArr[1] = dimensionBehaviour;
this.X = null;
this.Y = 0;
this.a0 = null;
this.e0 = 0;
this.f0 = 0;
float[] fArr = this.g0;
fArr[0] = -1.0f;
fArr[1] = -1.0f;
this.a = -1;
this.b = -1;
int[] iArr = this.q;
iArr[0] = Integer.MAX_VALUE;
iArr[1] = Integer.MAX_VALUE;
this.e = 0;
this.f = 0;
this.j = 1.0f;
this.m = 1.0f;
this.i = Integer.MAX_VALUE;
this.l = Integer.MAX_VALUE;
this.h = 0;
this.k = 0;
this.n = -1;
this.o = 1.0f;
ResolutionDimension resolutionDimension = this.c;
if (resolutionDimension != null) {
resolutionDimension.d();
}
ResolutionDimension resolutionDimension2 = this.d;
if (resolutionDimension2 != null) {
resolutionDimension2.d();
}
this.p = null;
this.b0 = false;
this.c0 = false;
this.d0 = false;
}
public void E() {
ConstraintWidget k = k();
if (k != null && (k instanceof ConstraintWidgetContainer) && ((ConstraintWidgetContainer) k()).N()) {
return;
}
int size = this.B.size();
for (int i = 0; i < size; i++) {
this.B.get(i).j();
}
}
public void F() {
for (int i = 0; i < 6; i++) {
this.A[i].d().d();
}
}
public void G() {
}
public void H() {
int i = this.I;
int i2 = this.J;
this.M = i;
this.N = i2;
}
public void I() {
for (int i = 0; i < 6; i++) {
this.A[i].d().g();
}
}
public void a(int i) {
Optimizer.a(i, this);
}
public void a(boolean z) {
}
public void b(LinearSystem linearSystem) {
linearSystem.a(this.s);
linearSystem.a(this.t);
linearSystem.a(this.u);
linearSystem.a(this.v);
if (this.Q > 0) {
linearSystem.a(this.w);
}
}
public void b(boolean z) {
}
public int c() {
return this.Q;
}
public int d(int i) {
if (i == 0) {
return s();
}
if (i == 1) {
return i();
}
return 0;
}
public Object e() {
return this.X;
}
public String f() {
return this.Z;
}
public int g() {
return this.M + this.O;
}
public int h() {
return this.N + this.P;
}
public void i(int i) {
this.q[1] = i;
}
public void j(int i) {
this.q[0] = i;
}
public ConstraintWidget k() {
return this.D;
}
public ResolutionDimension l() {
if (this.d == null) {
this.d = new ResolutionDimension();
}
return this.d;
}
public ResolutionDimension m() {
if (this.c == null) {
this.c = new ResolutionDimension();
}
return this.c;
}
public void n(int i) {
this.Y = i;
}
protected int o() {
return this.I + this.O;
}
protected int p() {
return this.J + this.P;
}
public void q(int i) {
this.T = i;
}
public int r() {
return this.Y;
}
public int s() {
if (this.Y == 8) {
return 0;
}
return this.E;
}
public int t() {
return this.U;
}
public String toString() {
String str;
StringBuilder sb = new StringBuilder();
String str2 = "";
if (this.a0 != null) {
str = "type: " + this.a0 + " ";
} else {
str = "";
}
sb.append(str);
if (this.Z != null) {
str2 = "id: " + this.Z + " ";
}
sb.append(str2);
sb.append("(");
sb.append(this.I);
sb.append(", ");
sb.append(this.J);
sb.append(") - (");
sb.append(this.E);
sb.append(" x ");
sb.append(this.F);
sb.append(") wrap: (");
sb.append(this.T);
sb.append(" x ");
sb.append(this.U);
sb.append(")");
return sb.toString();
}
public int u() {
return this.T;
}
public int v() {
return this.I;
}
public int w() {
return this.J;
}
public boolean x() {
return this.Q > 0;
}
public boolean y() {
return this.s.d().b == 1 && this.u.d().b == 1 && this.t.d().b == 1 && this.v.d().b == 1;
}
public boolean z() {
ConstraintAnchor constraintAnchor = this.s;
ConstraintAnchor constraintAnchor2 = constraintAnchor.d;
if (constraintAnchor2 != null && constraintAnchor2.d == constraintAnchor) {
return true;
}
ConstraintAnchor constraintAnchor3 = this.u;
ConstraintAnchor constraintAnchor4 = constraintAnchor3.d;
return constraintAnchor4 != null && constraintAnchor4.d == constraintAnchor3;
}
private boolean t(int i) {
int i2 = i * 2;
ConstraintAnchor[] constraintAnchorArr = this.A;
if (constraintAnchorArr[i2].d != null && constraintAnchorArr[i2].d.d != constraintAnchorArr[i2]) {
int i3 = i2 + 1;
if (constraintAnchorArr[i3].d != null && constraintAnchorArr[i3].d.d == constraintAnchorArr[i3]) {
return true;
}
}
return false;
}
public void a(Cache cache) {
this.s.a(cache);
this.t.a(cache);
this.u.a(cache);
this.v.a(cache);
this.w.a(cache);
this.z.a(cache);
this.x.a(cache);
this.y.a(cache);
}
public void c(int i, int i2) {
this.I = i;
this.J = i2;
}
public void e(int i, int i2) {
this.J = i;
this.F = i2 - i;
int i3 = this.F;
int i4 = this.S;
if (i3 < i4) {
this.F = i4;
}
}
public void f(int i) {
this.Q = i;
}
public void g(int i) {
this.F = i;
int i2 = this.F;
int i3 = this.S;
if (i2 < i3) {
this.F = i3;
}
}
public void h(int i) {
this.e0 = i;
}
public int i() {
if (this.Y == 8) {
return 0;
}
return this.F;
}
public DimensionBehaviour j() {
return this.C[0];
}
public void k(int i) {
if (i < 0) {
this.S = 0;
} else {
this.S = i;
}
}
public int n() {
return v() + this.E;
}
public void o(int i) {
this.E = i;
int i2 = this.E;
int i3 = this.R;
if (i2 < i3) {
this.E = i3;
}
}
public void p(int i) {
this.U = i;
}
public DimensionBehaviour q() {
return this.C[1];
}
public void r(int i) {
this.I = i;
}
public int d() {
return w() + this.F;
}
public void s(int i) {
this.J = i;
}
public void c(float f) {
this.W = f;
}
void d(int i, int i2) {
if (i2 == 0) {
this.K = i;
} else if (i2 == 1) {
this.L = i;
}
}
public void l(int i) {
if (i < 0) {
this.R = 0;
} else {
this.R = i;
}
}
public void m(int i) {
this.f0 = i;
}
public DimensionBehaviour c(int i) {
if (i == 0) {
return j();
}
if (i == 1) {
return q();
}
return null;
}
public void d(float f) {
this.g0[1] = f;
}
int e(int i) {
if (i == 0) {
return this.K;
}
if (i == 1) {
return this.L;
}
return 0;
}
public float b(int i) {
if (i == 0) {
return this.V;
}
if (i == 1) {
return this.W;
}
return -1.0f;
}
public void c(LinearSystem linearSystem) {
int b = linearSystem.b(this.s);
int b2 = linearSystem.b(this.t);
int b3 = linearSystem.b(this.u);
int b4 = linearSystem.b(this.v);
int i = b4 - b2;
if (b3 - b < 0 || i < 0 || b == Integer.MIN_VALUE || b == Integer.MAX_VALUE || b2 == Integer.MIN_VALUE || b2 == Integer.MAX_VALUE || b3 == Integer.MIN_VALUE || b3 == Integer.MAX_VALUE || b4 == Integer.MIN_VALUE || b4 == Integer.MAX_VALUE) {
b4 = 0;
b = 0;
b2 = 0;
b3 = 0;
}
a(b, b2, b3, b4);
}
public ArrayList<ConstraintAnchor> b() {
return this.B;
}
public void a(ConstraintWidget constraintWidget) {
this.D = constraintWidget;
}
public void b(int i, int i2) {
this.O = i;
this.P = i2;
}
public void a(ConstraintWidget constraintWidget, float f, int i) {
ConstraintAnchor.Type type = ConstraintAnchor.Type.CENTER;
a(type, constraintWidget, type, i, 0);
this.r = f;
}
public void b(int i, int i2, int i3, float f) {
this.f = i;
this.k = i2;
this.l = i3;
this.m = f;
if (f >= 1.0f || this.f != 0) {
return;
}
this.f = 2;
}
public void a(String str) {
this.Z = str;
}
public void a(int i, int i2, int i3, float f) {
this.e = i;
this.h = i2;
this.i = i3;
this.j = f;
if (f >= 1.0f || this.e != 0) {
return;
}
this.e = 2;
}
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:38:0x0084 -> B:31:0x0085). Please report as a decompilation issue!!! */
public void b(String str) {
float f;
int i = 0;
if (str != null && str.length() != 0) {
int i2 = -1;
int length = str.length();
int indexOf = str.indexOf(44);
int i3 = 0;
if (indexOf > 0 && indexOf < length - 1) {
String substring = str.substring(0, indexOf);
if (substring.equalsIgnoreCase("W")) {
i2 = 0;
} else if (substring.equalsIgnoreCase("H")) {
i2 = 1;
}
i3 = indexOf + 1;
}
int indexOf2 = str.indexOf(58);
if (indexOf2 >= 0 && indexOf2 < length - 1) {
String substring2 = str.substring(i3, indexOf2);
String substring3 = str.substring(indexOf2 + 1);
if (substring2.length() > 0 && substring3.length() > 0) {
float parseFloat = Float.parseFloat(substring2);
float parseFloat2 = Float.parseFloat(substring3);
if (parseFloat > 0.0f && parseFloat2 > 0.0f) {
if (i2 == 1) {
f = Math.abs(parseFloat2 / parseFloat);
} else {
f = Math.abs(parseFloat / parseFloat2);
}
}
}
f = 0.0f;
} else {
String substring4 = str.substring(i3);
if (substring4.length() > 0) {
f = Float.parseFloat(substring4);
}
f = 0.0f;
}
i = (f > i ? 1 : (f == i ? 0 : -1));
if (i > 0) {
this.G = f;
this.H = i2;
return;
}
return;
}
this.G = 0.0f;
}
public void a(float f) {
this.V = f;
}
public void a(int i, int i2, int i3, int i4) {
int i5;
int i6;
int i7 = i3 - i;
int i8 = i4 - i2;
this.I = i;
this.J = i2;
if (this.Y == 8) {
this.E = 0;
this.F = 0;
return;
}
if (this.C[0] != DimensionBehaviour.FIXED || i7 >= (i5 = this.E)) {
i5 = i7;
}
if (this.C[1] != DimensionBehaviour.FIXED || i8 >= (i6 = this.F)) {
i6 = i8;
}
this.E = i5;
this.F = i6;
int i9 = this.F;
int i10 = this.S;
if (i9 < i10) {
this.F = i10;
}
int i11 = this.E;
int i12 = this.R;
if (i11 < i12) {
this.E = i12;
}
this.c0 = true;
}
public void a(int i, int i2, int i3) {
if (i3 == 0) {
a(i, i2);
} else if (i3 == 1) {
e(i, i2);
}
this.c0 = true;
}
public void a(int i, int i2) {
this.I = i;
this.E = i2 - i;
int i3 = this.E;
int i4 = this.R;
if (i3 < i4) {
this.E = i4;
}
}
public void b(float f) {
this.g0[0] = f;
}
public void b(DimensionBehaviour dimensionBehaviour) {
this.C[1] = dimensionBehaviour;
if (dimensionBehaviour == DimensionBehaviour.WRAP_CONTENT) {
g(this.U);
}
}
public void a(Object obj) {
this.X = obj;
}
public boolean a() {
return this.Y != 8;
}
public void a(ConstraintAnchor.Type type, ConstraintWidget constraintWidget, ConstraintAnchor.Type type2, int i, int i2) {
a(type).a(constraintWidget.a(type2), i, i2, ConstraintAnchor.Strength.STRONG, 0, true);
}
public ConstraintAnchor a(ConstraintAnchor.Type type) {
switch (AnonymousClass1.a[type.ordinal()]) {
case 1:
return this.s;
case 2:
return this.t;
case 3:
return this.u;
case 4:
return this.v;
case 5:
return this.w;
case 6:
return this.z;
case 7:
return this.x;
case 8:
return this.y;
case 9:
return null;
default:
throw new AssertionError(type.name());
}
}
public void a(DimensionBehaviour dimensionBehaviour) {
this.C[0] = dimensionBehaviour;
if (dimensionBehaviour == DimensionBehaviour.WRAP_CONTENT) {
o(this.T);
}
}
/* JADX WARN: Removed duplicated region for block: B:116:0x02aa */
/* JADX WARN: Removed duplicated region for block: B:119:0x02b9 */
/* JADX WARN: Removed duplicated region for block: B:122:0x02f8 */
/* JADX WARN: Removed duplicated region for block: B:127:0x032b */
/* JADX WARN: Removed duplicated region for block: B:129:? A[RETURN, SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:131:0x0321 */
/* JADX WARN: Removed duplicated region for block: B:132:0x02c1 */
/* JADX WARN: Removed duplicated region for block: B:133:0x02b3 */
/* JADX WARN: Removed duplicated region for block: B:142:0x0237 */
/* JADX WARN: Removed duplicated region for block: B:145:0x01ab A[ADDED_TO_REGION] */
/* JADX WARN: Removed duplicated region for block: B:74:0x01a1 */
/* JADX WARN: Removed duplicated region for block: B:80:0x01b7 */
/* JADX WARN: Removed duplicated region for block: B:85:0x01d0 */
/* JADX WARN: Removed duplicated region for block: B:94:0x0248 A[RETURN] */
/* JADX WARN: Removed duplicated region for block: B:96:0x0249 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
public void a(androidx.constraintlayout.solver.LinearSystem r39) {
/*
Method dump skipped, instructions count: 844
To view this dump change 'Code comments level' option to 'DEBUG'
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.constraintlayout.solver.widgets.ConstraintWidget.a(androidx.constraintlayout.solver.LinearSystem):void");
}
public void a(boolean z, boolean z2, boolean z3, boolean z4) {
if (this.n == -1) {
if (z3 && !z4) {
this.n = 0;
} else if (!z3 && z4) {
this.n = 1;
if (this.H == -1) {
this.o = 1.0f / this.o;
}
}
}
if (this.n == 0 && (!this.t.i() || !this.v.i())) {
this.n = 1;
} else if (this.n == 1 && (!this.s.i() || !this.u.i())) {
this.n = 0;
}
if (this.n == -1 && (!this.t.i() || !this.v.i() || !this.s.i() || !this.u.i())) {
if (this.t.i() && this.v.i()) {
this.n = 0;
} else if (this.s.i() && this.u.i()) {
this.o = 1.0f / this.o;
this.n = 1;
}
}
if (this.n == -1) {
if (z && !z2) {
this.n = 0;
} else if (!z && z2) {
this.o = 1.0f / this.o;
this.n = 1;
}
}
if (this.n == -1) {
if (this.h > 0 && this.k == 0) {
this.n = 0;
} else if (this.h == 0 && this.k > 0) {
this.o = 1.0f / this.o;
this.n = 1;
}
}
if (this.n == -1 && z && z2) {
this.o = 1.0f / this.o;
this.n = 1;
}
}
/* JADX WARN: Removed duplicated region for block: B:102:0x02a2 */
/* JADX WARN: Removed duplicated region for block: B:107:0x02f4 */
/* JADX WARN: Removed duplicated region for block: B:109:0x02f8 A[ADDED_TO_REGION] */
/* JADX WARN: Removed duplicated region for block: B:112:0x0305 A[ADDED_TO_REGION] */
/* JADX WARN: Removed duplicated region for block: B:115:0x0313 */
/* JADX WARN: Removed duplicated region for block: B:116:0x031c */
/* JADX WARN: Removed duplicated region for block: B:124:0x02e5 */
/* JADX WARN: Removed duplicated region for block: B:151:0x0107 */
/* JADX WARN: Removed duplicated region for block: B:168:0x01d8 A[ADDED_TO_REGION] */
/* JADX WARN: Removed duplicated region for block: B:51:0x00dd */
/* JADX WARN: Removed duplicated region for block: B:71:0x0323 */
/* JADX WARN: Removed duplicated region for block: B:73:? A[RETURN, SYNTHETIC] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
private void a(androidx.constraintlayout.solver.LinearSystem r26, boolean r27, androidx.constraintlayout.solver.SolverVariable r28, androidx.constraintlayout.solver.SolverVariable r29, androidx.constraintlayout.solver.widgets.ConstraintWidget.DimensionBehaviour r30, boolean r31, androidx.constraintlayout.solver.widgets.ConstraintAnchor r32, androidx.constraintlayout.solver.widgets.ConstraintAnchor r33, int r34, int r35, int r36, int r37, float r38, boolean r39, boolean r40, int r41, int r42, int r43, float r44, boolean r45) {
/*
Method dump skipped, instructions count: 827
To view this dump change 'Code comments level' option to 'DEBUG'
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.constraintlayout.solver.widgets.ConstraintWidget.a(androidx.constraintlayout.solver.LinearSystem, boolean, androidx.constraintlayout.solver.SolverVariable, androidx.constraintlayout.solver.SolverVariable, androidx.constraintlayout.solver.widgets.ConstraintWidget$DimensionBehaviour, boolean, androidx.constraintlayout.solver.widgets.ConstraintAnchor, androidx.constraintlayout.solver.widgets.ConstraintAnchor, int, int, int, int, float, boolean, boolean, int, int, int, float, boolean):void");
}
}

View File

@@ -0,0 +1,233 @@
package androidx.constraintlayout.solver.widgets;
import androidx.constraintlayout.solver.LinearSystem;
import androidx.constraintlayout.solver.widgets.ConstraintAnchor;
import androidx.constraintlayout.solver.widgets.ConstraintWidget;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/* loaded from: classes.dex */
public class ConstraintWidgetContainer extends WidgetContainer {
private Snapshot n0;
int o0;
int p0;
int q0;
int r0;
private boolean l0 = false;
protected LinearSystem m0 = new LinearSystem();
int s0 = 0;
int t0 = 0;
ChainHead[] u0 = new ChainHead[4];
ChainHead[] v0 = new ChainHead[4];
public List<ConstraintWidgetGroup> w0 = new ArrayList();
public boolean x0 = false;
public boolean y0 = false;
public boolean z0 = false;
public int A0 = 0;
public int B0 = 0;
private int C0 = 7;
public boolean D0 = false;
private boolean E0 = false;
private boolean F0 = false;
private void V() {
this.s0 = 0;
this.t0 = 0;
}
private void e(ConstraintWidget constraintWidget) {
int i = this.t0 + 1;
ChainHead[] chainHeadArr = this.u0;
if (i >= chainHeadArr.length) {
this.u0 = (ChainHead[]) Arrays.copyOf(chainHeadArr, chainHeadArr.length * 2);
}
this.u0[this.t0] = new ChainHead(constraintWidget, 1, P());
this.t0++;
}
@Override // androidx.constraintlayout.solver.widgets.WidgetContainer, androidx.constraintlayout.solver.widgets.ConstraintWidget
public void D() {
this.m0.f();
this.o0 = 0;
this.q0 = 0;
this.p0 = 0;
this.r0 = 0;
this.w0.clear();
this.D0 = false;
super.D();
}
/* JADX WARN: Removed duplicated region for block: B:110:0x0290 */
/* JADX WARN: Removed duplicated region for block: B:114:0x018f */
/* JADX WARN: Removed duplicated region for block: B:66:0x0186 */
/* JADX WARN: Removed duplicated region for block: B:69:0x01da */
/* JADX WARN: Removed duplicated region for block: B:89:0x0267 */
/* JADX WARN: Removed duplicated region for block: B:92:0x0283 */
/* JADX WARN: Removed duplicated region for block: B:94:0x0293 */
/* JADX WARN: Type inference failed for: r8v20 */
/* JADX WARN: Type inference failed for: r8v21, types: [boolean] */
/* JADX WARN: Type inference failed for: r8v22 */
@Override // androidx.constraintlayout.solver.widgets.WidgetContainer
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
public void K() {
/*
Method dump skipped, instructions count: 839
To view this dump change 'Code comments level' option to 'DEBUG'
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.constraintlayout.solver.widgets.ConstraintWidgetContainer.K():void");
}
public int M() {
return this.C0;
}
public boolean N() {
return false;
}
public boolean O() {
return this.F0;
}
public boolean P() {
return this.l0;
}
public boolean Q() {
return this.E0;
}
public void R() {
if (!t(8)) {
a(this.C0);
}
U();
}
public void S() {
int size = this.k0.size();
F();
for (int i = 0; i < size; i++) {
this.k0.get(i).F();
}
}
public void T() {
S();
a(this.C0);
}
public void U() {
ResolutionAnchor d = a(ConstraintAnchor.Type.LEFT).d();
ResolutionAnchor d2 = a(ConstraintAnchor.Type.TOP).d();
d.a((ResolutionAnchor) null, 0.0f);
d2.a((ResolutionAnchor) null, 0.0f);
}
public void a(LinearSystem linearSystem, boolean[] zArr) {
zArr[2] = false;
c(linearSystem);
int size = this.k0.size();
for (int i = 0; i < size; i++) {
ConstraintWidget constraintWidget = this.k0.get(i);
constraintWidget.c(linearSystem);
if (constraintWidget.C[0] == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT && constraintWidget.s() < constraintWidget.u()) {
zArr[2] = true;
}
if (constraintWidget.C[1] == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT && constraintWidget.i() < constraintWidget.t()) {
zArr[2] = true;
}
}
}
public void c(boolean z) {
this.l0 = z;
}
public boolean d(LinearSystem linearSystem) {
a(linearSystem);
int size = this.k0.size();
for (int i = 0; i < size; i++) {
ConstraintWidget constraintWidget = this.k0.get(i);
if (constraintWidget instanceof ConstraintWidgetContainer) {
ConstraintWidget.DimensionBehaviour[] dimensionBehaviourArr = constraintWidget.C;
ConstraintWidget.DimensionBehaviour dimensionBehaviour = dimensionBehaviourArr[0];
ConstraintWidget.DimensionBehaviour dimensionBehaviour2 = dimensionBehaviourArr[1];
if (dimensionBehaviour == ConstraintWidget.DimensionBehaviour.WRAP_CONTENT) {
constraintWidget.a(ConstraintWidget.DimensionBehaviour.FIXED);
}
if (dimensionBehaviour2 == ConstraintWidget.DimensionBehaviour.WRAP_CONTENT) {
constraintWidget.b(ConstraintWidget.DimensionBehaviour.FIXED);
}
constraintWidget.a(linearSystem);
if (dimensionBehaviour == ConstraintWidget.DimensionBehaviour.WRAP_CONTENT) {
constraintWidget.a(dimensionBehaviour);
}
if (dimensionBehaviour2 == ConstraintWidget.DimensionBehaviour.WRAP_CONTENT) {
constraintWidget.b(dimensionBehaviour2);
}
} else {
Optimizer.a(this, linearSystem, constraintWidget);
constraintWidget.a(linearSystem);
}
}
if (this.s0 > 0) {
Chain.a(this, linearSystem, 0);
}
if (this.t0 > 0) {
Chain.a(this, linearSystem, 1);
}
return true;
}
public void f(int i, int i2) {
ResolutionDimension resolutionDimension;
ResolutionDimension resolutionDimension2;
if (this.C[0] != ConstraintWidget.DimensionBehaviour.WRAP_CONTENT && (resolutionDimension2 = this.c) != null) {
resolutionDimension2.a(i);
}
if (this.C[1] == ConstraintWidget.DimensionBehaviour.WRAP_CONTENT || (resolutionDimension = this.d) == null) {
return;
}
resolutionDimension.a(i2);
}
public boolean t(int i) {
return (this.C0 & i) == i;
}
public void u(int i) {
this.C0 = i;
}
@Override // androidx.constraintlayout.solver.widgets.ConstraintWidget
public void a(int i) {
super.a(i);
int size = this.k0.size();
for (int i2 = 0; i2 < size; i2++) {
this.k0.get(i2).a(i);
}
}
void a(ConstraintWidget constraintWidget, int i) {
if (i == 0) {
d(constraintWidget);
} else if (i == 1) {
e(constraintWidget);
}
}
private void d(ConstraintWidget constraintWidget) {
int i = this.s0 + 1;
ChainHead[] chainHeadArr = this.v0;
if (i >= chainHeadArr.length) {
this.v0 = (ChainHead[]) Arrays.copyOf(chainHeadArr, chainHeadArr.length * 2);
}
this.v0[this.s0] = new ChainHead(constraintWidget, 0, P());
this.s0++;
}
}

View File

@@ -0,0 +1,146 @@
package androidx.constraintlayout.solver.widgets;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/* loaded from: classes.dex */
public class ConstraintWidgetGroup {
public List<ConstraintWidget> a;
int b;
int c;
public boolean d;
public final int[] e;
List<ConstraintWidget> f;
List<ConstraintWidget> g;
HashSet<ConstraintWidget> h;
HashSet<ConstraintWidget> i;
List<ConstraintWidget> j;
List<ConstraintWidget> k;
ConstraintWidgetGroup(List<ConstraintWidget> list) {
this.b = -1;
this.c = -1;
this.d = false;
this.e = new int[]{this.b, this.c};
this.f = new ArrayList();
this.g = new ArrayList();
this.h = new HashSet<>();
this.i = new HashSet<>();
this.j = new ArrayList();
this.k = new ArrayList();
this.a = list;
}
public List<ConstraintWidget> a(int i) {
if (i == 0) {
return this.f;
}
if (i == 1) {
return this.g;
}
return null;
}
Set<ConstraintWidget> b(int i) {
if (i == 0) {
return this.h;
}
if (i == 1) {
return this.i;
}
return null;
}
void a(ConstraintWidget constraintWidget, int i) {
if (i == 0) {
this.h.add(constraintWidget);
} else if (i == 1) {
this.i.add(constraintWidget);
}
}
void b() {
int size = this.k.size();
for (int i = 0; i < size; i++) {
a(this.k.get(i));
}
}
List<ConstraintWidget> a() {
if (!this.j.isEmpty()) {
return this.j;
}
int size = this.a.size();
for (int i = 0; i < size; i++) {
ConstraintWidget constraintWidget = this.a.get(i);
if (!constraintWidget.b0) {
a((ArrayList<ConstraintWidget>) this.j, constraintWidget);
}
}
this.k.clear();
this.k.addAll(this.a);
this.k.removeAll(this.j);
return this.j;
}
ConstraintWidgetGroup(List<ConstraintWidget> list, boolean z) {
this.b = -1;
this.c = -1;
this.d = false;
this.e = new int[]{this.b, this.c};
this.f = new ArrayList();
this.g = new ArrayList();
this.h = new HashSet<>();
this.i = new HashSet<>();
this.j = new ArrayList();
this.k = new ArrayList();
this.a = list;
this.d = z;
}
private void a(ArrayList<ConstraintWidget> arrayList, ConstraintWidget constraintWidget) {
if (constraintWidget.d0) {
return;
}
arrayList.add(constraintWidget);
constraintWidget.d0 = true;
if (constraintWidget.y()) {
return;
}
if (constraintWidget instanceof Helper) {
Helper helper = (Helper) constraintWidget;
int i = helper.l0;
for (int i2 = 0; i2 < i; i2++) {
a(arrayList, helper.k0[i2]);
}
}
int length = constraintWidget.A.length;
for (int i3 = 0; i3 < length; i3++) {
ConstraintAnchor constraintAnchor = constraintWidget.A[i3].d;
if (constraintAnchor != null) {
ConstraintWidget constraintWidget2 = constraintAnchor.b;
if (constraintAnchor != null && constraintWidget2 != constraintWidget.k()) {
a(arrayList, constraintWidget2);
}
}
}
}
/* JADX WARN: Removed duplicated region for block: B:20:0x0048 */
/* JADX WARN: Removed duplicated region for block: B:23:0x006b */
/* JADX WARN: Removed duplicated region for block: B:28:0x0087 */
/* JADX WARN: Removed duplicated region for block: B:49:0x0050 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
private void a(androidx.constraintlayout.solver.widgets.ConstraintWidget r7) {
/*
Method dump skipped, instructions count: 222
To view this dump change 'Code comments level' option to 'DEBUG'
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.constraintlayout.solver.widgets.ConstraintWidgetGroup.a(androidx.constraintlayout.solver.widgets.ConstraintWidget):void");
}
}

View File

@@ -0,0 +1,257 @@
package androidx.constraintlayout.solver.widgets;
import androidx.constraintlayout.solver.LinearSystem;
import androidx.constraintlayout.solver.SolverVariable;
import androidx.constraintlayout.solver.widgets.ConstraintAnchor;
import androidx.constraintlayout.solver.widgets.ConstraintWidget;
import java.util.ArrayList;
/* loaded from: classes.dex */
public class Guideline extends ConstraintWidget {
protected float k0 = -1.0f;
protected int l0 = -1;
protected int m0 = -1;
private ConstraintAnchor n0 = this.t;
private int o0 = 0;
private boolean p0 = false;
/* renamed from: androidx.constraintlayout.solver.widgets.Guideline$1, reason: invalid class name */
static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] a = new int[ConstraintAnchor.Type.values().length];
static {
try {
a[ConstraintAnchor.Type.LEFT.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
a[ConstraintAnchor.Type.RIGHT.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
a[ConstraintAnchor.Type.TOP.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
a[ConstraintAnchor.Type.BOTTOM.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
a[ConstraintAnchor.Type.BASELINE.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
a[ConstraintAnchor.Type.CENTER.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
a[ConstraintAnchor.Type.CENTER_X.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
try {
a[ConstraintAnchor.Type.CENTER_Y.ordinal()] = 8;
} catch (NoSuchFieldError unused8) {
}
try {
a[ConstraintAnchor.Type.NONE.ordinal()] = 9;
} catch (NoSuchFieldError unused9) {
}
}
}
public Guideline() {
new Rectangle();
this.B.clear();
this.B.add(this.n0);
int length = this.A.length;
for (int i = 0; i < length; i++) {
this.A[i] = this.n0;
}
}
public int J() {
return this.o0;
}
@Override // androidx.constraintlayout.solver.widgets.ConstraintWidget
public ConstraintAnchor a(ConstraintAnchor.Type type) {
switch (AnonymousClass1.a[type.ordinal()]) {
case 1:
case 2:
if (this.o0 == 1) {
return this.n0;
}
break;
case 3:
case 4:
if (this.o0 == 0) {
return this.n0;
}
break;
case 5:
case 6:
case 7:
case 8:
case 9:
return null;
}
throw new AssertionError(type.name());
}
@Override // androidx.constraintlayout.solver.widgets.ConstraintWidget
public boolean a() {
return true;
}
@Override // androidx.constraintlayout.solver.widgets.ConstraintWidget
public ArrayList<ConstraintAnchor> b() {
return this.B;
}
@Override // androidx.constraintlayout.solver.widgets.ConstraintWidget
public void c(LinearSystem linearSystem) {
if (k() == null) {
return;
}
int b = linearSystem.b(this.n0);
if (this.o0 == 1) {
r(b);
s(0);
g(k().i());
o(0);
return;
}
r(0);
s(b);
o(k().s());
g(0);
}
public void e(float f) {
if (f > -1.0f) {
this.k0 = f;
this.l0 = -1;
this.m0 = -1;
}
}
public void t(int i) {
if (i > -1) {
this.k0 = -1.0f;
this.l0 = i;
this.m0 = -1;
}
}
public void u(int i) {
if (i > -1) {
this.k0 = -1.0f;
this.l0 = -1;
this.m0 = i;
}
}
public void v(int i) {
if (this.o0 == i) {
return;
}
this.o0 = i;
this.B.clear();
if (this.o0 == 1) {
this.n0 = this.s;
} else {
this.n0 = this.t;
}
this.B.add(this.n0);
int length = this.A.length;
for (int i2 = 0; i2 < length; i2++) {
this.A[i2] = this.n0;
}
}
@Override // androidx.constraintlayout.solver.widgets.ConstraintWidget
public void a(int i) {
ConstraintWidget k = k();
if (k == null) {
return;
}
if (J() == 1) {
this.t.d().a(1, k.t.d(), 0);
this.v.d().a(1, k.t.d(), 0);
if (this.l0 != -1) {
this.s.d().a(1, k.s.d(), this.l0);
this.u.d().a(1, k.s.d(), this.l0);
return;
} else if (this.m0 != -1) {
this.s.d().a(1, k.u.d(), -this.m0);
this.u.d().a(1, k.u.d(), -this.m0);
return;
} else {
if (this.k0 == -1.0f || k.j() != ConstraintWidget.DimensionBehaviour.FIXED) {
return;
}
int i2 = (int) (k.E * this.k0);
this.s.d().a(1, k.s.d(), i2);
this.u.d().a(1, k.s.d(), i2);
return;
}
}
this.s.d().a(1, k.s.d(), 0);
this.u.d().a(1, k.s.d(), 0);
if (this.l0 != -1) {
this.t.d().a(1, k.t.d(), this.l0);
this.v.d().a(1, k.t.d(), this.l0);
} else if (this.m0 != -1) {
this.t.d().a(1, k.v.d(), -this.m0);
this.v.d().a(1, k.v.d(), -this.m0);
} else {
if (this.k0 == -1.0f || k.q() != ConstraintWidget.DimensionBehaviour.FIXED) {
return;
}
int i3 = (int) (k.F * this.k0);
this.t.d().a(1, k.t.d(), i3);
this.v.d().a(1, k.t.d(), i3);
}
}
@Override // androidx.constraintlayout.solver.widgets.ConstraintWidget
public void a(LinearSystem linearSystem) {
ConstraintWidgetContainer constraintWidgetContainer = (ConstraintWidgetContainer) k();
if (constraintWidgetContainer == null) {
return;
}
ConstraintAnchor a = constraintWidgetContainer.a(ConstraintAnchor.Type.LEFT);
ConstraintAnchor a2 = constraintWidgetContainer.a(ConstraintAnchor.Type.RIGHT);
ConstraintWidget constraintWidget = this.D;
boolean z = constraintWidget != null && constraintWidget.C[0] == ConstraintWidget.DimensionBehaviour.WRAP_CONTENT;
if (this.o0 == 0) {
a = constraintWidgetContainer.a(ConstraintAnchor.Type.TOP);
a2 = constraintWidgetContainer.a(ConstraintAnchor.Type.BOTTOM);
ConstraintWidget constraintWidget2 = this.D;
z = constraintWidget2 != null && constraintWidget2.C[1] == ConstraintWidget.DimensionBehaviour.WRAP_CONTENT;
}
if (this.l0 != -1) {
SolverVariable a3 = linearSystem.a(this.n0);
linearSystem.a(a3, linearSystem.a(a), this.l0, 6);
if (z) {
linearSystem.b(linearSystem.a(a2), a3, 0, 5);
return;
}
return;
}
if (this.m0 == -1) {
if (this.k0 != -1.0f) {
linearSystem.a(LinearSystem.a(linearSystem, linearSystem.a(this.n0), linearSystem.a(a), linearSystem.a(a2), this.k0, this.p0));
return;
}
return;
}
SolverVariable a4 = linearSystem.a(this.n0);
SolverVariable a5 = linearSystem.a(a2);
linearSystem.a(a4, a5, -this.m0, 6);
if (z) {
linearSystem.b(a4, linearSystem.a(a), 0, 5);
linearSystem.b(a5, a4, 0, 5);
}
}
}

View File

@@ -0,0 +1,25 @@
package androidx.constraintlayout.solver.widgets;
import java.util.Arrays;
/* loaded from: classes.dex */
public class Helper extends ConstraintWidget {
protected ConstraintWidget[] k0 = new ConstraintWidget[4];
protected int l0 = 0;
public void J() {
this.l0 = 0;
}
public void b(ConstraintWidget constraintWidget) {
int i = this.l0 + 1;
ConstraintWidget[] constraintWidgetArr = this.k0;
if (i > constraintWidgetArr.length) {
this.k0 = (ConstraintWidget[]) Arrays.copyOf(constraintWidgetArr, constraintWidgetArr.length * 2);
}
ConstraintWidget[] constraintWidgetArr2 = this.k0;
int i2 = this.l0;
constraintWidgetArr2[i2] = constraintWidget;
this.l0 = i2 + 1;
}
}

View File

@@ -0,0 +1,320 @@
package androidx.constraintlayout.solver.widgets;
import androidx.constraintlayout.solver.LinearSystem;
import androidx.constraintlayout.solver.widgets.ConstraintWidget;
/* loaded from: classes.dex */
public class Optimizer {
static boolean[] a = new boolean[3];
static void a(ConstraintWidgetContainer constraintWidgetContainer, LinearSystem linearSystem, ConstraintWidget constraintWidget) {
if (constraintWidgetContainer.C[0] != ConstraintWidget.DimensionBehaviour.WRAP_CONTENT && constraintWidget.C[0] == ConstraintWidget.DimensionBehaviour.MATCH_PARENT) {
int i = constraintWidget.s.e;
int s = constraintWidgetContainer.s() - constraintWidget.u.e;
ConstraintAnchor constraintAnchor = constraintWidget.s;
constraintAnchor.i = linearSystem.a(constraintAnchor);
ConstraintAnchor constraintAnchor2 = constraintWidget.u;
constraintAnchor2.i = linearSystem.a(constraintAnchor2);
linearSystem.a(constraintWidget.s.i, i);
linearSystem.a(constraintWidget.u.i, s);
constraintWidget.a = 2;
constraintWidget.a(i, s);
}
if (constraintWidgetContainer.C[1] == ConstraintWidget.DimensionBehaviour.WRAP_CONTENT || constraintWidget.C[1] != ConstraintWidget.DimensionBehaviour.MATCH_PARENT) {
return;
}
int i2 = constraintWidget.t.e;
int i3 = constraintWidgetContainer.i() - constraintWidget.v.e;
ConstraintAnchor constraintAnchor3 = constraintWidget.t;
constraintAnchor3.i = linearSystem.a(constraintAnchor3);
ConstraintAnchor constraintAnchor4 = constraintWidget.v;
constraintAnchor4.i = linearSystem.a(constraintAnchor4);
linearSystem.a(constraintWidget.t.i, i2);
linearSystem.a(constraintWidget.v.i, i3);
if (constraintWidget.Q > 0 || constraintWidget.r() == 8) {
ConstraintAnchor constraintAnchor5 = constraintWidget.w;
constraintAnchor5.i = linearSystem.a(constraintAnchor5);
linearSystem.a(constraintWidget.w.i, constraintWidget.Q + i2);
}
constraintWidget.b = 2;
constraintWidget.e(i2, i3);
}
private static boolean a(ConstraintWidget constraintWidget, int i) {
ConstraintWidget.DimensionBehaviour[] dimensionBehaviourArr = constraintWidget.C;
if (dimensionBehaviourArr[i] != ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT) {
return false;
}
if (constraintWidget.G != 0.0f) {
if (dimensionBehaviourArr[i != 0 ? (char) 0 : (char) 1] == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT) {
}
return false;
}
if (i == 0) {
if (constraintWidget.e != 0 || constraintWidget.h != 0 || constraintWidget.i != 0) {
return false;
}
} else if (constraintWidget.f != 0 || constraintWidget.k != 0 || constraintWidget.l != 0) {
return false;
}
return true;
}
static void a(int i, ConstraintWidget constraintWidget) {
constraintWidget.I();
ResolutionAnchor d = constraintWidget.s.d();
ResolutionAnchor d2 = constraintWidget.t.d();
ResolutionAnchor d3 = constraintWidget.u.d();
ResolutionAnchor d4 = constraintWidget.v.d();
boolean z = (i & 8) == 8;
boolean z2 = constraintWidget.C[0] == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT && a(constraintWidget, 0);
if (d.h != 4 && d3.h != 4) {
if (constraintWidget.C[0] == ConstraintWidget.DimensionBehaviour.FIXED || (z2 && constraintWidget.r() == 8)) {
if (constraintWidget.s.d == null && constraintWidget.u.d == null) {
d.b(1);
d3.b(1);
if (z) {
d3.a(d, 1, constraintWidget.m());
} else {
d3.a(d, constraintWidget.s());
}
} else if (constraintWidget.s.d != null && constraintWidget.u.d == null) {
d.b(1);
d3.b(1);
if (z) {
d3.a(d, 1, constraintWidget.m());
} else {
d3.a(d, constraintWidget.s());
}
} else if (constraintWidget.s.d == null && constraintWidget.u.d != null) {
d.b(1);
d3.b(1);
d.a(d3, -constraintWidget.s());
if (z) {
d.a(d3, -1, constraintWidget.m());
} else {
d.a(d3, -constraintWidget.s());
}
} else if (constraintWidget.s.d != null && constraintWidget.u.d != null) {
d.b(2);
d3.b(2);
if (z) {
constraintWidget.m().a(d);
constraintWidget.m().a(d3);
d.b(d3, -1, constraintWidget.m());
d3.b(d, 1, constraintWidget.m());
} else {
d.b(d3, -constraintWidget.s());
d3.b(d, constraintWidget.s());
}
}
} else if (z2) {
int s = constraintWidget.s();
d.b(1);
d3.b(1);
if (constraintWidget.s.d == null && constraintWidget.u.d == null) {
if (z) {
d3.a(d, 1, constraintWidget.m());
} else {
d3.a(d, s);
}
} else if (constraintWidget.s.d == null || constraintWidget.u.d != null) {
if (constraintWidget.s.d != null || constraintWidget.u.d == null) {
if (constraintWidget.s.d != null && constraintWidget.u.d != null) {
if (z) {
constraintWidget.m().a(d);
constraintWidget.m().a(d3);
}
if (constraintWidget.G == 0.0f) {
d.b(3);
d3.b(3);
d.b(d3, 0.0f);
d3.b(d, 0.0f);
} else {
d.b(2);
d3.b(2);
d.b(d3, -s);
d3.b(d, s);
constraintWidget.o(s);
}
}
} else if (z) {
d.a(d3, -1, constraintWidget.m());
} else {
d.a(d3, -s);
}
} else if (z) {
d3.a(d, 1, constraintWidget.m());
} else {
d3.a(d, s);
}
}
}
boolean z3 = constraintWidget.C[1] == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT && a(constraintWidget, 1);
if (d2.h == 4 || d4.h == 4) {
return;
}
if (constraintWidget.C[1] != ConstraintWidget.DimensionBehaviour.FIXED && (!z3 || constraintWidget.r() != 8)) {
if (z3) {
int i2 = constraintWidget.i();
d2.b(1);
d4.b(1);
if (constraintWidget.t.d == null && constraintWidget.v.d == null) {
if (z) {
d4.a(d2, 1, constraintWidget.l());
return;
} else {
d4.a(d2, i2);
return;
}
}
if (constraintWidget.t.d != null && constraintWidget.v.d == null) {
if (z) {
d4.a(d2, 1, constraintWidget.l());
return;
} else {
d4.a(d2, i2);
return;
}
}
if (constraintWidget.t.d == null && constraintWidget.v.d != null) {
if (z) {
d2.a(d4, -1, constraintWidget.l());
return;
} else {
d2.a(d4, -i2);
return;
}
}
if (constraintWidget.t.d == null || constraintWidget.v.d == null) {
return;
}
if (z) {
constraintWidget.l().a(d2);
constraintWidget.m().a(d4);
}
if (constraintWidget.G == 0.0f) {
d2.b(3);
d4.b(3);
d2.b(d4, 0.0f);
d4.b(d2, 0.0f);
return;
}
d2.b(2);
d4.b(2);
d2.b(d4, -i2);
d4.b(d2, i2);
constraintWidget.g(i2);
if (constraintWidget.Q > 0) {
constraintWidget.w.d().a(1, d2, constraintWidget.Q);
return;
}
return;
}
return;
}
if (constraintWidget.t.d == null && constraintWidget.v.d == null) {
d2.b(1);
d4.b(1);
if (z) {
d4.a(d2, 1, constraintWidget.l());
} else {
d4.a(d2, constraintWidget.i());
}
ConstraintAnchor constraintAnchor = constraintWidget.w;
if (constraintAnchor.d != null) {
constraintAnchor.d().b(1);
d2.a(1, constraintWidget.w.d(), -constraintWidget.Q);
return;
}
return;
}
if (constraintWidget.t.d != null && constraintWidget.v.d == null) {
d2.b(1);
d4.b(1);
if (z) {
d4.a(d2, 1, constraintWidget.l());
} else {
d4.a(d2, constraintWidget.i());
}
if (constraintWidget.Q > 0) {
constraintWidget.w.d().a(1, d2, constraintWidget.Q);
return;
}
return;
}
if (constraintWidget.t.d == null && constraintWidget.v.d != null) {
d2.b(1);
d4.b(1);
if (z) {
d2.a(d4, -1, constraintWidget.l());
} else {
d2.a(d4, -constraintWidget.i());
}
if (constraintWidget.Q > 0) {
constraintWidget.w.d().a(1, d2, constraintWidget.Q);
return;
}
return;
}
if (constraintWidget.t.d == null || constraintWidget.v.d == null) {
return;
}
d2.b(2);
d4.b(2);
if (z) {
d2.b(d4, -1, constraintWidget.l());
d4.b(d2, 1, constraintWidget.l());
constraintWidget.l().a(d2);
constraintWidget.m().a(d4);
} else {
d2.b(d4, -constraintWidget.i());
d4.b(d2, constraintWidget.i());
}
if (constraintWidget.Q > 0) {
constraintWidget.w.d().a(1, d2, constraintWidget.Q);
}
}
/* JADX WARN: Code restructure failed: missing block: B:10:0x0032, code lost:
if (r7.e0 == 2) goto L14;
*/
/* JADX WARN: Code restructure failed: missing block: B:11:0x0034, code lost:
r2 = true;
*/
/* JADX WARN: Code restructure failed: missing block: B:209:0x0036, code lost:
r2 = false;
*/
/* JADX WARN: Code restructure failed: missing block: B:219:0x0048, code lost:
if (r7.f0 == 2) goto L14;
*/
/* JADX WARN: Removed duplicated region for block: B:120:0x01d6 */
/* JADX WARN: Removed duplicated region for block: B:67:0x0109 A[SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:71:0x0105 A[SYNTHETIC] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
static boolean a(androidx.constraintlayout.solver.widgets.ConstraintWidgetContainer r24, androidx.constraintlayout.solver.LinearSystem r25, int r26, int r27, androidx.constraintlayout.solver.widgets.ChainHead r28) {
/*
Method dump skipped, instructions count: 900
To view this dump change 'Code comments level' option to 'DEBUG'
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.constraintlayout.solver.widgets.Optimizer.a(androidx.constraintlayout.solver.widgets.ConstraintWidgetContainer, androidx.constraintlayout.solver.LinearSystem, int, int, androidx.constraintlayout.solver.widgets.ChainHead):boolean");
}
static void a(ConstraintWidget constraintWidget, int i, int i2) {
int i3 = i * 2;
int i4 = i3 + 1;
constraintWidget.A[i3].d().f = constraintWidget.k().s.d();
constraintWidget.A[i3].d().g = i2;
constraintWidget.A[i3].d().b = 1;
constraintWidget.A[i4].d().f = constraintWidget.A[i3].d();
constraintWidget.A[i4].d().g = constraintWidget.d(i);
constraintWidget.A[i4].d().b = 1;
}
}

View File

@@ -0,0 +1,5 @@
package androidx.constraintlayout.solver.widgets;
/* loaded from: classes.dex */
public class Rectangle {
}

View File

@@ -0,0 +1,248 @@
package androidx.constraintlayout.solver.widgets;
import androidx.constraintlayout.solver.LinearSystem;
import androidx.constraintlayout.solver.SolverVariable;
import androidx.constraintlayout.solver.widgets.ConstraintAnchor;
/* loaded from: classes.dex */
public class ResolutionAnchor extends ResolutionNode {
ConstraintAnchor c;
ResolutionAnchor d;
float e;
ResolutionAnchor f;
float g;
private ResolutionAnchor i;
int h = 0;
private ResolutionDimension j = null;
private int k = 1;
private ResolutionDimension l = null;
private int m = 1;
public ResolutionAnchor(ConstraintAnchor constraintAnchor) {
this.c = constraintAnchor;
}
String a(int i) {
return i == 1 ? "DIRECT" : i == 2 ? "CENTER" : i == 3 ? "MATCH" : i == 4 ? "CHAIN" : i == 5 ? "BARRIER" : "UNCONNECTED";
}
public void a(ResolutionAnchor resolutionAnchor, float f) {
if (this.b == 0 || !(this.f == resolutionAnchor || this.g == f)) {
this.f = resolutionAnchor;
this.g = f;
if (this.b == 1) {
b();
}
a();
}
}
public void b(int i) {
this.h = i;
}
@Override // androidx.constraintlayout.solver.widgets.ResolutionNode
public void d() {
super.d();
this.d = null;
this.e = 0.0f;
this.j = null;
this.k = 1;
this.l = null;
this.m = 1;
this.f = null;
this.g = 0.0f;
this.i = null;
this.h = 0;
}
@Override // androidx.constraintlayout.solver.widgets.ResolutionNode
public void e() {
ResolutionAnchor resolutionAnchor;
ResolutionAnchor resolutionAnchor2;
ResolutionAnchor resolutionAnchor3;
ResolutionAnchor resolutionAnchor4;
ResolutionAnchor resolutionAnchor5;
ResolutionAnchor resolutionAnchor6;
float f;
float f2;
float s;
float f3;
ResolutionAnchor resolutionAnchor7;
boolean z = true;
if (this.b == 1 || this.h == 4) {
return;
}
ResolutionDimension resolutionDimension = this.j;
if (resolutionDimension != null) {
if (resolutionDimension.b != 1) {
return;
} else {
this.e = this.k * resolutionDimension.c;
}
}
ResolutionDimension resolutionDimension2 = this.l;
if (resolutionDimension2 != null) {
if (resolutionDimension2.b != 1) {
return;
} else {
float f4 = resolutionDimension2.c;
}
}
if (this.h == 1 && ((resolutionAnchor7 = this.d) == null || resolutionAnchor7.b == 1)) {
ResolutionAnchor resolutionAnchor8 = this.d;
if (resolutionAnchor8 == null) {
this.f = this;
this.g = this.e;
} else {
this.f = resolutionAnchor8.f;
this.g = resolutionAnchor8.g + this.e;
}
a();
return;
}
if (this.h != 2 || (resolutionAnchor4 = this.d) == null || resolutionAnchor4.b != 1 || (resolutionAnchor5 = this.i) == null || (resolutionAnchor6 = resolutionAnchor5.d) == null || resolutionAnchor6.b != 1) {
if (this.h != 3 || (resolutionAnchor = this.d) == null || resolutionAnchor.b != 1 || (resolutionAnchor2 = this.i) == null || (resolutionAnchor3 = resolutionAnchor2.d) == null || resolutionAnchor3.b != 1) {
if (this.h == 5) {
this.c.b.G();
return;
}
return;
}
if (LinearSystem.h() != null) {
LinearSystem.h().w++;
}
ResolutionAnchor resolutionAnchor9 = this.d;
this.f = resolutionAnchor9.f;
ResolutionAnchor resolutionAnchor10 = this.i;
ResolutionAnchor resolutionAnchor11 = resolutionAnchor10.d;
resolutionAnchor10.f = resolutionAnchor11.f;
this.g = resolutionAnchor9.g + this.e;
resolutionAnchor10.g = resolutionAnchor11.g + resolutionAnchor10.e;
a();
this.i.a();
return;
}
if (LinearSystem.h() != null) {
LinearSystem.h().v++;
}
this.f = this.d.f;
ResolutionAnchor resolutionAnchor12 = this.i;
resolutionAnchor12.f = resolutionAnchor12.d.f;
ConstraintAnchor.Type type = this.c.c;
int i = 0;
if (type != ConstraintAnchor.Type.RIGHT && type != ConstraintAnchor.Type.BOTTOM) {
z = false;
}
if (z) {
f = this.d.g;
f2 = this.i.d.g;
} else {
f = this.i.d.g;
f2 = this.d.g;
}
float f5 = f - f2;
ConstraintAnchor.Type type2 = this.c.c;
if (type2 == ConstraintAnchor.Type.LEFT || type2 == ConstraintAnchor.Type.RIGHT) {
s = f5 - this.c.b.s();
f3 = this.c.b.V;
} else {
s = f5 - r2.b.i();
f3 = this.c.b.W;
}
int b = this.c.b();
int b2 = this.i.c.b();
if (this.c.g() == this.i.c.g()) {
f3 = 0.5f;
b2 = 0;
} else {
i = b;
}
float f6 = i;
float f7 = b2;
float f8 = (s - f6) - f7;
if (z) {
ResolutionAnchor resolutionAnchor13 = this.i;
resolutionAnchor13.g = resolutionAnchor13.d.g + f7 + (f8 * f3);
this.g = (this.d.g - f6) - (f8 * (1.0f - f3));
} else {
this.g = this.d.g + f6 + (f8 * f3);
ResolutionAnchor resolutionAnchor14 = this.i;
resolutionAnchor14.g = (resolutionAnchor14.d.g - f7) - (f8 * (1.0f - f3));
}
a();
this.i.a();
}
public float f() {
return this.g;
}
public void g() {
ConstraintAnchor g = this.c.g();
if (g == null) {
return;
}
if (g.g() == this.c) {
this.h = 4;
g.d().h = 4;
}
int b = this.c.b();
ConstraintAnchor.Type type = this.c.c;
if (type == ConstraintAnchor.Type.RIGHT || type == ConstraintAnchor.Type.BOTTOM) {
b = -b;
}
a(g.d(), b);
}
public String toString() {
if (this.b != 1) {
return "{ " + this.c + " UNRESOLVED} type: " + a(this.h);
}
if (this.f == this) {
return "[" + this.c + ", RESOLVED: " + this.g + "] type: " + a(this.h);
}
return "[" + this.c + ", RESOLVED: " + this.f + ":" + this.g + "] type: " + a(this.h);
}
public void b(ResolutionAnchor resolutionAnchor, float f) {
this.i = resolutionAnchor;
}
public void b(ResolutionAnchor resolutionAnchor, int i, ResolutionDimension resolutionDimension) {
this.i = resolutionAnchor;
this.l = resolutionDimension;
this.m = i;
}
public void a(int i, ResolutionAnchor resolutionAnchor, int i2) {
this.h = i;
this.d = resolutionAnchor;
this.e = i2;
this.d.a(this);
}
public void a(ResolutionAnchor resolutionAnchor, int i) {
this.d = resolutionAnchor;
this.e = i;
this.d.a(this);
}
public void a(ResolutionAnchor resolutionAnchor, int i, ResolutionDimension resolutionDimension) {
this.d = resolutionAnchor;
this.d.a(this);
this.j = resolutionDimension;
this.k = i;
this.j.a(this);
}
void a(LinearSystem linearSystem) {
SolverVariable e = this.c.e();
ResolutionAnchor resolutionAnchor = this.f;
if (resolutionAnchor == null) {
linearSystem.a(e, (int) (this.g + 0.5f));
} else {
linearSystem.a(e, linearSystem.a(resolutionAnchor.c), (int) (this.g + 0.5f), 6);
}
}
}

View File

@@ -0,0 +1,26 @@
package androidx.constraintlayout.solver.widgets;
/* loaded from: classes.dex */
public class ResolutionDimension extends ResolutionNode {
float c = 0.0f;
public void a(int i) {
if (this.b == 0 || this.c != i) {
this.c = i;
if (this.b == 1) {
b();
}
a();
}
}
@Override // androidx.constraintlayout.solver.widgets.ResolutionNode
public void d() {
super.d();
this.c = 0.0f;
}
public void f() {
this.b = 2;
}
}

View File

@@ -0,0 +1,42 @@
package androidx.constraintlayout.solver.widgets;
import java.util.HashSet;
import java.util.Iterator;
/* loaded from: classes.dex */
public class ResolutionNode {
HashSet<ResolutionNode> a = new HashSet<>(2);
int b = 0;
public void a(ResolutionNode resolutionNode) {
this.a.add(resolutionNode);
}
public void b() {
this.b = 0;
Iterator<ResolutionNode> it = this.a.iterator();
while (it.hasNext()) {
it.next().b();
}
}
public boolean c() {
return this.b == 1;
}
public void d() {
this.b = 0;
this.a.clear();
}
public void e() {
}
public void a() {
this.b = 1;
Iterator<ResolutionNode> it = this.a.iterator();
while (it.hasNext()) {
it.next().e();
}
}
}

View File

@@ -0,0 +1,83 @@
package androidx.constraintlayout.solver.widgets;
import androidx.constraintlayout.solver.widgets.ConstraintAnchor;
import java.util.ArrayList;
/* loaded from: classes.dex */
public class Snapshot {
private int a;
private int b;
private int c;
private int d;
private ArrayList<Connection> e = new ArrayList<>();
static class Connection {
private ConstraintAnchor a;
private ConstraintAnchor b;
private int c;
private ConstraintAnchor.Strength d;
private int e;
public Connection(ConstraintAnchor constraintAnchor) {
this.a = constraintAnchor;
this.b = constraintAnchor.g();
this.c = constraintAnchor.b();
this.d = constraintAnchor.f();
this.e = constraintAnchor.a();
}
public void a(ConstraintWidget constraintWidget) {
constraintWidget.a(this.a.h()).a(this.b, this.c, this.d, this.e);
}
public void b(ConstraintWidget constraintWidget) {
this.a = constraintWidget.a(this.a.h());
ConstraintAnchor constraintAnchor = this.a;
if (constraintAnchor != null) {
this.b = constraintAnchor.g();
this.c = this.a.b();
this.d = this.a.f();
this.e = this.a.a();
return;
}
this.b = null;
this.c = 0;
this.d = ConstraintAnchor.Strength.STRONG;
this.e = 0;
}
}
public Snapshot(ConstraintWidget constraintWidget) {
this.a = constraintWidget.v();
this.b = constraintWidget.w();
this.c = constraintWidget.s();
this.d = constraintWidget.i();
ArrayList<ConstraintAnchor> b = constraintWidget.b();
int size = b.size();
for (int i = 0; i < size; i++) {
this.e.add(new Connection(b.get(i)));
}
}
public void a(ConstraintWidget constraintWidget) {
constraintWidget.r(this.a);
constraintWidget.s(this.b);
constraintWidget.o(this.c);
constraintWidget.g(this.d);
int size = this.e.size();
for (int i = 0; i < size; i++) {
this.e.get(i).a(constraintWidget);
}
}
public void b(ConstraintWidget constraintWidget) {
this.a = constraintWidget.v();
this.b = constraintWidget.w();
this.c = constraintWidget.s();
this.d = constraintWidget.i();
int size = this.e.size();
for (int i = 0; i < size; i++) {
this.e.get(i).b(constraintWidget);
}
}
}

View File

@@ -0,0 +1,95 @@
package androidx.constraintlayout.solver.widgets;
import androidx.constraintlayout.solver.Cache;
import java.util.ArrayList;
/* loaded from: classes.dex */
public class WidgetContainer extends ConstraintWidget {
protected ArrayList<ConstraintWidget> k0 = new ArrayList<>();
@Override // androidx.constraintlayout.solver.widgets.ConstraintWidget
public void D() {
this.k0.clear();
super.D();
}
@Override // androidx.constraintlayout.solver.widgets.ConstraintWidget
public void H() {
super.H();
ArrayList<ConstraintWidget> arrayList = this.k0;
if (arrayList == null) {
return;
}
int size = arrayList.size();
for (int i = 0; i < size; i++) {
ConstraintWidget constraintWidget = this.k0.get(i);
constraintWidget.b(g(), h());
if (!(constraintWidget instanceof ConstraintWidgetContainer)) {
constraintWidget.H();
}
}
}
public ConstraintWidgetContainer J() {
ConstraintWidget k = k();
ConstraintWidgetContainer constraintWidgetContainer = this instanceof ConstraintWidgetContainer ? (ConstraintWidgetContainer) this : null;
while (k != null) {
ConstraintWidget k2 = k.k();
if (k instanceof ConstraintWidgetContainer) {
constraintWidgetContainer = (ConstraintWidgetContainer) k;
}
k = k2;
}
return constraintWidgetContainer;
}
public void K() {
H();
ArrayList<ConstraintWidget> arrayList = this.k0;
if (arrayList == null) {
return;
}
int size = arrayList.size();
for (int i = 0; i < size; i++) {
ConstraintWidget constraintWidget = this.k0.get(i);
if (constraintWidget instanceof WidgetContainer) {
((WidgetContainer) constraintWidget).K();
}
}
}
public void L() {
this.k0.clear();
}
@Override // androidx.constraintlayout.solver.widgets.ConstraintWidget
public void a(Cache cache) {
super.a(cache);
int size = this.k0.size();
for (int i = 0; i < size; i++) {
this.k0.get(i).a(cache);
}
}
public void b(ConstraintWidget constraintWidget) {
this.k0.add(constraintWidget);
if (constraintWidget.k() != null) {
((WidgetContainer) constraintWidget.k()).c(constraintWidget);
}
constraintWidget.a((ConstraintWidget) this);
}
public void c(ConstraintWidget constraintWidget) {
this.k0.remove(constraintWidget);
constraintWidget.a((ConstraintWidget) null);
}
@Override // androidx.constraintlayout.solver.widgets.ConstraintWidget
public void b(int i, int i2) {
super.b(i, i2);
int size = this.k0.size();
for (int i3 = 0; i3 < size; i3++) {
this.k0.get(i3).b(o(), p());
}
}
}