what-the-bank/sources/androidx/appcompat/widget/LinearLayoutCompat.java

686 lines
21 KiB
Java

package androidx.appcompat.widget;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.LinearLayout;
import androidx.core.view.ViewCompat;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import o.C0683McA;
import o.SYO;
import o.mxt;
/* loaded from: classes.dex */
public class LinearLayoutCompat extends ViewGroup {
private boolean a;
private int b;
private int c;
private Drawable d;
private int e;
private int f;
private int[] g;
private int h;
private int i;
private int[] j;
private int k;
private boolean l;
private float m;
private int n;
/* renamed from: o, reason: collision with root package name */
private int f6376o;
int a(int i) {
return 0;
}
int c(View view) {
return 0;
}
int c(View view, int i) {
return 0;
}
int d(View view) {
return 0;
}
@Override // android.view.ViewGroup
public boolean shouldDelayChildPressedState() {
return false;
}
public LinearLayoutCompat(Context context) {
this(context, null);
}
public LinearLayoutCompat(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
public LinearLayoutCompat(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
this.a = true;
this.b = -1;
this.c = 0;
this.h = 8388659;
C0683McA c0683McA = new C0683McA(context, context.obtainStyledAttributes(attributeSet, SYO.ZqN.LinearLayoutCompat, i, 0));
ViewCompat.sm_(this, context, SYO.ZqN.LinearLayoutCompat, attributeSet, c0683McA.d, i, 0);
int i2 = c0683McA.d.getInt(SYO.ZqN.LinearLayoutCompat_android_orientation, -1);
if (i2 >= 0) {
setOrientation(i2);
}
int i3 = c0683McA.d.getInt(SYO.ZqN.LinearLayoutCompat_android_gravity, -1);
if (i3 >= 0) {
setGravity(i3);
}
boolean z = c0683McA.d.getBoolean(SYO.ZqN.LinearLayoutCompat_android_baselineAligned, true);
if (!z) {
setBaselineAligned(z);
}
this.m = c0683McA.d.getFloat(SYO.ZqN.LinearLayoutCompat_android_weightSum, -1.0f);
this.b = c0683McA.d.getInt(SYO.ZqN.LinearLayoutCompat_android_baselineAlignedChildIndex, -1);
this.l = c0683McA.d.getBoolean(SYO.ZqN.LinearLayoutCompat_measureWithLargestChild, false);
setDividerDrawable(c0683McA.jL_(SYO.ZqN.LinearLayoutCompat_divider));
this.f6376o = c0683McA.d.getInt(SYO.ZqN.LinearLayoutCompat_showDividers, 0);
this.f = c0683McA.d.getDimensionPixelSize(SYO.ZqN.LinearLayoutCompat_dividerPadding, 0);
c0683McA.d.recycle();
}
public void setShowDividers(int i) {
if (i != this.f6376o) {
requestLayout();
}
this.f6376o = i;
}
public void setDividerDrawable(Drawable drawable) {
if (drawable == this.d) {
return;
}
this.d = drawable;
if (drawable != null) {
this.i = drawable.getIntrinsicWidth();
this.e = drawable.getIntrinsicHeight();
} else {
this.i = 0;
this.e = 0;
}
setWillNotDraw(drawable == null);
requestLayout();
}
@Override // android.view.View
protected void onDraw(Canvas canvas) {
if (this.d == null) {
return;
}
if (this.k == 1) {
im_(canvas);
} else {
il_(canvas);
}
}
void im_(Canvas canvas) {
int bottom;
int f = f();
for (int i = 0; i < f; i++) {
View e = e(i);
if (e != null && e.getVisibility() != 8 && c(i)) {
in_(canvas, (e.getTop() - ((ViewGroup.MarginLayoutParams) ((RVV) e.getLayoutParams())).topMargin) - this.e);
}
}
if (c(f)) {
View e2 = e(f - 1);
if (e2 == null) {
bottom = (getHeight() - getPaddingBottom()) - this.e;
} else {
bottom = e2.getBottom() + ((ViewGroup.MarginLayoutParams) ((RVV) e2.getLayoutParams())).bottomMargin;
}
in_(canvas, bottom);
}
}
void il_(Canvas canvas) {
int right;
int left;
int i;
int left2;
int f = f();
boolean b = mxt.b(this);
for (int i2 = 0; i2 < f; i2++) {
View e = e(i2);
if (e != null && e.getVisibility() != 8 && c(i2)) {
RVV rvv = (RVV) e.getLayoutParams();
if (b) {
left2 = e.getRight() + ((ViewGroup.MarginLayoutParams) rvv).rightMargin;
} else {
left2 = (e.getLeft() - ((ViewGroup.MarginLayoutParams) rvv).leftMargin) - this.i;
}
io_(canvas, left2);
}
}
if (c(f)) {
View e2 = e(f - 1);
if (e2 != null) {
RVV rvv2 = (RVV) e2.getLayoutParams();
if (b) {
left = e2.getLeft() - ((ViewGroup.MarginLayoutParams) rvv2).leftMargin;
i = this.i;
right = left - i;
} else {
right = e2.getRight() + ((ViewGroup.MarginLayoutParams) rvv2).rightMargin;
}
} else if (b) {
right = getPaddingLeft();
} else {
left = getWidth() - getPaddingRight();
i = this.i;
right = left - i;
}
io_(canvas, right);
}
}
void in_(Canvas canvas, int i) {
Drawable drawable = this.d;
int paddingLeft = getPaddingLeft();
int i2 = this.f;
int width = getWidth();
int paddingRight = getPaddingRight();
drawable.setBounds(paddingLeft + i2, i, (width - paddingRight) - this.f, this.e + i);
this.d.draw(canvas);
}
void io_(Canvas canvas, int i) {
this.d.setBounds(i, getPaddingTop() + this.f, this.i + i, (getHeight() - getPaddingBottom()) - this.f);
this.d.draw(canvas);
}
@Override // android.view.View
public int getBaseline() {
int i;
if (this.b < 0) {
return super.getBaseline();
}
int childCount = getChildCount();
int i2 = this.b;
if (childCount <= i2) {
throw new RuntimeException("mBaselineAlignedChildIndex of LinearLayout set to an index that is out of bounds.");
}
View childAt = getChildAt(i2);
int baseline = childAt.getBaseline();
if (baseline == -1) {
if (this.b == 0) {
return -1;
}
throw new RuntimeException("mBaselineAlignedChildIndex of LinearLayout points to a View that doesn't know how to get its baseline.");
}
int i3 = this.c;
if (this.k == 1 && (i = this.h & 112) != 48) {
if (i == 16) {
i3 += ((((getBottom() - getTop()) - getPaddingTop()) - getPaddingBottom()) - this.n) / 2;
} else if (i == 80) {
i3 = ((getBottom() - getTop()) - getPaddingBottom()) - this.n;
}
}
return i3 + ((ViewGroup.MarginLayoutParams) ((RVV) childAt.getLayoutParams())).topMargin + baseline;
}
public void setBaselineAlignedChildIndex(int i) {
if (i >= 0 && i < getChildCount()) {
this.b = i;
return;
}
StringBuilder sb = new StringBuilder("base aligned child index out of range (0, ");
sb.append(getChildCount());
sb.append(")");
throw new IllegalArgumentException(sb.toString());
}
View e(int i) {
return getChildAt(i);
}
int f() {
return getChildCount();
}
public void setWeightSum(float f) {
this.m = Math.max(BitmapDescriptorFactory.HUE_RED, f);
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // android.view.View
public void onMeasure(int i, int i2) {
if (this.k == 1) {
e(i, i2);
} else {
d(i, i2);
}
}
/* JADX INFO: Access modifiers changed from: protected */
/* JADX WARN: Code restructure failed: missing block: B:17:0x001f, code lost:
if ((r4.f6376o & 2) != 0) goto L18;
*/
/* JADX WARN: Code restructure failed: missing block: B:18:0x0021, code lost:
r5 = r5 - 1;
*/
/* JADX WARN: Code restructure failed: missing block: B:19:0x0023, code lost:
if (r5 < 0) goto L25;
*/
/* JADX WARN: Code restructure failed: missing block: B:21:0x002f, code lost:
if (getChildAt(r5).getVisibility() == 8) goto L27;
*/
/* JADX WARN: Code restructure failed: missing block: B:23:?, code lost:
return true;
*/
/* JADX WARN: Code restructure failed: missing block: B:27:0x0033, code lost:
return false;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public boolean c(int r5) {
/*
r4 = this;
r0 = 1
r1 = 0
if (r5 != 0) goto Lc
int r5 = r4.f6376o
r5 = r5 & r0
if (r5 == 0) goto La
goto Lb
La:
r0 = r1
Lb:
return r0
Lc:
int r2 = r4.getChildCount()
if (r5 != r2) goto L1b
int r5 = r4.f6376o
r5 = r5 & 4
if (r5 == 0) goto L19
goto L1a
L19:
r0 = r1
L1a:
return r0
L1b:
int r2 = r4.f6376o
r2 = r2 & 2
if (r2 == 0) goto L32
L21:
int r5 = r5 + (-1)
if (r5 < 0) goto L32
android.view.View r2 = r4.getChildAt(r5)
int r2 = r2.getVisibility()
r3 = 8
if (r2 == r3) goto L21
goto L33
L32:
r0 = r1
L33:
return r0
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.appcompat.widget.LinearLayoutCompat.c(int):boolean");
}
/* JADX WARN: Code restructure failed: missing block: B:153:0x030f, code lost:
if (((android.view.ViewGroup.LayoutParams) r14).width == (-1)) goto L143;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
void e(int r33, int r34) {
/*
Method dump skipped, instructions count: 915
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.appcompat.widget.LinearLayoutCompat.e(int, int):void");
}
private void c(int i, int i2) {
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(getMeasuredWidth(), 1073741824);
for (int i3 = 0; i3 < i; i3++) {
View e = e(i3);
if (e.getVisibility() != 8) {
RVV rvv = (RVV) e.getLayoutParams();
if (((ViewGroup.LayoutParams) rvv).width == -1) {
int i4 = ((ViewGroup.LayoutParams) rvv).height;
((ViewGroup.LayoutParams) rvv).height = e.getMeasuredHeight();
measureChildWithMargins(e, makeMeasureSpec, 0, i2, 0);
((ViewGroup.LayoutParams) rvv).height = i4;
}
}
}
}
/* JADX WARN: Removed duplicated region for block: B:44:0x01a3 */
/* JADX WARN: Removed duplicated region for block: B:46:0x01a6 */
/* JADX WARN: Removed duplicated region for block: B:54:0x01da */
/* JADX WARN: Removed duplicated region for block: B:59:0x01e4 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
void d(int r37, int r38) {
/*
Method dump skipped, instructions count: 1282
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.appcompat.widget.LinearLayoutCompat.d(int, int):void");
}
private void b(int i, int i2) {
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(getMeasuredHeight(), 1073741824);
for (int i3 = 0; i3 < i; i3++) {
View e = e(i3);
if (e.getVisibility() != 8) {
RVV rvv = (RVV) e.getLayoutParams();
if (((ViewGroup.LayoutParams) rvv).height == -1) {
int i4 = ((ViewGroup.LayoutParams) rvv).width;
((ViewGroup.LayoutParams) rvv).width = e.getMeasuredWidth();
measureChildWithMargins(e, i2, 0, makeMeasureSpec, 0);
((ViewGroup.LayoutParams) rvv).width = i4;
}
}
}
}
void b(View view, int i, int i2, int i3, int i4, int i5) {
measureChildWithMargins(view, i2, i3, i4, i5);
}
@Override // android.view.ViewGroup, android.view.View
public void onLayout(boolean z, int i, int i2, int i3, int i4) {
if (this.k == 1) {
d(i, i2, i3, i4);
} else {
c(i, i2, i3, i4);
}
}
/* JADX WARN: Removed duplicated region for block: B:25:0x009b */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
void d(int r19, int r20, int r21, int r22) {
/*
r18 = this;
r6 = r18
int r7 = r18.getPaddingLeft()
int r8 = r21 - r19
int r9 = r18.getPaddingRight()
int r10 = r18.getPaddingRight()
int r11 = r18.f()
int r12 = r6.h
r0 = r12 & 112(0x70, float:1.57E-43)
r1 = 16
if (r0 == r1) goto L31
r1 = 80
if (r0 == r1) goto L25
int r0 = r18.getPaddingTop()
goto L3d
L25:
int r0 = r18.getPaddingTop()
int r0 = r0 + r22
int r0 = r0 - r20
int r1 = r6.n
int r0 = r0 - r1
goto L3d
L31:
int r0 = r18.getPaddingTop()
int r1 = r22 - r20
int r2 = r6.n
int r1 = r1 - r2
int r1 = r1 / 2
int r0 = r0 + r1
L3d:
r1 = 0
r13 = r1
L3f:
if (r13 >= r11) goto Lc8
android.view.View r14 = r6.e(r13)
r15 = 1
if (r14 != 0) goto L4f
int r1 = r6.a(r13)
int r0 = r0 + r1
goto Lc4
L4f:
int r1 = r14.getVisibility()
r2 = 8
if (r1 == r2) goto Lc4
int r4 = r14.getMeasuredWidth()
int r16 = r14.getMeasuredHeight()
android.view.ViewGroup$LayoutParams r1 = r14.getLayoutParams()
r5 = r1
androidx.appcompat.widget.LinearLayoutCompat$RVV r5 = (androidx.appcompat.widget.LinearLayoutCompat.RVV) r5
int r1 = r5.gravity
if (r1 >= 0) goto L6e
r1 = 8388615(0x800007, float:1.1754953E-38)
r1 = r1 & r12
L6e:
int r2 = androidx.core.view.ViewCompat.m(r18)
int r1 = o.HpP.c(r1, r2)
r1 = r1 & 7
if (r1 == r15) goto L87
r2 = 5
if (r1 == r2) goto L81
int r1 = r5.leftMargin
int r1 = r1 + r7
goto L94
L81:
int r1 = r8 - r9
int r1 = r1 - r4
int r2 = r5.rightMargin
goto L93
L87:
int r1 = r8 - r7
int r1 = r1 - r10
int r1 = r1 - r4
int r1 = r1 / 2
int r1 = r1 + r7
int r2 = r5.leftMargin
int r1 = r1 + r2
int r2 = r5.rightMargin
L93:
int r1 = r1 - r2
L94:
r2 = r1
boolean r1 = r6.c(r13)
if (r1 == 0) goto L9e
int r1 = r6.e
int r0 = r0 + r1
L9e:
int r1 = r5.topMargin
int r17 = r0 + r1
int r0 = r6.c(r14)
int r3 = r17 + r0
r0 = r18
r1 = r14
r15 = r5
r5 = r16
r0.e(r1, r2, r3, r4, r5)
int r0 = r15.bottomMargin
int r1 = r6.d(r14)
int r2 = r6.c(r14, r13)
int r13 = r13 + r2
int r16 = r16 + r0
int r16 = r16 + r1
int r17 = r17 + r16
r0 = r17
Lc4:
r1 = 1
int r13 = r13 + r1
goto L3f
Lc8:
return
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.appcompat.widget.LinearLayoutCompat.d(int, int, int, int):void");
}
/* JADX WARN: Removed duplicated region for block: B:26:0x00aa */
/* JADX WARN: Removed duplicated region for block: B:29:0x00b3 */
/* JADX WARN: Removed duplicated region for block: B:37:0x00fb */
/* JADX WARN: Removed duplicated region for block: B:46:0x00e5 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
void c(int r26, int r27, int r28, int r29) {
/*
Method dump skipped, instructions count: 329
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.appcompat.widget.LinearLayoutCompat.c(int, int, int, int):void");
}
private void e(View view, int i, int i2, int i3, int i4) {
view.layout(i, i2, i3 + i, i4 + i2);
}
public void setOrientation(int i) {
if (this.k != i) {
this.k = i;
requestLayout();
}
}
public void setGravity(int i) {
if (this.h != i) {
if ((8388615 & i) == 0) {
i |= 8388611;
}
if ((i & 112) == 0) {
i |= 48;
}
this.h = i;
requestLayout();
}
}
public void setHorizontalGravity(int i) {
int i2 = i & 8388615;
int i3 = this.h;
if ((8388615 & i3) != i2) {
this.h = i2 | ((-8388616) & i3);
requestLayout();
}
}
public void setVerticalGravity(int i) {
int i2 = i & 112;
int i3 = this.h;
if ((i3 & 112) != i2) {
this.h = i2 | (i3 & (-113));
requestLayout();
}
}
@Override // android.view.ViewGroup
/* renamed from: ip_, reason: merged with bridge method [inline-methods] */
public RVV generateLayoutParams(AttributeSet attributeSet) {
return new RVV(getContext(), attributeSet);
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // android.view.ViewGroup
/* renamed from: u_, reason: merged with bridge method [inline-methods] */
public RVV generateDefaultLayoutParams() {
int i = this.k;
if (i == 0) {
return new RVV(-2, -2);
}
if (i == 1) {
return new RVV(-1, -2);
}
return null;
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // android.view.ViewGroup
/* renamed from: iq_, reason: merged with bridge method [inline-methods] */
public RVV generateLayoutParams(ViewGroup.LayoutParams layoutParams) {
return new RVV(layoutParams);
}
@Override // android.view.ViewGroup
protected boolean checkLayoutParams(ViewGroup.LayoutParams layoutParams) {
return layoutParams instanceof RVV;
}
@Override // android.view.View
public void onInitializeAccessibilityEvent(AccessibilityEvent accessibilityEvent) {
super.onInitializeAccessibilityEvent(accessibilityEvent);
accessibilityEvent.setClassName("androidx.appcompat.widget.LinearLayoutCompat");
}
@Override // android.view.View
public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo accessibilityNodeInfo) {
super.onInitializeAccessibilityNodeInfo(accessibilityNodeInfo);
accessibilityNodeInfo.setClassName("androidx.appcompat.widget.LinearLayoutCompat");
}
/* loaded from: classes.dex */
public static class RVV extends LinearLayout.LayoutParams {
public RVV(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
public RVV(int i, int i2) {
super(i, i2);
}
public RVV(int i, int i2, float f) {
super(i, i2, f);
}
public RVV(ViewGroup.LayoutParams layoutParams) {
super(layoutParams);
}
}
public void setMeasureWithLargestChildEnabled(boolean z) {
this.l = z;
}
public void setDividerPadding(int i) {
this.f = i;
}
public void setBaselineAligned(boolean z) {
this.a = z;
}
public int h() {
return this.h;
}
public int d() {
return this.i;
}
public Drawable ir_() {
return this.d;
}
}