jimu-decompiled/sources/androidx/constraintlayout/widget/ConstraintLayout.java
2025-05-13 19:24:51 +02:00

1345 lines
53 KiB
Java

package androidx.constraintlayout.widget;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.os.Build;
import android.util.AttributeSet;
import android.util.Log;
import android.util.SparseArray;
import android.util.SparseIntArray;
import android.view.View;
import android.view.ViewGroup;
import androidx.constraintlayout.solver.Metrics;
import androidx.constraintlayout.solver.widgets.ConstraintWidget;
import androidx.constraintlayout.solver.widgets.ConstraintWidgetContainer;
import java.util.ArrayList;
import java.util.HashMap;
/* loaded from: classes.dex */
public class ConstraintLayout extends ViewGroup {
SparseArray<View> a;
private ArrayList<ConstraintHelper> b;
private final ArrayList<ConstraintWidget> c;
ConstraintWidgetContainer d;
private int e;
private int f;
private int g;
private int h;
private boolean i;
private int j;
private ConstraintSet k;
private int l;
private HashMap<String, Integer> m;
private int n;
private int o;
private Metrics p;
public ConstraintLayout(Context context) {
super(context);
this.a = new SparseArray<>();
this.b = new ArrayList<>(4);
this.c = new ArrayList<>(100);
this.d = new ConstraintWidgetContainer();
this.e = 0;
this.f = 0;
this.g = Integer.MAX_VALUE;
this.h = Integer.MAX_VALUE;
this.i = true;
this.j = 7;
this.k = null;
this.l = -1;
this.m = new HashMap<>();
this.n = -1;
this.o = -1;
a((AttributeSet) null);
}
private void b() {
int childCount = getChildCount();
boolean z = false;
int i = 0;
while (true) {
if (i >= childCount) {
break;
}
if (getChildAt(i).isLayoutRequested()) {
z = true;
break;
}
i++;
}
if (z) {
this.c.clear();
a();
}
}
private void c() {
int childCount = getChildCount();
for (int i = 0; i < childCount; i++) {
View childAt = getChildAt(i);
if (childAt instanceof Placeholder) {
((Placeholder) childAt).a(this);
}
}
int size = this.b.size();
if (size > 0) {
for (int i2 = 0; i2 < size; i2++) {
this.b.get(i2).b(this);
}
}
}
public void a(int i, Object obj, Object obj2) {
if (i == 0 && (obj instanceof String) && (obj2 instanceof Integer)) {
if (this.m == null) {
this.m = new HashMap<>();
}
String str = (String) obj;
int indexOf = str.indexOf("/");
if (indexOf != -1) {
str = str.substring(indexOf + 1);
}
this.m.put(str, Integer.valueOf(((Integer) obj2).intValue()));
}
}
@Override // android.view.ViewGroup
public void addView(View view, int i, ViewGroup.LayoutParams layoutParams) {
super.addView(view, i, layoutParams);
if (Build.VERSION.SDK_INT < 14) {
onViewAdded(view);
}
}
@Override // android.view.ViewGroup
protected boolean checkLayoutParams(ViewGroup.LayoutParams layoutParams) {
return layoutParams instanceof LayoutParams;
}
@Override // android.view.ViewGroup, android.view.View
public void dispatchDraw(Canvas canvas) {
Object tag;
super.dispatchDraw(canvas);
if (isInEditMode()) {
int childCount = getChildCount();
float width = getWidth();
float height = getHeight();
for (int i = 0; i < childCount; i++) {
View childAt = getChildAt(i);
if (childAt.getVisibility() != 8 && (tag = childAt.getTag()) != null && (tag instanceof String)) {
String[] split = ((String) tag).split(",");
if (split.length == 4) {
int parseInt = Integer.parseInt(split[0]);
int parseInt2 = Integer.parseInt(split[1]);
int parseInt3 = Integer.parseInt(split[2]);
int i2 = (int) ((parseInt / 1080.0f) * width);
int i3 = (int) ((parseInt2 / 1920.0f) * height);
Paint paint = new Paint();
paint.setColor(-65536);
float f = i2;
float f2 = i3;
float f3 = i2 + ((int) ((parseInt3 / 1080.0f) * width));
canvas.drawLine(f, f2, f3, f2, paint);
float parseInt4 = i3 + ((int) ((Integer.parseInt(split[3]) / 1920.0f) * height));
canvas.drawLine(f3, f2, f3, parseInt4, paint);
canvas.drawLine(f3, parseInt4, f, parseInt4, paint);
canvas.drawLine(f, parseInt4, f, f2, paint);
paint.setColor(-16711936);
canvas.drawLine(f, f2, f3, parseInt4, paint);
canvas.drawLine(f, parseInt4, f3, f2, paint);
}
}
}
}
}
public int getMaxHeight() {
return this.h;
}
public int getMaxWidth() {
return this.g;
}
public int getMinHeight() {
return this.f;
}
public int getMinWidth() {
return this.e;
}
public int getOptimizationLevel() {
return this.d.M();
}
@Override // android.view.ViewGroup, android.view.View
protected void onLayout(boolean z, int i, int i2, int i3, int i4) {
View content;
int childCount = getChildCount();
boolean isInEditMode = isInEditMode();
for (int i5 = 0; i5 < childCount; i5++) {
View childAt = getChildAt(i5);
LayoutParams layoutParams = (LayoutParams) childAt.getLayoutParams();
ConstraintWidget constraintWidget = layoutParams.k0;
if ((childAt.getVisibility() != 8 || layoutParams.X || layoutParams.Y || isInEditMode) && !layoutParams.Z) {
int g = constraintWidget.g();
int h = constraintWidget.h();
int s = constraintWidget.s() + g;
int i6 = constraintWidget.i() + h;
childAt.layout(g, h, s, i6);
if ((childAt instanceof Placeholder) && (content = ((Placeholder) childAt).getContent()) != null) {
content.setVisibility(0);
content.layout(g, h, s, i6);
}
}
}
int size = this.b.size();
if (size > 0) {
for (int i7 = 0; i7 < size; i7++) {
this.b.get(i7).a(this);
}
}
}
/* JADX WARN: Removed duplicated region for block: B:174:0x0370 */
/* JADX WARN: Removed duplicated region for block: B:183:0x03a9 */
/* JADX WARN: Removed duplicated region for block: B:187:0x035b */
/* JADX WARN: Removed duplicated region for block: B:58:0x0124 */
/* JADX WARN: Removed duplicated region for block: B:61:0x013b */
@Override // android.view.View
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
protected void onMeasure(int r25, int r26) {
/*
Method dump skipped, instructions count: 945
To view this dump change 'Code comments level' option to 'DEBUG'
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.constraintlayout.widget.ConstraintLayout.onMeasure(int, int):void");
}
@Override // android.view.ViewGroup
public void onViewAdded(View view) {
if (Build.VERSION.SDK_INT >= 14) {
super.onViewAdded(view);
}
ConstraintWidget a = a(view);
if ((view instanceof Guideline) && !(a instanceof androidx.constraintlayout.solver.widgets.Guideline)) {
LayoutParams layoutParams = (LayoutParams) view.getLayoutParams();
layoutParams.k0 = new androidx.constraintlayout.solver.widgets.Guideline();
layoutParams.X = true;
((androidx.constraintlayout.solver.widgets.Guideline) layoutParams.k0).v(layoutParams.R);
}
if (view instanceof ConstraintHelper) {
ConstraintHelper constraintHelper = (ConstraintHelper) view;
constraintHelper.a();
((LayoutParams) view.getLayoutParams()).Y = true;
if (!this.b.contains(constraintHelper)) {
this.b.add(constraintHelper);
}
}
this.a.put(view.getId(), view);
this.i = true;
}
@Override // android.view.ViewGroup
public void onViewRemoved(View view) {
if (Build.VERSION.SDK_INT >= 14) {
super.onViewRemoved(view);
}
this.a.remove(view.getId());
ConstraintWidget a = a(view);
this.d.c(a);
this.b.remove(view);
this.c.remove(a);
this.i = true;
}
@Override // android.view.ViewGroup, android.view.ViewManager
public void removeView(View view) {
super.removeView(view);
if (Build.VERSION.SDK_INT < 14) {
onViewRemoved(view);
}
}
@Override // android.view.View, android.view.ViewParent
public void requestLayout() {
super.requestLayout();
this.i = true;
this.n = -1;
this.o = -1;
}
public void setConstraintSet(ConstraintSet constraintSet) {
this.k = constraintSet;
}
@Override // android.view.View
public void setId(int i) {
this.a.remove(getId());
super.setId(i);
this.a.put(getId(), this);
}
public void setMaxHeight(int i) {
if (i == this.h) {
return;
}
this.h = i;
requestLayout();
}
public void setMaxWidth(int i) {
if (i == this.g) {
return;
}
this.g = i;
requestLayout();
}
public void setMinHeight(int i) {
if (i == this.f) {
return;
}
this.f = i;
requestLayout();
}
public void setMinWidth(int i) {
if (i == this.e) {
return;
}
this.e = i;
requestLayout();
}
public void setOptimizationLevel(int i) {
this.d.u(i);
}
@Override // android.view.ViewGroup
public boolean shouldDelayChildPressedState() {
return false;
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // android.view.ViewGroup
public LayoutParams generateDefaultLayoutParams() {
return new LayoutParams(-2, -2);
}
@Override // android.view.ViewGroup
public LayoutParams generateLayoutParams(AttributeSet attributeSet) {
return new LayoutParams(getContext(), attributeSet);
}
@Override // android.view.ViewGroup
protected ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams layoutParams) {
return new LayoutParams(layoutParams);
}
private final ConstraintWidget b(int i) {
if (i == 0) {
return this.d;
}
View view = this.a.get(i);
if (view == null && (view = findViewById(i)) != null && view != this && view.getParent() == this) {
onViewAdded(view);
}
if (view == this) {
return this.d;
}
if (view == null) {
return null;
}
return ((LayoutParams) view.getLayoutParams()).k0;
}
private void c(int i, int i2) {
int i3;
ConstraintWidget.DimensionBehaviour dimensionBehaviour;
int mode = View.MeasureSpec.getMode(i);
int size = View.MeasureSpec.getSize(i);
int mode2 = View.MeasureSpec.getMode(i2);
int size2 = View.MeasureSpec.getSize(i2);
int paddingTop = getPaddingTop() + getPaddingBottom();
int paddingLeft = getPaddingLeft() + getPaddingRight();
ConstraintWidget.DimensionBehaviour dimensionBehaviour2 = ConstraintWidget.DimensionBehaviour.FIXED;
getLayoutParams();
if (mode != Integer.MIN_VALUE) {
if (mode == 0) {
dimensionBehaviour = ConstraintWidget.DimensionBehaviour.WRAP_CONTENT;
} else if (mode != 1073741824) {
dimensionBehaviour = dimensionBehaviour2;
} else {
i3 = Math.min(this.g, size) - paddingLeft;
dimensionBehaviour = dimensionBehaviour2;
}
i3 = 0;
} else {
i3 = size;
dimensionBehaviour = ConstraintWidget.DimensionBehaviour.WRAP_CONTENT;
}
if (mode2 != Integer.MIN_VALUE) {
if (mode2 == 0) {
dimensionBehaviour2 = ConstraintWidget.DimensionBehaviour.WRAP_CONTENT;
} else if (mode2 == 1073741824) {
size2 = Math.min(this.h, size2) - paddingTop;
}
size2 = 0;
} else {
dimensionBehaviour2 = ConstraintWidget.DimensionBehaviour.WRAP_CONTENT;
}
this.d.l(0);
this.d.k(0);
this.d.a(dimensionBehaviour);
this.d.o(i3);
this.d.b(dimensionBehaviour2);
this.d.g(size2);
this.d.l((this.e - getPaddingLeft()) - getPaddingRight());
this.d.k((this.f - getPaddingTop()) - getPaddingBottom());
}
public Object a(int i, Object obj) {
if (i != 0 || !(obj instanceof String)) {
return null;
}
String str = (String) obj;
HashMap<String, Integer> hashMap = this.m;
if (hashMap == null || !hashMap.containsKey(str)) {
return null;
}
return this.m.get(str);
}
private void a(AttributeSet attributeSet) {
this.d.a(this);
this.a.put(getId(), this);
this.k = null;
if (attributeSet != null) {
TypedArray obtainStyledAttributes = getContext().obtainStyledAttributes(attributeSet, R$styleable.ConstraintLayout_Layout);
int indexCount = obtainStyledAttributes.getIndexCount();
for (int i = 0; i < indexCount; i++) {
int index = obtainStyledAttributes.getIndex(i);
if (index == R$styleable.ConstraintLayout_Layout_android_minWidth) {
this.e = obtainStyledAttributes.getDimensionPixelOffset(index, this.e);
} else if (index == R$styleable.ConstraintLayout_Layout_android_minHeight) {
this.f = obtainStyledAttributes.getDimensionPixelOffset(index, this.f);
} else if (index == R$styleable.ConstraintLayout_Layout_android_maxWidth) {
this.g = obtainStyledAttributes.getDimensionPixelOffset(index, this.g);
} else if (index == R$styleable.ConstraintLayout_Layout_android_maxHeight) {
this.h = obtainStyledAttributes.getDimensionPixelOffset(index, this.h);
} else if (index == R$styleable.ConstraintLayout_Layout_layout_optimizationLevel) {
this.j = obtainStyledAttributes.getInt(index, this.j);
} else if (index == R$styleable.ConstraintLayout_Layout_constraintSet) {
int resourceId = obtainStyledAttributes.getResourceId(index, 0);
try {
this.k = new ConstraintSet();
this.k.a(getContext(), resourceId);
} catch (Resources.NotFoundException unused) {
this.k = null;
}
this.l = resourceId;
}
}
obtainStyledAttributes.recycle();
}
this.d.u(this.j);
}
/* JADX WARN: Removed duplicated region for block: B:105:0x0204 */
/* JADX WARN: Removed duplicated region for block: B:117:0x0263 */
/* JADX WARN: Removed duplicated region for block: B:120:0x0271 */
/* JADX WARN: Removed duplicated region for block: B:123:0x0279 */
/* JADX WARN: Removed duplicated region for block: B:126:0x028f */
/* JADX WARN: Removed duplicated region for block: B:128:0x0294 */
/* JADX WARN: Removed duplicated region for block: B:130:0x0299 */
/* JADX WARN: Removed duplicated region for block: B:132:0x02aa */
/* JADX WARN: Removed duplicated region for block: B:135:0x02bf */
/* JADX WARN: Removed duplicated region for block: B:140:0x02ca A[ADDED_TO_REGION] */
/* JADX WARN: Removed duplicated region for block: B:142:0x02b2 */
/* JADX WARN: Removed duplicated region for block: B:143:0x02a1 */
/* JADX WARN: Removed duplicated region for block: B:144:0x027b */
/* JADX WARN: Removed duplicated region for block: B:145:0x0273 */
/* JADX WARN: Removed duplicated region for block: B:146:0x026c */
/* JADX WARN: Removed duplicated region for block: B:148:0x023e */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
private void b(int r24, int r25) {
/*
Method dump skipped, instructions count: 737
To view this dump change 'Code comments level' option to 'DEBUG'
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.constraintlayout.widget.ConstraintLayout.b(int, int):void");
}
public ConstraintLayout(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.a = new SparseArray<>();
this.b = new ArrayList<>(4);
this.c = new ArrayList<>(100);
this.d = new ConstraintWidgetContainer();
this.e = 0;
this.f = 0;
this.g = Integer.MAX_VALUE;
this.h = Integer.MAX_VALUE;
this.i = true;
this.j = 7;
this.k = null;
this.l = -1;
this.m = new HashMap<>();
this.n = -1;
this.o = -1;
a(attributeSet);
}
public ConstraintLayout(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
this.a = new SparseArray<>();
this.b = new ArrayList<>(4);
this.c = new ArrayList<>(100);
this.d = new ConstraintWidgetContainer();
this.e = 0;
this.f = 0;
this.g = Integer.MAX_VALUE;
this.h = Integer.MAX_VALUE;
this.i = true;
this.j = 7;
this.k = null;
this.l = -1;
this.m = new HashMap<>();
this.n = -1;
this.o = -1;
a(attributeSet);
}
/* JADX WARN: Code restructure failed: missing block: B:230:0x01d6, code lost:
if (r11 != (-1)) goto L123;
*/
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Removed duplicated region for block: B:137:0x01e3 */
/* JADX WARN: Removed duplicated region for block: B:141:0x0205 */
/* JADX WARN: Removed duplicated region for block: B:152:0x0346 */
/* JADX WARN: Removed duplicated region for block: B:157:0x037c */
/* JADX WARN: Removed duplicated region for block: B:162:0x03b4 */
/* JADX WARN: Removed duplicated region for block: B:166:0x03a5 */
/* JADX WARN: Removed duplicated region for block: B:168:0x036e */
/* JADX WARN: Removed duplicated region for block: B:169:0x0214 */
/* JADX WARN: Removed duplicated region for block: B:225:0x01e7 */
/* JADX WARN: Type inference failed for: r26v0, types: [android.view.ViewGroup, androidx.constraintlayout.widget.ConstraintLayout] */
/* JADX WARN: Type inference failed for: r3v0 */
/* JADX WARN: Type inference failed for: r3v1, types: [boolean, int] */
/* JADX WARN: Type inference failed for: r3v2 */
/* JADX WARN: Type inference failed for: r3v27 */
/* JADX WARN: Type inference failed for: r3v28 */
/* JADX WARN: Type inference failed for: r3v31 */
/* JADX WARN: Type inference failed for: r3v37 */
/* JADX WARN: Type inference failed for: r3v56 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
private void a() {
/*
Method dump skipped, instructions count: 998
To view this dump change 'Code comments level' option to 'DEBUG'
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.constraintlayout.widget.ConstraintLayout.a():void");
}
public static class LayoutParams extends ViewGroup.MarginLayoutParams {
public float A;
public String B;
int C;
public float D;
public float E;
public int F;
public int G;
public int H;
public int I;
public int J;
public int K;
public int L;
public int M;
public float N;
public float O;
public int P;
public int Q;
public int R;
public boolean S;
public boolean T;
boolean U;
boolean V;
boolean W;
boolean X;
boolean Y;
boolean Z;
public int a;
int a0;
public int b;
int b0;
public float c;
int c0;
public int d;
int d0;
public int e;
int e0;
public int f;
int f0;
public int g;
float g0;
public int h;
int h0;
public int i;
int i0;
public int j;
float j0;
public int k;
ConstraintWidget k0;
public int l;
public boolean l0;
public int m;
public int n;
public float o;
public int p;
public int q;
public int r;
public int s;
public int t;
public int u;
public int v;
public int w;
public int x;
public int y;
public float z;
private static class Table {
public static final SparseIntArray a = new SparseIntArray();
static {
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintLeft_toLeftOf, 8);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintLeft_toRightOf, 9);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintRight_toLeftOf, 10);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintRight_toRightOf, 11);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintTop_toTopOf, 12);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintTop_toBottomOf, 13);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintBottom_toTopOf, 14);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintBottom_toBottomOf, 15);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintBaseline_toBaselineOf, 16);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintCircle, 2);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintCircleRadius, 3);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintCircleAngle, 4);
a.append(R$styleable.ConstraintLayout_Layout_layout_editor_absoluteX, 49);
a.append(R$styleable.ConstraintLayout_Layout_layout_editor_absoluteY, 50);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintGuide_begin, 5);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintGuide_end, 6);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintGuide_percent, 7);
a.append(R$styleable.ConstraintLayout_Layout_android_orientation, 1);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintStart_toEndOf, 17);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintStart_toStartOf, 18);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintEnd_toStartOf, 19);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintEnd_toEndOf, 20);
a.append(R$styleable.ConstraintLayout_Layout_layout_goneMarginLeft, 21);
a.append(R$styleable.ConstraintLayout_Layout_layout_goneMarginTop, 22);
a.append(R$styleable.ConstraintLayout_Layout_layout_goneMarginRight, 23);
a.append(R$styleable.ConstraintLayout_Layout_layout_goneMarginBottom, 24);
a.append(R$styleable.ConstraintLayout_Layout_layout_goneMarginStart, 25);
a.append(R$styleable.ConstraintLayout_Layout_layout_goneMarginEnd, 26);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintHorizontal_bias, 29);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintVertical_bias, 30);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintDimensionRatio, 44);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintHorizontal_weight, 45);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintVertical_weight, 46);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintHorizontal_chainStyle, 47);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintVertical_chainStyle, 48);
a.append(R$styleable.ConstraintLayout_Layout_layout_constrainedWidth, 27);
a.append(R$styleable.ConstraintLayout_Layout_layout_constrainedHeight, 28);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintWidth_default, 31);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintHeight_default, 32);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintWidth_min, 33);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintWidth_max, 34);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintWidth_percent, 35);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintHeight_min, 36);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintHeight_max, 37);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintHeight_percent, 38);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintLeft_creator, 39);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintTop_creator, 40);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintRight_creator, 41);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintBottom_creator, 42);
a.append(R$styleable.ConstraintLayout_Layout_layout_constraintBaseline_creator, 43);
}
}
public LayoutParams(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
int i;
this.a = -1;
this.b = -1;
this.c = -1.0f;
this.d = -1;
this.e = -1;
this.f = -1;
this.g = -1;
this.h = -1;
this.i = -1;
this.j = -1;
this.k = -1;
this.l = -1;
this.m = -1;
this.n = 0;
this.o = 0.0f;
this.p = -1;
this.q = -1;
this.r = -1;
this.s = -1;
this.t = -1;
this.u = -1;
this.v = -1;
this.w = -1;
this.x = -1;
this.y = -1;
this.z = 0.5f;
this.A = 0.5f;
this.B = null;
this.C = 1;
this.D = -1.0f;
this.E = -1.0f;
this.F = 0;
this.G = 0;
this.H = 0;
this.I = 0;
this.J = 0;
this.K = 0;
this.L = 0;
this.M = 0;
this.N = 1.0f;
this.O = 1.0f;
this.P = -1;
this.Q = -1;
this.R = -1;
this.S = false;
this.T = false;
this.U = true;
this.V = true;
this.W = false;
this.X = false;
this.Y = false;
this.Z = false;
this.a0 = -1;
this.b0 = -1;
this.c0 = -1;
this.d0 = -1;
this.e0 = -1;
this.f0 = -1;
this.g0 = 0.5f;
this.k0 = new ConstraintWidget();
this.l0 = false;
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, R$styleable.ConstraintLayout_Layout);
int indexCount = obtainStyledAttributes.getIndexCount();
for (int i2 = 0; i2 < indexCount; i2++) {
int index = obtainStyledAttributes.getIndex(i2);
switch (Table.a.get(index)) {
case 1:
this.R = obtainStyledAttributes.getInt(index, this.R);
break;
case 2:
this.m = obtainStyledAttributes.getResourceId(index, this.m);
if (this.m == -1) {
this.m = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 3:
this.n = obtainStyledAttributes.getDimensionPixelSize(index, this.n);
break;
case 4:
this.o = obtainStyledAttributes.getFloat(index, this.o) % 360.0f;
float f = this.o;
if (f < 0.0f) {
this.o = (360.0f - f) % 360.0f;
break;
} else {
break;
}
case 5:
this.a = obtainStyledAttributes.getDimensionPixelOffset(index, this.a);
break;
case 6:
this.b = obtainStyledAttributes.getDimensionPixelOffset(index, this.b);
break;
case 7:
this.c = obtainStyledAttributes.getFloat(index, this.c);
break;
case 8:
this.d = obtainStyledAttributes.getResourceId(index, this.d);
if (this.d == -1) {
this.d = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 9:
this.e = obtainStyledAttributes.getResourceId(index, this.e);
if (this.e == -1) {
this.e = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 10:
this.f = obtainStyledAttributes.getResourceId(index, this.f);
if (this.f == -1) {
this.f = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 11:
this.g = obtainStyledAttributes.getResourceId(index, this.g);
if (this.g == -1) {
this.g = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 12:
this.h = obtainStyledAttributes.getResourceId(index, this.h);
if (this.h == -1) {
this.h = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 13:
this.i = obtainStyledAttributes.getResourceId(index, this.i);
if (this.i == -1) {
this.i = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 14:
this.j = obtainStyledAttributes.getResourceId(index, this.j);
if (this.j == -1) {
this.j = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 15:
this.k = obtainStyledAttributes.getResourceId(index, this.k);
if (this.k == -1) {
this.k = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 16:
this.l = obtainStyledAttributes.getResourceId(index, this.l);
if (this.l == -1) {
this.l = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 17:
this.p = obtainStyledAttributes.getResourceId(index, this.p);
if (this.p == -1) {
this.p = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 18:
this.q = obtainStyledAttributes.getResourceId(index, this.q);
if (this.q == -1) {
this.q = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 19:
this.r = obtainStyledAttributes.getResourceId(index, this.r);
if (this.r == -1) {
this.r = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 20:
this.s = obtainStyledAttributes.getResourceId(index, this.s);
if (this.s == -1) {
this.s = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 21:
this.t = obtainStyledAttributes.getDimensionPixelSize(index, this.t);
break;
case 22:
this.u = obtainStyledAttributes.getDimensionPixelSize(index, this.u);
break;
case 23:
this.v = obtainStyledAttributes.getDimensionPixelSize(index, this.v);
break;
case 24:
this.w = obtainStyledAttributes.getDimensionPixelSize(index, this.w);
break;
case 25:
this.x = obtainStyledAttributes.getDimensionPixelSize(index, this.x);
break;
case 26:
this.y = obtainStyledAttributes.getDimensionPixelSize(index, this.y);
break;
case 27:
this.S = obtainStyledAttributes.getBoolean(index, this.S);
break;
case 28:
this.T = obtainStyledAttributes.getBoolean(index, this.T);
break;
case 29:
this.z = obtainStyledAttributes.getFloat(index, this.z);
break;
case 30:
this.A = obtainStyledAttributes.getFloat(index, this.A);
break;
case 31:
this.H = obtainStyledAttributes.getInt(index, 0);
if (this.H == 1) {
Log.e("ConstraintLayout", "layout_constraintWidth_default=\"wrap\" is deprecated.\nUse layout_width=\"WRAP_CONTENT\" and layout_constrainedWidth=\"true\" instead.");
break;
} else {
break;
}
case 32:
this.I = obtainStyledAttributes.getInt(index, 0);
if (this.I == 1) {
Log.e("ConstraintLayout", "layout_constraintHeight_default=\"wrap\" is deprecated.\nUse layout_height=\"WRAP_CONTENT\" and layout_constrainedHeight=\"true\" instead.");
break;
} else {
break;
}
case 33:
try {
this.J = obtainStyledAttributes.getDimensionPixelSize(index, this.J);
break;
} catch (Exception unused) {
if (obtainStyledAttributes.getInt(index, this.J) == -2) {
this.J = -2;
break;
} else {
break;
}
}
case 34:
try {
this.L = obtainStyledAttributes.getDimensionPixelSize(index, this.L);
break;
} catch (Exception unused2) {
if (obtainStyledAttributes.getInt(index, this.L) == -2) {
this.L = -2;
break;
} else {
break;
}
}
case 35:
this.N = Math.max(0.0f, obtainStyledAttributes.getFloat(index, this.N));
break;
case 36:
try {
this.K = obtainStyledAttributes.getDimensionPixelSize(index, this.K);
break;
} catch (Exception unused3) {
if (obtainStyledAttributes.getInt(index, this.K) == -2) {
this.K = -2;
break;
} else {
break;
}
}
case 37:
try {
this.M = obtainStyledAttributes.getDimensionPixelSize(index, this.M);
break;
} catch (Exception unused4) {
if (obtainStyledAttributes.getInt(index, this.M) == -2) {
this.M = -2;
break;
} else {
break;
}
}
case 38:
this.O = Math.max(0.0f, obtainStyledAttributes.getFloat(index, this.O));
break;
case 44:
this.B = obtainStyledAttributes.getString(index);
this.C = -1;
String str = this.B;
if (str != null) {
int length = str.length();
int indexOf = this.B.indexOf(44);
if (indexOf <= 0 || indexOf >= length - 1) {
i = 0;
} else {
String substring = this.B.substring(0, indexOf);
if (substring.equalsIgnoreCase("W")) {
this.C = 0;
} else if (substring.equalsIgnoreCase("H")) {
this.C = 1;
}
i = indexOf + 1;
}
int indexOf2 = this.B.indexOf(58);
if (indexOf2 < 0 || indexOf2 >= length - 1) {
String substring2 = this.B.substring(i);
if (substring2.length() > 0) {
Float.parseFloat(substring2);
break;
} else {
break;
}
} else {
String substring3 = this.B.substring(i, indexOf2);
String substring4 = this.B.substring(indexOf2 + 1);
if (substring3.length() > 0 && substring4.length() > 0) {
try {
float parseFloat = Float.parseFloat(substring3);
float parseFloat2 = Float.parseFloat(substring4);
if (parseFloat > 0.0f && parseFloat2 > 0.0f) {
if (this.C == 1) {
Math.abs(parseFloat2 / parseFloat);
break;
} else {
Math.abs(parseFloat / parseFloat2);
break;
}
}
} catch (NumberFormatException unused5) {
break;
}
}
}
} else {
break;
}
break;
case 45:
this.D = obtainStyledAttributes.getFloat(index, this.D);
break;
case 46:
this.E = obtainStyledAttributes.getFloat(index, this.E);
break;
case 47:
this.F = obtainStyledAttributes.getInt(index, 0);
break;
case 48:
this.G = obtainStyledAttributes.getInt(index, 0);
break;
case 49:
this.P = obtainStyledAttributes.getDimensionPixelOffset(index, this.P);
break;
case 50:
this.Q = obtainStyledAttributes.getDimensionPixelOffset(index, this.Q);
break;
}
}
obtainStyledAttributes.recycle();
a();
}
public void a() {
this.X = false;
this.U = true;
this.V = true;
if (((ViewGroup.MarginLayoutParams) this).width == -2 && this.S) {
this.U = false;
this.H = 1;
}
if (((ViewGroup.MarginLayoutParams) this).height == -2 && this.T) {
this.V = false;
this.I = 1;
}
if (((ViewGroup.MarginLayoutParams) this).width == 0 || ((ViewGroup.MarginLayoutParams) this).width == -1) {
this.U = false;
if (((ViewGroup.MarginLayoutParams) this).width == 0 && this.H == 1) {
((ViewGroup.MarginLayoutParams) this).width = -2;
this.S = true;
}
}
if (((ViewGroup.MarginLayoutParams) this).height == 0 || ((ViewGroup.MarginLayoutParams) this).height == -1) {
this.V = false;
if (((ViewGroup.MarginLayoutParams) this).height == 0 && this.I == 1) {
((ViewGroup.MarginLayoutParams) this).height = -2;
this.T = true;
}
}
if (this.c == -1.0f && this.a == -1 && this.b == -1) {
return;
}
this.X = true;
this.U = true;
this.V = true;
if (!(this.k0 instanceof androidx.constraintlayout.solver.widgets.Guideline)) {
this.k0 = new androidx.constraintlayout.solver.widgets.Guideline();
}
((androidx.constraintlayout.solver.widgets.Guideline) this.k0).v(this.R);
}
/* JADX WARN: Removed duplicated region for block: B:11:0x004c */
/* JADX WARN: Removed duplicated region for block: B:14:0x0053 */
/* JADX WARN: Removed duplicated region for block: B:17:0x005a */
/* JADX WARN: Removed duplicated region for block: B:20:0x0060 */
/* JADX WARN: Removed duplicated region for block: B:23:0x0066 */
/* JADX WARN: Removed duplicated region for block: B:30:0x007c */
/* JADX WARN: Removed duplicated region for block: B:31:0x0084 */
@Override // android.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.LayoutParams
@android.annotation.TargetApi(17)
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
public void resolveLayoutDirection(int r7) {
/*
Method dump skipped, instructions count: 265
To view this dump change 'Code comments level' option to 'DEBUG'
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.constraintlayout.widget.ConstraintLayout.LayoutParams.resolveLayoutDirection(int):void");
}
public LayoutParams(int i, int i2) {
super(i, i2);
this.a = -1;
this.b = -1;
this.c = -1.0f;
this.d = -1;
this.e = -1;
this.f = -1;
this.g = -1;
this.h = -1;
this.i = -1;
this.j = -1;
this.k = -1;
this.l = -1;
this.m = -1;
this.n = 0;
this.o = 0.0f;
this.p = -1;
this.q = -1;
this.r = -1;
this.s = -1;
this.t = -1;
this.u = -1;
this.v = -1;
this.w = -1;
this.x = -1;
this.y = -1;
this.z = 0.5f;
this.A = 0.5f;
this.B = null;
this.C = 1;
this.D = -1.0f;
this.E = -1.0f;
this.F = 0;
this.G = 0;
this.H = 0;
this.I = 0;
this.J = 0;
this.K = 0;
this.L = 0;
this.M = 0;
this.N = 1.0f;
this.O = 1.0f;
this.P = -1;
this.Q = -1;
this.R = -1;
this.S = false;
this.T = false;
this.U = true;
this.V = true;
this.W = false;
this.X = false;
this.Y = false;
this.Z = false;
this.a0 = -1;
this.b0 = -1;
this.c0 = -1;
this.d0 = -1;
this.e0 = -1;
this.f0 = -1;
this.g0 = 0.5f;
this.k0 = new ConstraintWidget();
this.l0 = false;
}
public LayoutParams(ViewGroup.LayoutParams layoutParams) {
super(layoutParams);
this.a = -1;
this.b = -1;
this.c = -1.0f;
this.d = -1;
this.e = -1;
this.f = -1;
this.g = -1;
this.h = -1;
this.i = -1;
this.j = -1;
this.k = -1;
this.l = -1;
this.m = -1;
this.n = 0;
this.o = 0.0f;
this.p = -1;
this.q = -1;
this.r = -1;
this.s = -1;
this.t = -1;
this.u = -1;
this.v = -1;
this.w = -1;
this.x = -1;
this.y = -1;
this.z = 0.5f;
this.A = 0.5f;
this.B = null;
this.C = 1;
this.D = -1.0f;
this.E = -1.0f;
this.F = 0;
this.G = 0;
this.H = 0;
this.I = 0;
this.J = 0;
this.K = 0;
this.L = 0;
this.M = 0;
this.N = 1.0f;
this.O = 1.0f;
this.P = -1;
this.Q = -1;
this.R = -1;
this.S = false;
this.T = false;
this.U = true;
this.V = true;
this.W = false;
this.X = false;
this.Y = false;
this.Z = false;
this.a0 = -1;
this.b0 = -1;
this.c0 = -1;
this.d0 = -1;
this.e0 = -1;
this.f0 = -1;
this.g0 = 0.5f;
this.k0 = new ConstraintWidget();
this.l0 = false;
}
}
public final ConstraintWidget a(View view) {
if (view == this) {
return this.d;
}
if (view == null) {
return null;
}
return ((LayoutParams) view.getLayoutParams()).k0;
}
private void a(int i, int i2) {
boolean z;
boolean z2;
int baseline;
int childMeasureSpec;
int childMeasureSpec2;
int paddingTop = getPaddingTop() + getPaddingBottom();
int paddingLeft = getPaddingLeft() + getPaddingRight();
int childCount = getChildCount();
for (int i3 = 0; i3 < childCount; i3++) {
View childAt = getChildAt(i3);
if (childAt.getVisibility() != 8) {
LayoutParams layoutParams = (LayoutParams) childAt.getLayoutParams();
ConstraintWidget constraintWidget = layoutParams.k0;
if (!layoutParams.X && !layoutParams.Y) {
constraintWidget.n(childAt.getVisibility());
int i4 = ((ViewGroup.MarginLayoutParams) layoutParams).width;
int i5 = ((ViewGroup.MarginLayoutParams) layoutParams).height;
boolean z3 = layoutParams.U;
if (z3 || layoutParams.V || (!z3 && layoutParams.H == 1) || ((ViewGroup.MarginLayoutParams) layoutParams).width == -1 || (!layoutParams.V && (layoutParams.I == 1 || ((ViewGroup.MarginLayoutParams) layoutParams).height == -1))) {
if (i4 == 0) {
childMeasureSpec = ViewGroup.getChildMeasureSpec(i, paddingLeft, -2);
z = true;
} else if (i4 == -1) {
childMeasureSpec = ViewGroup.getChildMeasureSpec(i, paddingLeft, -1);
z = false;
} else {
z = i4 == -2;
childMeasureSpec = ViewGroup.getChildMeasureSpec(i, paddingLeft, i4);
}
if (i5 == 0) {
childMeasureSpec2 = ViewGroup.getChildMeasureSpec(i2, paddingTop, -2);
z2 = true;
} else if (i5 == -1) {
childMeasureSpec2 = ViewGroup.getChildMeasureSpec(i2, paddingTop, -1);
z2 = false;
} else {
z2 = i5 == -2;
childMeasureSpec2 = ViewGroup.getChildMeasureSpec(i2, paddingTop, i5);
}
childAt.measure(childMeasureSpec, childMeasureSpec2);
Metrics metrics = this.p;
if (metrics != null) {
metrics.a++;
}
constraintWidget.b(i4 == -2);
constraintWidget.a(i5 == -2);
i4 = childAt.getMeasuredWidth();
i5 = childAt.getMeasuredHeight();
} else {
z = false;
z2 = false;
}
constraintWidget.o(i4);
constraintWidget.g(i5);
if (z) {
constraintWidget.q(i4);
}
if (z2) {
constraintWidget.p(i5);
}
if (layoutParams.W && (baseline = childAt.getBaseline()) != -1) {
constraintWidget.f(baseline);
}
}
}
}
}
protected void a(String str) {
this.d.K();
Metrics metrics = this.p;
if (metrics != null) {
metrics.c++;
}
}
public View a(int i) {
return this.a.get(i);
}
}