package androidx.constraintlayout.solver.widgets; import androidx.constraintlayout.solver.Cache; import androidx.constraintlayout.solver.LinearSystem; import androidx.constraintlayout.solver.SolverVariable; import androidx.constraintlayout.solver.widgets.ConstraintAnchor; import androidx.constraintlayout.solver.widgets.analyzer.ChainRun; import androidx.constraintlayout.solver.widgets.analyzer.HorizontalWidgetRun; import androidx.constraintlayout.solver.widgets.analyzer.VerticalWidgetRun; import androidx.constraintlayout.solver.widgets.analyzer.WidgetRun; import androidx.exifinterface.media.ExifInterface; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; /* loaded from: classes.dex */ public class ConstraintWidget { public static final int ANCHOR_BASELINE = 4; public static final int ANCHOR_BOTTOM = 3; public static final int ANCHOR_LEFT = 0; public static final int ANCHOR_RIGHT = 1; public static final int ANCHOR_TOP = 2; private static final boolean AUTOTAG_CENTER = false; public static final int CHAIN_PACKED = 2; public static final int CHAIN_SPREAD = 0; public static final int CHAIN_SPREAD_INSIDE = 1; public static float DEFAULT_BIAS = 0.5f; static final int DIMENSION_HORIZONTAL = 0; static final int DIMENSION_VERTICAL = 1; protected static final int DIRECT = 2; public static final int GONE = 8; public static final int HORIZONTAL = 0; public static final int INVISIBLE = 4; public static final int MATCH_CONSTRAINT_PERCENT = 2; public static final int MATCH_CONSTRAINT_RATIO = 3; public static final int MATCH_CONSTRAINT_RATIO_RESOLVED = 4; public static final int MATCH_CONSTRAINT_SPREAD = 0; public static final int MATCH_CONSTRAINT_WRAP = 1; protected static final int SOLVER = 1; public static final int UNKNOWN = -1; private static final boolean USE_WRAP_DIMENSION_FOR_SPREAD = false; public static final int VERTICAL = 1; public static final int VISIBLE = 0; private static final int WRAP = -2; private boolean hasBaseline; public ChainRun horizontalChainRun; public HorizontalWidgetRun horizontalRun; private boolean inPlaceholder; public boolean[] isTerminalWidget; protected ArrayList mAnchors; ConstraintAnchor mBaseline; int mBaselineDistance; public ConstraintAnchor mBottom; boolean mBottomHasCentered; ConstraintAnchor mCenter; ConstraintAnchor mCenterX; ConstraintAnchor mCenterY; private float mCircleConstraintAngle; private Object mCompanionWidget; private int mContainerItemSkip; private String mDebugName; public float mDimensionRatio; protected int mDimensionRatioSide; int mDistToBottom; int mDistToLeft; int mDistToRight; int mDistToTop; boolean mGroupsToSolver; int mHeight; float mHorizontalBiasPercent; boolean mHorizontalChainFixedPosition; int mHorizontalChainStyle; ConstraintWidget mHorizontalNextWidget; public int mHorizontalResolution; boolean mHorizontalWrapVisited; private boolean mInVirtuaLayout; public boolean mIsHeightWrapContent; private boolean[] mIsInBarrier; public boolean mIsWidthWrapContent; public ConstraintAnchor mLeft; boolean mLeftHasCentered; public ConstraintAnchor[] mListAnchors; public DimensionBehaviour[] mListDimensionBehaviors; protected ConstraintWidget[] mListNextMatchConstraintsWidget; public int mMatchConstraintDefaultHeight; public int mMatchConstraintDefaultWidth; public int mMatchConstraintMaxHeight; public int mMatchConstraintMaxWidth; public int mMatchConstraintMinHeight; public int mMatchConstraintMinWidth; public float mMatchConstraintPercentHeight; public float mMatchConstraintPercentWidth; private int[] mMaxDimension; protected int mMinHeight; protected int mMinWidth; protected ConstraintWidget[] mNextChainWidget; protected int mOffsetX; protected int mOffsetY; boolean mOptimizerMeasurable; public ConstraintWidget mParent; int mRelX; int mRelY; float mResolvedDimensionRatio; int mResolvedDimensionRatioSide; boolean mResolvedHasRatio; public int[] mResolvedMatchConstraintDefault; public ConstraintAnchor mRight; boolean mRightHasCentered; public ConstraintAnchor mTop; boolean mTopHasCentered; private String mType; float mVerticalBiasPercent; boolean mVerticalChainFixedPosition; int mVerticalChainStyle; ConstraintWidget mVerticalNextWidget; public int mVerticalResolution; boolean mVerticalWrapVisited; private int mVisibility; public float[] mWeight; int mWidth; protected int mX; protected int mY; public boolean measured; public WidgetRun[] run; public ChainRun verticalChainRun; public VerticalWidgetRun verticalRun; public int[] wrapMeasure; /* loaded from: classes.dex */ public enum DimensionBehaviour { FIXED, WRAP_CONTENT, MATCH_CONSTRAINT, MATCH_PARENT } public boolean allowedInBarrier() { return this.mVisibility != 8; } public ArrayList getAnchors() { return this.mAnchors; } public int getBaselineDistance() { return this.mBaselineDistance; } public float getBiasPercent(int i) { if (i == 0) { return this.mHorizontalBiasPercent; } if (i == 1) { return this.mVerticalBiasPercent; } return -1.0f; } public Object getCompanionWidget() { return this.mCompanionWidget; } public int getContainerItemSkip() { return this.mContainerItemSkip; } public String getDebugName() { return this.mDebugName; } public float getDimensionRatio() { return this.mDimensionRatio; } public int getDimensionRatioSide() { return this.mDimensionRatioSide; } public boolean getHasBaseline() { return this.hasBaseline; } public int getHeight() { if (this.mVisibility == 8) { return 0; } return this.mHeight; } public float getHorizontalBiasPercent() { return this.mHorizontalBiasPercent; } public int getHorizontalChainStyle() { return this.mHorizontalChainStyle; } public int getMinHeight() { return this.mMinHeight; } public int getMinWidth() { return this.mMinWidth; } public ConstraintWidget getParent() { return this.mParent; } int getRelativePositioning(int i) { if (i == 0) { return this.mRelX; } if (i == 1) { return this.mRelY; } return 0; } /* JADX INFO: Access modifiers changed from: protected */ public int getRootX() { return this.mX + this.mOffsetX; } /* JADX INFO: Access modifiers changed from: protected */ public int getRootY() { return this.mY + this.mOffsetY; } public WidgetRun getRun(int i) { if (i == 0) { return this.horizontalRun; } if (i == 1) { return this.verticalRun; } return null; } public String getType() { return this.mType; } public float getVerticalBiasPercent() { return this.mVerticalBiasPercent; } public int getVerticalChainStyle() { return this.mVerticalChainStyle; } public int getVisibility() { return this.mVisibility; } public int getWidth() { if (this.mVisibility == 8) { return 0; } return this.mWidth; } public boolean hasBaseline() { return this.hasBaseline; } public boolean isHeightWrapContent() { return this.mIsHeightWrapContent; } public boolean isInPlaceholder() { return this.inPlaceholder; } public boolean isInVirtualLayout() { return this.mInVirtuaLayout; } public boolean isRoot() { return this.mParent == null; } public boolean isWidthWrapContent() { return this.mIsWidthWrapContent; } public void setBaselineDistance(int i) { this.mBaselineDistance = i; this.hasBaseline = i > 0; } public void setCompanionWidget(Object obj) { this.mCompanionWidget = obj; } public void setContainerItemSkip(int i) { if (i >= 0) { this.mContainerItemSkip = i; } else { this.mContainerItemSkip = 0; } } public void setDebugName(String str) { this.mDebugName = str; } public void setDimension(int i, int i2) { this.mWidth = i; int i3 = this.mMinWidth; if (i < i3) { this.mWidth = i3; } this.mHeight = i2; int i4 = this.mMinHeight; if (i2 < i4) { this.mHeight = i4; } } public void setDimensionRatio(float f, int i) { this.mDimensionRatio = f; this.mDimensionRatioSide = i; } public void setHasBaseline(boolean z) { this.hasBaseline = z; } public void setHeight(int i) { this.mHeight = i; int i2 = this.mMinHeight; if (i < i2) { this.mHeight = i2; } } public void setHeightWrapContent(boolean z) { this.mIsHeightWrapContent = z; } public void setHorizontalBiasPercent(float f) { this.mHorizontalBiasPercent = f; } public void setHorizontalChainStyle(int i) { this.mHorizontalChainStyle = i; } public void setHorizontalDimension(int i, int i2) { this.mX = i; int i3 = i2 - i; this.mWidth = i3; int i4 = this.mMinWidth; if (i3 < i4) { this.mWidth = i4; } } public void setHorizontalMatchStyle(int i, int i2, int i3, float f) { this.mMatchConstraintDefaultWidth = i; this.mMatchConstraintMinWidth = i2; if (i3 == Integer.MAX_VALUE) { i3 = 0; } this.mMatchConstraintMaxWidth = i3; this.mMatchConstraintPercentWidth = f; if (f <= 0.0f || f >= 1.0f || i != 0) { return; } this.mMatchConstraintDefaultWidth = 2; } public void setInPlaceholder(boolean z) { this.inPlaceholder = z; } public void setInVirtualLayout(boolean z) { this.mInVirtuaLayout = z; } public void setMinHeight(int i) { if (i < 0) { this.mMinHeight = 0; } else { this.mMinHeight = i; } } public void setMinWidth(int i) { if (i < 0) { this.mMinWidth = 0; } else { this.mMinWidth = i; } } public void setOffset(int i, int i2) { this.mOffsetX = i; this.mOffsetY = i2; } public void setOrigin(int i, int i2) { this.mX = i; this.mY = i2; } public void setParent(ConstraintWidget constraintWidget) { this.mParent = constraintWidget; } void setRelativePositioning(int i, int i2) { if (i2 == 0) { this.mRelX = i; } else if (i2 == 1) { this.mRelY = i; } } public void setType(String str) { this.mType = str; } public void setVerticalBiasPercent(float f) { this.mVerticalBiasPercent = f; } public void setVerticalChainStyle(int i) { this.mVerticalChainStyle = i; } public void setVerticalDimension(int i, int i2) { this.mY = i; int i3 = i2 - i; this.mHeight = i3; int i4 = this.mMinHeight; if (i3 < i4) { this.mHeight = i4; } } public void setVerticalMatchStyle(int i, int i2, int i3, float f) { this.mMatchConstraintDefaultHeight = i; this.mMatchConstraintMinHeight = i2; if (i3 == Integer.MAX_VALUE) { i3 = 0; } this.mMatchConstraintMaxHeight = i3; this.mMatchConstraintPercentHeight = f; if (f <= 0.0f || f >= 1.0f || i != 0) { return; } this.mMatchConstraintDefaultHeight = 2; } public void setVisibility(int i) { this.mVisibility = i; } public void setWidth(int i) { this.mWidth = i; int i2 = this.mMinWidth; if (i < i2) { this.mWidth = i2; } } public void setWidthWrapContent(boolean z) { this.mIsWidthWrapContent = z; } public void setX(int i) { this.mX = i; } public void setY(int i) { this.mY = i; } public int getMaxHeight() { return this.mMaxDimension[1]; } public int getMaxWidth() { return this.mMaxDimension[0]; } public void setMaxWidth(int i) { this.mMaxDimension[0] = i; } public void setMaxHeight(int i) { this.mMaxDimension[1] = i; } public boolean isSpreadWidth() { return this.mMatchConstraintDefaultWidth == 0 && this.mDimensionRatio == 0.0f && this.mMatchConstraintMinWidth == 0 && this.mMatchConstraintMaxWidth == 0 && this.mListDimensionBehaviors[0] == DimensionBehaviour.MATCH_CONSTRAINT; } public boolean isSpreadHeight() { return this.mMatchConstraintDefaultHeight == 0 && this.mDimensionRatio == 0.0f && this.mMatchConstraintMinHeight == 0 && this.mMatchConstraintMaxHeight == 0 && this.mListDimensionBehaviors[1] == DimensionBehaviour.MATCH_CONSTRAINT; } /* JADX INFO: Access modifiers changed from: protected */ public void setInBarrier(int i, boolean z) { this.mIsInBarrier[i] = z; } public void reset() { this.mLeft.reset(); this.mTop.reset(); this.mRight.reset(); this.mBottom.reset(); this.mBaseline.reset(); this.mCenterX.reset(); this.mCenterY.reset(); this.mCenter.reset(); this.mParent = null; this.mCircleConstraintAngle = 0.0f; this.mWidth = 0; this.mHeight = 0; this.mDimensionRatio = 0.0f; this.mDimensionRatioSide = -1; this.mX = 0; this.mY = 0; this.mOffsetX = 0; this.mOffsetY = 0; this.mBaselineDistance = 0; this.mMinWidth = 0; this.mMinHeight = 0; float f = DEFAULT_BIAS; this.mHorizontalBiasPercent = f; this.mVerticalBiasPercent = f; this.mListDimensionBehaviors[0] = DimensionBehaviour.FIXED; this.mListDimensionBehaviors[1] = DimensionBehaviour.FIXED; this.mCompanionWidget = null; this.mContainerItemSkip = 0; this.mVisibility = 0; this.mType = null; this.mHorizontalWrapVisited = false; this.mVerticalWrapVisited = false; this.mHorizontalChainStyle = 0; this.mVerticalChainStyle = 0; this.mHorizontalChainFixedPosition = false; this.mVerticalChainFixedPosition = false; float[] fArr = this.mWeight; fArr[0] = -1.0f; fArr[1] = -1.0f; this.mHorizontalResolution = -1; this.mVerticalResolution = -1; int[] iArr = this.mMaxDimension; iArr[0] = Integer.MAX_VALUE; iArr[1] = Integer.MAX_VALUE; this.mMatchConstraintDefaultWidth = 0; this.mMatchConstraintDefaultHeight = 0; this.mMatchConstraintPercentWidth = 1.0f; this.mMatchConstraintPercentHeight = 1.0f; this.mMatchConstraintMaxWidth = Integer.MAX_VALUE; this.mMatchConstraintMaxHeight = Integer.MAX_VALUE; this.mMatchConstraintMinWidth = 0; this.mMatchConstraintMinHeight = 0; this.mResolvedHasRatio = false; this.mResolvedDimensionRatioSide = -1; this.mResolvedDimensionRatio = 1.0f; this.mOptimizerMeasurable = false; this.mGroupsToSolver = false; boolean[] zArr = this.isTerminalWidget; zArr[0] = true; zArr[1] = true; this.mInVirtuaLayout = false; boolean[] zArr2 = this.mIsInBarrier; zArr2[0] = false; zArr2[1] = false; } public ConstraintWidget() { this.measured = false; this.run = new WidgetRun[2]; this.horizontalRun = new HorizontalWidgetRun(this); this.verticalRun = new VerticalWidgetRun(this); this.isTerminalWidget = new boolean[]{true, true}; this.wrapMeasure = new int[]{0, 0, 0, 0}; this.mResolvedHasRatio = false; this.mHorizontalResolution = -1; this.mVerticalResolution = -1; this.mMatchConstraintDefaultWidth = 0; this.mMatchConstraintDefaultHeight = 0; this.mResolvedMatchConstraintDefault = new int[2]; this.mMatchConstraintMinWidth = 0; this.mMatchConstraintMaxWidth = 0; this.mMatchConstraintPercentWidth = 1.0f; this.mMatchConstraintMinHeight = 0; this.mMatchConstraintMaxHeight = 0; this.mMatchConstraintPercentHeight = 1.0f; this.mResolvedDimensionRatioSide = -1; this.mResolvedDimensionRatio = 1.0f; this.mMaxDimension = new int[]{Integer.MAX_VALUE, Integer.MAX_VALUE}; this.mCircleConstraintAngle = 0.0f; this.hasBaseline = false; this.mInVirtuaLayout = false; this.mLeft = new ConstraintAnchor(this, ConstraintAnchor.Type.LEFT); this.mTop = new ConstraintAnchor(this, ConstraintAnchor.Type.TOP); this.mRight = new ConstraintAnchor(this, ConstraintAnchor.Type.RIGHT); this.mBottom = new ConstraintAnchor(this, ConstraintAnchor.Type.BOTTOM); this.mBaseline = new ConstraintAnchor(this, ConstraintAnchor.Type.BASELINE); this.mCenterX = new ConstraintAnchor(this, ConstraintAnchor.Type.CENTER_X); this.mCenterY = new ConstraintAnchor(this, ConstraintAnchor.Type.CENTER_Y); ConstraintAnchor constraintAnchor = new ConstraintAnchor(this, ConstraintAnchor.Type.CENTER); this.mCenter = constraintAnchor; this.mListAnchors = new ConstraintAnchor[]{this.mLeft, this.mRight, this.mTop, this.mBottom, this.mBaseline, constraintAnchor}; this.mAnchors = new ArrayList<>(); this.mIsInBarrier = new boolean[2]; this.mListDimensionBehaviors = new DimensionBehaviour[]{DimensionBehaviour.FIXED, DimensionBehaviour.FIXED}; this.mParent = null; this.mWidth = 0; this.mHeight = 0; this.mDimensionRatio = 0.0f; this.mDimensionRatioSide = -1; this.mX = 0; this.mY = 0; this.mRelX = 0; this.mRelY = 0; this.mOffsetX = 0; this.mOffsetY = 0; this.mBaselineDistance = 0; float f = DEFAULT_BIAS; this.mHorizontalBiasPercent = f; this.mVerticalBiasPercent = f; this.mContainerItemSkip = 0; this.mVisibility = 0; this.mDebugName = null; this.mType = null; this.mOptimizerMeasurable = false; this.mGroupsToSolver = false; this.mHorizontalChainStyle = 0; this.mVerticalChainStyle = 0; this.mWeight = new float[]{-1.0f, -1.0f}; this.mListNextMatchConstraintsWidget = new ConstraintWidget[]{null, null}; this.mNextChainWidget = new ConstraintWidget[]{null, null}; this.mHorizontalNextWidget = null; this.mVerticalNextWidget = null; addAnchors(); } public ConstraintWidget(int i, int i2, int i3, int i4) { this.measured = false; this.run = new WidgetRun[2]; this.horizontalRun = new HorizontalWidgetRun(this); this.verticalRun = new VerticalWidgetRun(this); this.isTerminalWidget = new boolean[]{true, true}; this.wrapMeasure = new int[]{0, 0, 0, 0}; this.mResolvedHasRatio = false; this.mHorizontalResolution = -1; this.mVerticalResolution = -1; this.mMatchConstraintDefaultWidth = 0; this.mMatchConstraintDefaultHeight = 0; this.mResolvedMatchConstraintDefault = new int[2]; this.mMatchConstraintMinWidth = 0; this.mMatchConstraintMaxWidth = 0; this.mMatchConstraintPercentWidth = 1.0f; this.mMatchConstraintMinHeight = 0; this.mMatchConstraintMaxHeight = 0; this.mMatchConstraintPercentHeight = 1.0f; this.mResolvedDimensionRatioSide = -1; this.mResolvedDimensionRatio = 1.0f; this.mMaxDimension = new int[]{Integer.MAX_VALUE, Integer.MAX_VALUE}; this.mCircleConstraintAngle = 0.0f; this.hasBaseline = false; this.mInVirtuaLayout = false; this.mLeft = new ConstraintAnchor(this, ConstraintAnchor.Type.LEFT); this.mTop = new ConstraintAnchor(this, ConstraintAnchor.Type.TOP); this.mRight = new ConstraintAnchor(this, ConstraintAnchor.Type.RIGHT); this.mBottom = new ConstraintAnchor(this, ConstraintAnchor.Type.BOTTOM); this.mBaseline = new ConstraintAnchor(this, ConstraintAnchor.Type.BASELINE); this.mCenterX = new ConstraintAnchor(this, ConstraintAnchor.Type.CENTER_X); this.mCenterY = new ConstraintAnchor(this, ConstraintAnchor.Type.CENTER_Y); ConstraintAnchor constraintAnchor = new ConstraintAnchor(this, ConstraintAnchor.Type.CENTER); this.mCenter = constraintAnchor; this.mListAnchors = new ConstraintAnchor[]{this.mLeft, this.mRight, this.mTop, this.mBottom, this.mBaseline, constraintAnchor}; this.mAnchors = new ArrayList<>(); this.mIsInBarrier = new boolean[2]; this.mListDimensionBehaviors = new DimensionBehaviour[]{DimensionBehaviour.FIXED, DimensionBehaviour.FIXED}; this.mParent = null; this.mDimensionRatio = 0.0f; this.mDimensionRatioSide = -1; this.mRelX = 0; this.mRelY = 0; this.mOffsetX = 0; this.mOffsetY = 0; this.mBaselineDistance = 0; float f = DEFAULT_BIAS; this.mHorizontalBiasPercent = f; this.mVerticalBiasPercent = f; this.mContainerItemSkip = 0; this.mVisibility = 0; this.mDebugName = null; this.mType = null; this.mOptimizerMeasurable = false; this.mGroupsToSolver = false; this.mHorizontalChainStyle = 0; this.mVerticalChainStyle = 0; this.mWeight = new float[]{-1.0f, -1.0f}; this.mListNextMatchConstraintsWidget = new ConstraintWidget[]{null, null}; this.mNextChainWidget = new ConstraintWidget[]{null, null}; this.mHorizontalNextWidget = null; this.mVerticalNextWidget = null; this.mX = i; this.mY = i2; this.mWidth = i3; this.mHeight = i4; addAnchors(); } public ConstraintWidget(int i, int i2) { this(0, 0, i, i2); } public void resetSolverVariables(Cache cache) { this.mLeft.resetSolverVariable(cache); this.mTop.resetSolverVariable(cache); this.mRight.resetSolverVariable(cache); this.mBottom.resetSolverVariable(cache); this.mBaseline.resetSolverVariable(cache); this.mCenter.resetSolverVariable(cache); this.mCenterX.resetSolverVariable(cache); this.mCenterY.resetSolverVariable(cache); } private void addAnchors() { this.mAnchors.add(this.mLeft); this.mAnchors.add(this.mTop); this.mAnchors.add(this.mRight); this.mAnchors.add(this.mBottom); this.mAnchors.add(this.mCenterX); this.mAnchors.add(this.mCenterY); this.mAnchors.add(this.mCenter); this.mAnchors.add(this.mBaseline); } public void connectCircularConstraint(ConstraintWidget constraintWidget, float f, int i) { immediateConnect(ConstraintAnchor.Type.CENTER, constraintWidget, ConstraintAnchor.Type.CENTER, i, 0); this.mCircleConstraintAngle = f; } public void setDebugSolverName(LinearSystem linearSystem, String str) { this.mDebugName = str; SolverVariable createObjectVariable = linearSystem.createObjectVariable(this.mLeft); SolverVariable createObjectVariable2 = linearSystem.createObjectVariable(this.mTop); SolverVariable createObjectVariable3 = linearSystem.createObjectVariable(this.mRight); SolverVariable createObjectVariable4 = linearSystem.createObjectVariable(this.mBottom); createObjectVariable.setName(str + ".left"); createObjectVariable2.setName(str + ".top"); createObjectVariable3.setName(str + ".right"); createObjectVariable4.setName(str + ".bottom"); if (this.mBaselineDistance > 0) { linearSystem.createObjectVariable(this.mBaseline).setName(str + ".baseline"); } } public void createObjectVariables(LinearSystem linearSystem) { linearSystem.createObjectVariable(this.mLeft); linearSystem.createObjectVariable(this.mTop); linearSystem.createObjectVariable(this.mRight); linearSystem.createObjectVariable(this.mBottom); if (this.mBaselineDistance > 0) { linearSystem.createObjectVariable(this.mBaseline); } } public String toString() { return (this.mType != null ? "type: " + this.mType + " " : "") + (this.mDebugName != null ? "id: " + this.mDebugName + " " : "") + "(" + this.mX + ", " + this.mY + ") - (" + this.mWidth + " x " + this.mHeight + ")"; } public int getX() { ConstraintWidget constraintWidget = this.mParent; return (constraintWidget == null || !(constraintWidget instanceof ConstraintWidgetContainer)) ? this.mX : ((ConstraintWidgetContainer) constraintWidget).mPaddingLeft + this.mX; } public int getY() { ConstraintWidget constraintWidget = this.mParent; return (constraintWidget == null || !(constraintWidget instanceof ConstraintWidgetContainer)) ? this.mY : ((ConstraintWidgetContainer) constraintWidget).mPaddingTop + this.mY; } public int getOptimizerWrapWidth() { int i; int i2 = this.mWidth; if (this.mListDimensionBehaviors[0] != DimensionBehaviour.MATCH_CONSTRAINT) { return i2; } if (this.mMatchConstraintDefaultWidth == 1) { i = Math.max(this.mMatchConstraintMinWidth, i2); } else { i = this.mMatchConstraintMinWidth; if (i > 0) { this.mWidth = i; } else { i = 0; } } int i3 = this.mMatchConstraintMaxWidth; return (i3 <= 0 || i3 >= i) ? i : i3; } public int getOptimizerWrapHeight() { int i; int i2 = this.mHeight; if (this.mListDimensionBehaviors[1] != DimensionBehaviour.MATCH_CONSTRAINT) { return i2; } if (this.mMatchConstraintDefaultHeight == 1) { i = Math.max(this.mMatchConstraintMinHeight, i2); } else { i = this.mMatchConstraintMinHeight; if (i > 0) { this.mHeight = i; } else { i = 0; } } int i3 = this.mMatchConstraintMaxHeight; return (i3 <= 0 || i3 >= i) ? i : i3; } public int getLength(int i) { if (i == 0) { return getWidth(); } if (i == 1) { return getHeight(); } return 0; } public int getLeft() { return getX(); } public int getTop() { return getY(); } public int getRight() { return getX() + this.mWidth; } public int getBottom() { return getY() + this.mHeight; } public int getHorizontalMargin() { ConstraintAnchor constraintAnchor = this.mLeft; int i = constraintAnchor != null ? constraintAnchor.mMargin : 0; ConstraintAnchor constraintAnchor2 = this.mRight; return constraintAnchor2 != null ? i + constraintAnchor2.mMargin : i; } public int getVerticalMargin() { int i = this.mLeft != null ? this.mTop.mMargin : 0; return this.mRight != null ? i + this.mBottom.mMargin : i; } public void setGoneMargin(ConstraintAnchor.Type type, int i) { int i2 = AnonymousClass1.$SwitchMap$androidx$constraintlayout$solver$widgets$ConstraintAnchor$Type[type.ordinal()]; if (i2 == 1) { this.mLeft.mGoneMargin = i; return; } if (i2 == 2) { this.mTop.mGoneMargin = i; } else if (i2 == 3) { this.mRight.mGoneMargin = i; } else { if (i2 != 4) { return; } this.mBottom.mGoneMargin = i; } } public void setLength(int i, int i2) { if (i2 == 0) { setWidth(i); } else if (i2 == 1) { setHeight(i); } } /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:38:0x0086 -> B:31:0x0087). Please report as a decompilation issue!!! */ public void setDimensionRatio(String str) { float f; int i = 0; if (str == null || str.length() == 0) { this.mDimensionRatio = 0.0f; return; } int length = str.length(); int indexOf = str.indexOf(44); int i2 = 0; int i3 = -1; if (indexOf > 0 && indexOf < length - 1) { String substring = str.substring(0, indexOf); if (!substring.equalsIgnoreCase(ExifInterface.LONGITUDE_WEST)) { i2 = substring.equalsIgnoreCase("H") ? 1 : -1; } i3 = i2; i2 = indexOf + 1; } int indexOf2 = str.indexOf(58); if (indexOf2 >= 0 && indexOf2 < length - 1) { String substring2 = str.substring(i2, 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 (i3 == 1) { f = Math.abs(parseFloat2 / parseFloat); } else { f = Math.abs(parseFloat / parseFloat2); } } } f = i; } else { String substring4 = str.substring(i2); if (substring4.length() > 0) { f = Float.parseFloat(substring4); } f = i; } i = (f > i ? 1 : (f == i ? 0 : -1)); if (i > 0) { this.mDimensionRatio = f; this.mDimensionRatioSide = i3; } } public void setFrame(int i, int i2, int i3, int i4) { int i5; int i6; int i7 = i3 - i; int i8 = i4 - i2; this.mX = i; this.mY = i2; if (this.mVisibility == 8) { this.mWidth = 0; this.mHeight = 0; return; } if (this.mListDimensionBehaviors[0] == DimensionBehaviour.FIXED && i7 < (i6 = this.mWidth)) { i7 = i6; } if (this.mListDimensionBehaviors[1] == DimensionBehaviour.FIXED && i8 < (i5 = this.mHeight)) { i8 = i5; } this.mWidth = i7; this.mHeight = i8; int i9 = this.mMinHeight; if (i8 < i9) { this.mHeight = i9; } int i10 = this.mMinWidth; if (i7 < i10) { this.mWidth = i10; } } public void setFrame(int i, int i2, int i3) { if (i3 == 0) { setHorizontalDimension(i, i2); } else if (i3 == 1) { setVerticalDimension(i, i2); } } public void setHorizontalWeight(float f) { this.mWeight[0] = f; } public void setVerticalWeight(float f) { this.mWeight[1] = f; } public void immediateConnect(ConstraintAnchor.Type type, ConstraintWidget constraintWidget, ConstraintAnchor.Type type2, int i, int i2) { getAnchor(type).connect(constraintWidget.getAnchor(type2), i, i2, true); } public void connect(ConstraintAnchor constraintAnchor, ConstraintAnchor constraintAnchor2, int i) { if (constraintAnchor.getOwner() == this) { connect(constraintAnchor.getType(), constraintAnchor2.getOwner(), constraintAnchor2.getType(), i); } } public void connect(ConstraintAnchor.Type type, ConstraintWidget constraintWidget, ConstraintAnchor.Type type2) { connect(type, constraintWidget, type2, 0); } public void connect(ConstraintAnchor.Type type, ConstraintWidget constraintWidget, ConstraintAnchor.Type type2, int i) { boolean z; if (type == ConstraintAnchor.Type.CENTER) { if (type2 == ConstraintAnchor.Type.CENTER) { ConstraintAnchor anchor = getAnchor(ConstraintAnchor.Type.LEFT); ConstraintAnchor anchor2 = getAnchor(ConstraintAnchor.Type.RIGHT); ConstraintAnchor anchor3 = getAnchor(ConstraintAnchor.Type.TOP); ConstraintAnchor anchor4 = getAnchor(ConstraintAnchor.Type.BOTTOM); boolean z2 = true; if ((anchor == null || !anchor.isConnected()) && (anchor2 == null || !anchor2.isConnected())) { connect(ConstraintAnchor.Type.LEFT, constraintWidget, ConstraintAnchor.Type.LEFT, 0); connect(ConstraintAnchor.Type.RIGHT, constraintWidget, ConstraintAnchor.Type.RIGHT, 0); z = true; } else { z = false; } if ((anchor3 == null || !anchor3.isConnected()) && (anchor4 == null || !anchor4.isConnected())) { connect(ConstraintAnchor.Type.TOP, constraintWidget, ConstraintAnchor.Type.TOP, 0); connect(ConstraintAnchor.Type.BOTTOM, constraintWidget, ConstraintAnchor.Type.BOTTOM, 0); } else { z2 = false; } if (z && z2) { getAnchor(ConstraintAnchor.Type.CENTER).connect(constraintWidget.getAnchor(ConstraintAnchor.Type.CENTER), 0); return; } else if (z) { getAnchor(ConstraintAnchor.Type.CENTER_X).connect(constraintWidget.getAnchor(ConstraintAnchor.Type.CENTER_X), 0); return; } else { if (z2) { getAnchor(ConstraintAnchor.Type.CENTER_Y).connect(constraintWidget.getAnchor(ConstraintAnchor.Type.CENTER_Y), 0); return; } return; } } if (type2 == ConstraintAnchor.Type.LEFT || type2 == ConstraintAnchor.Type.RIGHT) { connect(ConstraintAnchor.Type.LEFT, constraintWidget, type2, 0); connect(ConstraintAnchor.Type.RIGHT, constraintWidget, type2, 0); getAnchor(ConstraintAnchor.Type.CENTER).connect(constraintWidget.getAnchor(type2), 0); return; } else { if (type2 == ConstraintAnchor.Type.TOP || type2 == ConstraintAnchor.Type.BOTTOM) { connect(ConstraintAnchor.Type.TOP, constraintWidget, type2, 0); connect(ConstraintAnchor.Type.BOTTOM, constraintWidget, type2, 0); getAnchor(ConstraintAnchor.Type.CENTER).connect(constraintWidget.getAnchor(type2), 0); return; } return; } } if (type == ConstraintAnchor.Type.CENTER_X && (type2 == ConstraintAnchor.Type.LEFT || type2 == ConstraintAnchor.Type.RIGHT)) { ConstraintAnchor anchor5 = getAnchor(ConstraintAnchor.Type.LEFT); ConstraintAnchor anchor6 = constraintWidget.getAnchor(type2); ConstraintAnchor anchor7 = getAnchor(ConstraintAnchor.Type.RIGHT); anchor5.connect(anchor6, 0); anchor7.connect(anchor6, 0); getAnchor(ConstraintAnchor.Type.CENTER_X).connect(anchor6, 0); return; } if (type == ConstraintAnchor.Type.CENTER_Y && (type2 == ConstraintAnchor.Type.TOP || type2 == ConstraintAnchor.Type.BOTTOM)) { ConstraintAnchor anchor8 = constraintWidget.getAnchor(type2); getAnchor(ConstraintAnchor.Type.TOP).connect(anchor8, 0); getAnchor(ConstraintAnchor.Type.BOTTOM).connect(anchor8, 0); getAnchor(ConstraintAnchor.Type.CENTER_Y).connect(anchor8, 0); return; } if (type == ConstraintAnchor.Type.CENTER_X && type2 == ConstraintAnchor.Type.CENTER_X) { getAnchor(ConstraintAnchor.Type.LEFT).connect(constraintWidget.getAnchor(ConstraintAnchor.Type.LEFT), 0); getAnchor(ConstraintAnchor.Type.RIGHT).connect(constraintWidget.getAnchor(ConstraintAnchor.Type.RIGHT), 0); getAnchor(ConstraintAnchor.Type.CENTER_X).connect(constraintWidget.getAnchor(type2), 0); return; } if (type == ConstraintAnchor.Type.CENTER_Y && type2 == ConstraintAnchor.Type.CENTER_Y) { getAnchor(ConstraintAnchor.Type.TOP).connect(constraintWidget.getAnchor(ConstraintAnchor.Type.TOP), 0); getAnchor(ConstraintAnchor.Type.BOTTOM).connect(constraintWidget.getAnchor(ConstraintAnchor.Type.BOTTOM), 0); getAnchor(ConstraintAnchor.Type.CENTER_Y).connect(constraintWidget.getAnchor(type2), 0); return; } ConstraintAnchor anchor9 = getAnchor(type); ConstraintAnchor anchor10 = constraintWidget.getAnchor(type2); if (anchor9.isValidConnection(anchor10)) { if (type == ConstraintAnchor.Type.BASELINE) { ConstraintAnchor anchor11 = getAnchor(ConstraintAnchor.Type.TOP); ConstraintAnchor anchor12 = getAnchor(ConstraintAnchor.Type.BOTTOM); if (anchor11 != null) { anchor11.reset(); } if (anchor12 != null) { anchor12.reset(); } i = 0; } else if (type == ConstraintAnchor.Type.TOP || type == ConstraintAnchor.Type.BOTTOM) { ConstraintAnchor anchor13 = getAnchor(ConstraintAnchor.Type.BASELINE); if (anchor13 != null) { anchor13.reset(); } ConstraintAnchor anchor14 = getAnchor(ConstraintAnchor.Type.CENTER); if (anchor14.getTarget() != anchor10) { anchor14.reset(); } ConstraintAnchor opposite = getAnchor(type).getOpposite(); ConstraintAnchor anchor15 = getAnchor(ConstraintAnchor.Type.CENTER_Y); if (anchor15.isConnected()) { opposite.reset(); anchor15.reset(); } } else if (type == ConstraintAnchor.Type.LEFT || type == ConstraintAnchor.Type.RIGHT) { ConstraintAnchor anchor16 = getAnchor(ConstraintAnchor.Type.CENTER); if (anchor16.getTarget() != anchor10) { anchor16.reset(); } ConstraintAnchor opposite2 = getAnchor(type).getOpposite(); ConstraintAnchor anchor17 = getAnchor(ConstraintAnchor.Type.CENTER_X); if (anchor17.isConnected()) { opposite2.reset(); anchor17.reset(); } } anchor9.connect(anchor10, i); } } public void resetAllConstraints() { resetAnchors(); setVerticalBiasPercent(DEFAULT_BIAS); setHorizontalBiasPercent(DEFAULT_BIAS); } public void resetAnchor(ConstraintAnchor constraintAnchor) { if (getParent() != null && (getParent() instanceof ConstraintWidgetContainer) && ((ConstraintWidgetContainer) getParent()).handlesInternalConstraints()) { return; } ConstraintAnchor anchor = getAnchor(ConstraintAnchor.Type.LEFT); ConstraintAnchor anchor2 = getAnchor(ConstraintAnchor.Type.RIGHT); ConstraintAnchor anchor3 = getAnchor(ConstraintAnchor.Type.TOP); ConstraintAnchor anchor4 = getAnchor(ConstraintAnchor.Type.BOTTOM); ConstraintAnchor anchor5 = getAnchor(ConstraintAnchor.Type.CENTER); ConstraintAnchor anchor6 = getAnchor(ConstraintAnchor.Type.CENTER_X); ConstraintAnchor anchor7 = getAnchor(ConstraintAnchor.Type.CENTER_Y); if (constraintAnchor == anchor5) { if (anchor.isConnected() && anchor2.isConnected() && anchor.getTarget() == anchor2.getTarget()) { anchor.reset(); anchor2.reset(); } if (anchor3.isConnected() && anchor4.isConnected() && anchor3.getTarget() == anchor4.getTarget()) { anchor3.reset(); anchor4.reset(); } this.mHorizontalBiasPercent = 0.5f; this.mVerticalBiasPercent = 0.5f; } else if (constraintAnchor == anchor6) { if (anchor.isConnected() && anchor2.isConnected() && anchor.getTarget().getOwner() == anchor2.getTarget().getOwner()) { anchor.reset(); anchor2.reset(); } this.mHorizontalBiasPercent = 0.5f; } else if (constraintAnchor == anchor7) { if (anchor3.isConnected() && anchor4.isConnected() && anchor3.getTarget().getOwner() == anchor4.getTarget().getOwner()) { anchor3.reset(); anchor4.reset(); } this.mVerticalBiasPercent = 0.5f; } else if (constraintAnchor == anchor || constraintAnchor == anchor2) { if (anchor.isConnected() && anchor.getTarget() == anchor2.getTarget()) { anchor5.reset(); } } else if ((constraintAnchor == anchor3 || constraintAnchor == anchor4) && anchor3.isConnected() && anchor3.getTarget() == anchor4.getTarget()) { anchor5.reset(); } constraintAnchor.reset(); } public void resetAnchors() { ConstraintWidget parent = getParent(); if (parent != null && (parent instanceof ConstraintWidgetContainer) && ((ConstraintWidgetContainer) getParent()).handlesInternalConstraints()) { return; } int size = this.mAnchors.size(); for (int i = 0; i < size; i++) { this.mAnchors.get(i).reset(); } } public ConstraintAnchor getAnchor(ConstraintAnchor.Type type) { switch (AnonymousClass1.$SwitchMap$androidx$constraintlayout$solver$widgets$ConstraintAnchor$Type[type.ordinal()]) { case 1: return this.mLeft; case 2: return this.mTop; case 3: return this.mRight; case 4: return this.mBottom; case 5: return this.mBaseline; case 6: return this.mCenter; case 7: return this.mCenterX; case 8: return this.mCenterY; case 9: return null; default: throw new AssertionError(type.name()); } } public DimensionBehaviour getHorizontalDimensionBehaviour() { return this.mListDimensionBehaviors[0]; } public DimensionBehaviour getVerticalDimensionBehaviour() { return this.mListDimensionBehaviors[1]; } public DimensionBehaviour getDimensionBehaviour(int i) { if (i == 0) { return getHorizontalDimensionBehaviour(); } if (i == 1) { return getVerticalDimensionBehaviour(); } return null; } public void setHorizontalDimensionBehaviour(DimensionBehaviour dimensionBehaviour) { this.mListDimensionBehaviors[0] = dimensionBehaviour; } public void setVerticalDimensionBehaviour(DimensionBehaviour dimensionBehaviour) { this.mListDimensionBehaviors[1] = dimensionBehaviour; } public boolean isInHorizontalChain() { if (this.mLeft.mTarget == null || this.mLeft.mTarget.mTarget != this.mLeft) { return this.mRight.mTarget != null && this.mRight.mTarget.mTarget == this.mRight; } return true; } public ConstraintWidget getPreviousChainMember(int i) { if (i == 0) { if (this.mLeft.mTarget == null) { return null; } ConstraintAnchor constraintAnchor = this.mLeft.mTarget.mTarget; ConstraintAnchor constraintAnchor2 = this.mLeft; if (constraintAnchor == constraintAnchor2) { return constraintAnchor2.mTarget.mOwner; } return null; } if (i != 1 || this.mTop.mTarget == null) { return null; } ConstraintAnchor constraintAnchor3 = this.mTop.mTarget.mTarget; ConstraintAnchor constraintAnchor4 = this.mTop; if (constraintAnchor3 == constraintAnchor4) { return constraintAnchor4.mTarget.mOwner; } return null; } public ConstraintWidget getNextChainMember(int i) { if (i == 0) { if (this.mRight.mTarget == null) { return null; } ConstraintAnchor constraintAnchor = this.mRight.mTarget.mTarget; ConstraintAnchor constraintAnchor2 = this.mRight; if (constraintAnchor == constraintAnchor2) { return constraintAnchor2.mTarget.mOwner; } return null; } if (i != 1 || this.mBottom.mTarget == null) { return null; } ConstraintAnchor constraintAnchor3 = this.mBottom.mTarget.mTarget; ConstraintAnchor constraintAnchor4 = this.mBottom; if (constraintAnchor3 == constraintAnchor4) { return constraintAnchor4.mTarget.mOwner; } return null; } public ConstraintWidget getHorizontalChainControlWidget() { if (!isInHorizontalChain()) { return null; } ConstraintWidget constraintWidget = this; ConstraintWidget constraintWidget2 = null; while (constraintWidget2 == null && constraintWidget != null) { ConstraintAnchor anchor = constraintWidget.getAnchor(ConstraintAnchor.Type.LEFT); ConstraintAnchor target = anchor == null ? null : anchor.getTarget(); ConstraintWidget owner = target == null ? null : target.getOwner(); if (owner == getParent()) { return constraintWidget; } ConstraintAnchor target2 = owner == null ? null : owner.getAnchor(ConstraintAnchor.Type.RIGHT).getTarget(); if (target2 == null || target2.getOwner() == constraintWidget) { constraintWidget = owner; } else { constraintWidget2 = constraintWidget; } } return constraintWidget2; } public boolean isInVerticalChain() { if (this.mTop.mTarget == null || this.mTop.mTarget.mTarget != this.mTop) { return this.mBottom.mTarget != null && this.mBottom.mTarget.mTarget == this.mBottom; } return true; } public ConstraintWidget getVerticalChainControlWidget() { if (!isInVerticalChain()) { return null; } ConstraintWidget constraintWidget = this; ConstraintWidget constraintWidget2 = null; while (constraintWidget2 == null && constraintWidget != null) { ConstraintAnchor anchor = constraintWidget.getAnchor(ConstraintAnchor.Type.TOP); ConstraintAnchor target = anchor == null ? null : anchor.getTarget(); ConstraintWidget owner = target == null ? null : target.getOwner(); if (owner == getParent()) { return constraintWidget; } ConstraintAnchor target2 = owner == null ? null : owner.getAnchor(ConstraintAnchor.Type.BOTTOM).getTarget(); if (target2 == null || target2.getOwner() == constraintWidget) { constraintWidget = owner; } else { constraintWidget2 = constraintWidget; } } return constraintWidget2; } private boolean isChainHead(int i) { int i2 = i * 2; if (this.mListAnchors[i2].mTarget != null) { ConstraintAnchor constraintAnchor = this.mListAnchors[i2].mTarget.mTarget; ConstraintAnchor[] constraintAnchorArr = this.mListAnchors; if (constraintAnchor != constraintAnchorArr[i2]) { int i3 = i2 + 1; if (constraintAnchorArr[i3].mTarget != null && this.mListAnchors[i3].mTarget.mTarget == this.mListAnchors[i3]) { return true; } } } return false; } /* JADX WARN: Removed duplicated region for block: B:121:0x0277 */ /* JADX WARN: Removed duplicated region for block: B:127:0x028d */ /* JADX WARN: Removed duplicated region for block: B:131:0x0298 */ /* JADX WARN: Removed duplicated region for block: B:134:0x02b4 */ /* JADX WARN: Removed duplicated region for block: B:149:0x03a3 */ /* JADX WARN: Removed duplicated region for block: B:161:0x0408 A[ADDED_TO_REGION] */ /* JADX WARN: Removed duplicated region for block: B:168:0x041d */ /* JADX WARN: Removed duplicated region for block: B:177:0x0431 */ /* JADX WARN: Removed duplicated region for block: B:180:0x043e */ /* JADX WARN: Removed duplicated region for block: B:188:0x04cf */ /* JADX WARN: Removed duplicated region for block: B:193:0x0502 */ /* JADX WARN: Removed duplicated region for block: B:195:? A[RETURN, SYNTHETIC] */ /* JADX WARN: Removed duplicated region for block: B:197:0x04f8 */ /* JADX WARN: Removed duplicated region for block: B:200:0x045b */ /* JADX WARN: Removed duplicated region for block: B:204:0x0475 */ /* JADX WARN: Removed duplicated region for block: B:207:0x0438 */ /* JADX WARN: Removed duplicated region for block: B:224:0x0389 */ /* JADX WARN: Removed duplicated region for block: B:225:0x029b */ /* JADX WARN: Removed duplicated region for block: B:228:0x0281 */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public void addToSolver(androidx.constraintlayout.solver.LinearSystem r44) { /* Method dump skipped, instructions count: 1315 To view this dump add '--comments-level debug' option */ throw new UnsupportedOperationException("Method not decompiled: androidx.constraintlayout.solver.widgets.ConstraintWidget.addToSolver(androidx.constraintlayout.solver.LinearSystem):void"); } /* JADX INFO: Access modifiers changed from: package-private */ public boolean addFirst() { return (this instanceof VirtualLayout) || (this instanceof Guideline); } public void setupDimensionRatio(boolean z, boolean z2, boolean z3, boolean z4) { if (this.mResolvedDimensionRatioSide == -1) { if (z3 && !z4) { this.mResolvedDimensionRatioSide = 0; } else if (!z3 && z4) { this.mResolvedDimensionRatioSide = 1; if (this.mDimensionRatioSide == -1) { this.mResolvedDimensionRatio = 1.0f / this.mResolvedDimensionRatio; } } } if (this.mResolvedDimensionRatioSide == 0 && (!this.mTop.isConnected() || !this.mBottom.isConnected())) { this.mResolvedDimensionRatioSide = 1; } else if (this.mResolvedDimensionRatioSide == 1 && (!this.mLeft.isConnected() || !this.mRight.isConnected())) { this.mResolvedDimensionRatioSide = 0; } if (this.mResolvedDimensionRatioSide == -1 && (!this.mTop.isConnected() || !this.mBottom.isConnected() || !this.mLeft.isConnected() || !this.mRight.isConnected())) { if (this.mTop.isConnected() && this.mBottom.isConnected()) { this.mResolvedDimensionRatioSide = 0; } else if (this.mLeft.isConnected() && this.mRight.isConnected()) { this.mResolvedDimensionRatio = 1.0f / this.mResolvedDimensionRatio; this.mResolvedDimensionRatioSide = 1; } } if (this.mResolvedDimensionRatioSide == -1) { int i = this.mMatchConstraintMinWidth; if (i > 0 && this.mMatchConstraintMinHeight == 0) { this.mResolvedDimensionRatioSide = 0; } else { if (i != 0 || this.mMatchConstraintMinHeight <= 0) { return; } this.mResolvedDimensionRatio = 1.0f / this.mResolvedDimensionRatio; this.mResolvedDimensionRatioSide = 1; } } } /* JADX WARN: Removed duplicated region for block: B:118:0x02de */ /* JADX WARN: Removed duplicated region for block: B:124:0x031b A[RETURN] */ /* JADX WARN: Removed duplicated region for block: B:125:0x031c */ /* JADX WARN: Removed duplicated region for block: B:194:0x030e */ /* JADX WARN: Removed duplicated region for block: B:237:0x03fd */ /* JADX WARN: Removed duplicated region for block: B:239:0x00dc */ /* JADX WARN: Removed duplicated region for block: B:24:0x0085 */ /* JADX WARN: Removed duplicated region for block: B:26:0x008d */ /* JADX WARN: Removed duplicated region for block: B:289:0x00ae */ /* JADX WARN: Removed duplicated region for block: B:290:0x0089 */ /* JADX WARN: Removed duplicated region for block: B:32:0x00b3 */ /* JADX WARN: Removed duplicated region for block: B:43:0x01c3 */ /* JADX WARN: Removed duplicated region for block: B:47:0x040b A[ADDED_TO_REGION] */ /* JADX WARN: Removed duplicated region for block: B:74:? A[ADDED_TO_REGION, RETURN, SYNTHETIC] */ /* JADX WARN: Removed duplicated region for block: B:81:0x03e4 A[ADDED_TO_REGION] */ /* JADX WARN: Removed duplicated region for block: B:91:? A[ADDED_TO_REGION, RETURN, SYNTHETIC] */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ private void applyConstraints(androidx.constraintlayout.solver.LinearSystem r32, boolean r33, boolean r34, boolean r35, boolean r36, androidx.constraintlayout.solver.SolverVariable r37, androidx.constraintlayout.solver.SolverVariable r38, androidx.constraintlayout.solver.widgets.ConstraintWidget.DimensionBehaviour r39, boolean r40, androidx.constraintlayout.solver.widgets.ConstraintAnchor r41, androidx.constraintlayout.solver.widgets.ConstraintAnchor r42, int r43, int r44, int r45, int r46, float r47, boolean r48, boolean r49, boolean r50, boolean r51, int r52, int r53, int r54, int r55, float r56, boolean r57) { /* Method dump skipped, instructions count: 1102 To view this dump add '--comments-level debug' option */ throw new UnsupportedOperationException("Method not decompiled: androidx.constraintlayout.solver.widgets.ConstraintWidget.applyConstraints(androidx.constraintlayout.solver.LinearSystem, boolean, boolean, boolean, 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, boolean, boolean, int, int, int, int, float, boolean):void"); } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: androidx.constraintlayout.solver.widgets.ConstraintWidget$1, reason: invalid class name */ /* loaded from: classes.dex */ public static /* synthetic */ class AnonymousClass1 { static final /* synthetic */ int[] $SwitchMap$androidx$constraintlayout$solver$widgets$ConstraintAnchor$Type; static final /* synthetic */ int[] $SwitchMap$androidx$constraintlayout$solver$widgets$ConstraintWidget$DimensionBehaviour; static { int[] iArr = new int[DimensionBehaviour.values().length]; $SwitchMap$androidx$constraintlayout$solver$widgets$ConstraintWidget$DimensionBehaviour = iArr; try { iArr[DimensionBehaviour.FIXED.ordinal()] = 1; } catch (NoSuchFieldError unused) { } try { $SwitchMap$androidx$constraintlayout$solver$widgets$ConstraintWidget$DimensionBehaviour[DimensionBehaviour.WRAP_CONTENT.ordinal()] = 2; } catch (NoSuchFieldError unused2) { } try { $SwitchMap$androidx$constraintlayout$solver$widgets$ConstraintWidget$DimensionBehaviour[DimensionBehaviour.MATCH_PARENT.ordinal()] = 3; } catch (NoSuchFieldError unused3) { } try { $SwitchMap$androidx$constraintlayout$solver$widgets$ConstraintWidget$DimensionBehaviour[DimensionBehaviour.MATCH_CONSTRAINT.ordinal()] = 4; } catch (NoSuchFieldError unused4) { } int[] iArr2 = new int[ConstraintAnchor.Type.values().length]; $SwitchMap$androidx$constraintlayout$solver$widgets$ConstraintAnchor$Type = iArr2; try { iArr2[ConstraintAnchor.Type.LEFT.ordinal()] = 1; } catch (NoSuchFieldError unused5) { } try { $SwitchMap$androidx$constraintlayout$solver$widgets$ConstraintAnchor$Type[ConstraintAnchor.Type.TOP.ordinal()] = 2; } catch (NoSuchFieldError unused6) { } try { $SwitchMap$androidx$constraintlayout$solver$widgets$ConstraintAnchor$Type[ConstraintAnchor.Type.RIGHT.ordinal()] = 3; } catch (NoSuchFieldError unused7) { } try { $SwitchMap$androidx$constraintlayout$solver$widgets$ConstraintAnchor$Type[ConstraintAnchor.Type.BOTTOM.ordinal()] = 4; } catch (NoSuchFieldError unused8) { } try { $SwitchMap$androidx$constraintlayout$solver$widgets$ConstraintAnchor$Type[ConstraintAnchor.Type.BASELINE.ordinal()] = 5; } catch (NoSuchFieldError unused9) { } try { $SwitchMap$androidx$constraintlayout$solver$widgets$ConstraintAnchor$Type[ConstraintAnchor.Type.CENTER.ordinal()] = 6; } catch (NoSuchFieldError unused10) { } try { $SwitchMap$androidx$constraintlayout$solver$widgets$ConstraintAnchor$Type[ConstraintAnchor.Type.CENTER_X.ordinal()] = 7; } catch (NoSuchFieldError unused11) { } try { $SwitchMap$androidx$constraintlayout$solver$widgets$ConstraintAnchor$Type[ConstraintAnchor.Type.CENTER_Y.ordinal()] = 8; } catch (NoSuchFieldError unused12) { } try { $SwitchMap$androidx$constraintlayout$solver$widgets$ConstraintAnchor$Type[ConstraintAnchor.Type.NONE.ordinal()] = 9; } catch (NoSuchFieldError unused13) { } } } public void updateFromSolver(LinearSystem linearSystem) { int objectVariableValue = linearSystem.getObjectVariableValue(this.mLeft); int objectVariableValue2 = linearSystem.getObjectVariableValue(this.mTop); int objectVariableValue3 = linearSystem.getObjectVariableValue(this.mRight); int objectVariableValue4 = linearSystem.getObjectVariableValue(this.mBottom); if (this.horizontalRun.start.resolved && this.horizontalRun.end.resolved) { objectVariableValue = this.horizontalRun.start.value; objectVariableValue3 = this.horizontalRun.end.value; } if (this.verticalRun.start.resolved && this.verticalRun.end.resolved) { objectVariableValue2 = this.verticalRun.start.value; objectVariableValue4 = this.verticalRun.end.value; } int i = objectVariableValue4 - objectVariableValue2; if (objectVariableValue3 - objectVariableValue < 0 || i < 0 || objectVariableValue == Integer.MIN_VALUE || objectVariableValue == Integer.MAX_VALUE || objectVariableValue2 == Integer.MIN_VALUE || objectVariableValue2 == Integer.MAX_VALUE || objectVariableValue3 == Integer.MIN_VALUE || objectVariableValue3 == Integer.MAX_VALUE || objectVariableValue4 == Integer.MIN_VALUE || objectVariableValue4 == Integer.MAX_VALUE) { objectVariableValue = 0; objectVariableValue4 = 0; objectVariableValue2 = 0; objectVariableValue3 = 0; } setFrame(objectVariableValue, objectVariableValue2, objectVariableValue3, objectVariableValue4); } public void copy(ConstraintWidget constraintWidget, HashMap hashMap) { this.mHorizontalResolution = constraintWidget.mHorizontalResolution; this.mVerticalResolution = constraintWidget.mVerticalResolution; this.mMatchConstraintDefaultWidth = constraintWidget.mMatchConstraintDefaultWidth; this.mMatchConstraintDefaultHeight = constraintWidget.mMatchConstraintDefaultHeight; int[] iArr = this.mResolvedMatchConstraintDefault; int[] iArr2 = constraintWidget.mResolvedMatchConstraintDefault; iArr[0] = iArr2[0]; iArr[1] = iArr2[1]; this.mMatchConstraintMinWidth = constraintWidget.mMatchConstraintMinWidth; this.mMatchConstraintMaxWidth = constraintWidget.mMatchConstraintMaxWidth; this.mMatchConstraintMinHeight = constraintWidget.mMatchConstraintMinHeight; this.mMatchConstraintMaxHeight = constraintWidget.mMatchConstraintMaxHeight; this.mMatchConstraintPercentHeight = constraintWidget.mMatchConstraintPercentHeight; this.mIsWidthWrapContent = constraintWidget.mIsWidthWrapContent; this.mIsHeightWrapContent = constraintWidget.mIsHeightWrapContent; this.mResolvedDimensionRatioSide = constraintWidget.mResolvedDimensionRatioSide; this.mResolvedDimensionRatio = constraintWidget.mResolvedDimensionRatio; int[] iArr3 = constraintWidget.mMaxDimension; this.mMaxDimension = Arrays.copyOf(iArr3, iArr3.length); this.mCircleConstraintAngle = constraintWidget.mCircleConstraintAngle; this.hasBaseline = constraintWidget.hasBaseline; this.inPlaceholder = constraintWidget.inPlaceholder; this.mLeft.reset(); this.mTop.reset(); this.mRight.reset(); this.mBottom.reset(); this.mBaseline.reset(); this.mCenterX.reset(); this.mCenterY.reset(); this.mCenter.reset(); this.mListDimensionBehaviors = (DimensionBehaviour[]) Arrays.copyOf(this.mListDimensionBehaviors, 2); this.mParent = this.mParent == null ? null : hashMap.get(constraintWidget.mParent); this.mWidth = constraintWidget.mWidth; this.mHeight = constraintWidget.mHeight; this.mDimensionRatio = constraintWidget.mDimensionRatio; this.mDimensionRatioSide = constraintWidget.mDimensionRatioSide; this.mX = constraintWidget.mX; this.mY = constraintWidget.mY; this.mRelX = constraintWidget.mRelX; this.mRelY = constraintWidget.mRelY; this.mOffsetX = constraintWidget.mOffsetX; this.mOffsetY = constraintWidget.mOffsetY; this.mBaselineDistance = constraintWidget.mBaselineDistance; this.mMinWidth = constraintWidget.mMinWidth; this.mMinHeight = constraintWidget.mMinHeight; this.mHorizontalBiasPercent = constraintWidget.mHorizontalBiasPercent; this.mVerticalBiasPercent = constraintWidget.mVerticalBiasPercent; this.mCompanionWidget = constraintWidget.mCompanionWidget; this.mContainerItemSkip = constraintWidget.mContainerItemSkip; this.mVisibility = constraintWidget.mVisibility; this.mDebugName = constraintWidget.mDebugName; this.mType = constraintWidget.mType; this.mDistToTop = constraintWidget.mDistToTop; this.mDistToLeft = constraintWidget.mDistToLeft; this.mDistToRight = constraintWidget.mDistToRight; this.mDistToBottom = constraintWidget.mDistToBottom; this.mLeftHasCentered = constraintWidget.mLeftHasCentered; this.mRightHasCentered = constraintWidget.mRightHasCentered; this.mTopHasCentered = constraintWidget.mTopHasCentered; this.mBottomHasCentered = constraintWidget.mBottomHasCentered; this.mHorizontalWrapVisited = constraintWidget.mHorizontalWrapVisited; this.mVerticalWrapVisited = constraintWidget.mVerticalWrapVisited; this.mOptimizerMeasurable = constraintWidget.mOptimizerMeasurable; this.mGroupsToSolver = constraintWidget.mGroupsToSolver; this.mHorizontalChainStyle = constraintWidget.mHorizontalChainStyle; this.mVerticalChainStyle = constraintWidget.mVerticalChainStyle; this.mHorizontalChainFixedPosition = constraintWidget.mHorizontalChainFixedPosition; this.mVerticalChainFixedPosition = constraintWidget.mVerticalChainFixedPosition; float[] fArr = this.mWeight; float[] fArr2 = constraintWidget.mWeight; fArr[0] = fArr2[0]; fArr[1] = fArr2[1]; ConstraintWidget[] constraintWidgetArr = this.mListNextMatchConstraintsWidget; ConstraintWidget[] constraintWidgetArr2 = constraintWidget.mListNextMatchConstraintsWidget; constraintWidgetArr[0] = constraintWidgetArr2[0]; constraintWidgetArr[1] = constraintWidgetArr2[1]; ConstraintWidget[] constraintWidgetArr3 = this.mNextChainWidget; ConstraintWidget[] constraintWidgetArr4 = constraintWidget.mNextChainWidget; constraintWidgetArr3[0] = constraintWidgetArr4[0]; constraintWidgetArr3[1] = constraintWidgetArr4[1]; ConstraintWidget constraintWidget2 = constraintWidget.mHorizontalNextWidget; this.mHorizontalNextWidget = constraintWidget2 == null ? null : hashMap.get(constraintWidget2); ConstraintWidget constraintWidget3 = constraintWidget.mVerticalNextWidget; this.mVerticalNextWidget = constraintWidget3 != null ? hashMap.get(constraintWidget3) : null; } public void updateFromRuns(boolean z, boolean z2) { int i; int i2; boolean isResolved = z & this.horizontalRun.isResolved(); boolean isResolved2 = z2 & this.verticalRun.isResolved(); int i3 = this.horizontalRun.start.value; int i4 = this.verticalRun.start.value; int i5 = this.horizontalRun.end.value; int i6 = this.verticalRun.end.value; int i7 = i6 - i4; if (i5 - i3 < 0 || i7 < 0 || i3 == Integer.MIN_VALUE || i3 == Integer.MAX_VALUE || i4 == Integer.MIN_VALUE || i4 == Integer.MAX_VALUE || i5 == Integer.MIN_VALUE || i5 == Integer.MAX_VALUE || i6 == Integer.MIN_VALUE || i6 == Integer.MAX_VALUE) { i3 = 0; i4 = 0; i5 = 0; i6 = 0; } int i8 = i5 - i3; int i9 = i6 - i4; if (isResolved) { this.mX = i3; } if (isResolved2) { this.mY = i4; } if (this.mVisibility == 8) { this.mWidth = 0; this.mHeight = 0; return; } if (isResolved) { if (this.mListDimensionBehaviors[0] == DimensionBehaviour.FIXED && i8 < (i2 = this.mWidth)) { i8 = i2; } this.mWidth = i8; int i10 = this.mMinWidth; if (i8 < i10) { this.mWidth = i10; } } if (isResolved2) { if (this.mListDimensionBehaviors[1] == DimensionBehaviour.FIXED && i9 < (i = this.mHeight)) { i9 = i; } this.mHeight = i9; int i11 = this.mMinHeight; if (i9 < i11) { this.mHeight = i11; } } } }