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

246 lines
8.7 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package androidx.appcompat.widget;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import androidx.appcompat.widget.LinearLayoutCompat;
import androidx.core.view.ViewCompat;
import o.SYO;
/* loaded from: classes.dex */
public class AlertDialogLayout extends LinearLayoutCompat {
public AlertDialogLayout(Context context) {
super(context);
}
public AlertDialogLayout(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
/* JADX INFO: Access modifiers changed from: protected */
/* JADX WARN: Removed duplicated region for block: B:25:0x009b */
@Override // androidx.appcompat.widget.LinearLayoutCompat, android.view.ViewGroup, android.view.View
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public void onLayout(boolean r11, int r12, int r13, int r14, int r15) {
/*
r10 = this;
int r11 = r10.getPaddingLeft()
int r14 = r14 - r12
int r12 = r10.getPaddingRight()
int r0 = r10.getPaddingRight()
int r1 = r10.getMeasuredHeight()
int r2 = r10.getChildCount()
int r3 = r10.h()
r4 = r3 & 112(0x70, float:1.57E-43)
r5 = 16
if (r4 == r5) goto L31
r5 = 80
if (r4 == r5) goto L28
int r13 = r10.getPaddingTop()
goto L3b
L28:
int r4 = r10.getPaddingTop()
int r4 = r4 + r15
int r4 = r4 - r13
int r13 = r4 - r1
goto L3b
L31:
int r4 = r10.getPaddingTop()
int r15 = r15 - r13
int r15 = r15 - r1
int r15 = r15 / 2
int r13 = r4 + r15
L3b:
android.graphics.drawable.Drawable r15 = r10.ir_()
r1 = 0
if (r15 != 0) goto L44
r15 = r1
goto L48
L44:
int r15 = r15.getIntrinsicHeight()
L48:
if (r1 >= r2) goto Lac
android.view.View r4 = r10.getChildAt(r1)
if (r4 == 0) goto La9
int r5 = r4.getVisibility()
r6 = 8
if (r5 == r6) goto La9
int r5 = r4.getMeasuredWidth()
int r6 = r4.getMeasuredHeight()
android.view.ViewGroup$LayoutParams r7 = r4.getLayoutParams()
androidx.appcompat.widget.LinearLayoutCompat$RVV r7 = (androidx.appcompat.widget.LinearLayoutCompat.RVV) r7
int r8 = r7.gravity
if (r8 >= 0) goto L6e
r8 = 8388615(0x800007, float:1.1754953E-38)
r8 = r8 & r3
L6e:
int r9 = androidx.core.view.ViewCompat.m(r10)
int r8 = o.HpP.c(r8, r9)
r8 = r8 & 7
r9 = 1
if (r8 == r9) goto L88
r9 = 5
if (r8 == r9) goto L82
int r8 = r7.leftMargin
int r8 = r8 + r11
goto L95
L82:
int r8 = r14 - r12
int r8 = r8 - r5
int r9 = r7.rightMargin
goto L94
L88:
int r8 = r14 - r11
int r8 = r8 - r0
int r8 = r8 - r5
int r8 = r8 / 2
int r8 = r8 + r11
int r9 = r7.leftMargin
int r8 = r8 + r9
int r9 = r7.rightMargin
L94:
int r8 = r8 - r9
L95:
boolean r9 = r10.c(r1)
if (r9 == 0) goto L9c
int r13 = r13 + r15
L9c:
int r9 = r7.topMargin
int r13 = r13 + r9
int r5 = r5 + r8
int r9 = r6 + r13
r4.layout(r8, r13, r5, r9)
int r4 = r7.bottomMargin
int r6 = r6 + r4
int r13 = r13 + r6
La9:
int r1 = r1 + 1
goto L48
Lac:
return
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.appcompat.widget.AlertDialogLayout.onLayout(boolean, int, int, int, int):void");
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // androidx.appcompat.widget.LinearLayoutCompat, android.view.View
public void onMeasure(int i, int i2) {
int i3;
int i4;
int i5;
int i6;
int i7;
int childCount = getChildCount();
View view = null;
View view2 = null;
View view3 = null;
for (int i8 = 0; i8 < childCount; i8++) {
View childAt = getChildAt(i8);
if (childAt.getVisibility() != 8) {
int id = childAt.getId();
if (id == SYO.saX.topPanel) {
view = childAt;
} else if (id == SYO.saX.buttonPanel) {
view2 = childAt;
} else {
if ((id != SYO.saX.contentPanel && id != SYO.saX.customPanel) || view3 != null) {
super.onMeasure(i, i2);
return;
}
view3 = childAt;
}
}
}
int mode = View.MeasureSpec.getMode(i2);
int size = View.MeasureSpec.getSize(i2);
int mode2 = View.MeasureSpec.getMode(i);
int paddingTop = getPaddingTop() + getPaddingBottom();
if (view != null) {
view.measure(i, 0);
paddingTop += view.getMeasuredHeight();
i3 = View.combineMeasuredStates(0, view.getMeasuredState());
} else {
i3 = 0;
}
if (view2 != null) {
view2.measure(i, 0);
View view4 = view2;
while (true) {
i5 = ViewCompat.o(view4);
if (i5 > 0) {
break;
}
if (!(view4 instanceof ViewGroup)) {
break;
}
ViewGroup viewGroup = (ViewGroup) view4;
if (viewGroup.getChildCount() != 1) {
break;
} else {
view4 = viewGroup.getChildAt(0);
}
}
i5 = 0;
i4 = view2.getMeasuredHeight() - i5;
paddingTop += i5;
i3 = View.combineMeasuredStates(i3, view2.getMeasuredState());
} else {
i4 = 0;
i5 = 0;
}
if (view3 != null) {
view3.measure(i, mode == 0 ? 0 : View.MeasureSpec.makeMeasureSpec(Math.max(0, size - paddingTop), mode));
i6 = view3.getMeasuredHeight();
paddingTop += i6;
i3 = View.combineMeasuredStates(i3, view3.getMeasuredState());
} else {
i6 = 0;
}
int i9 = size - paddingTop;
if (view2 != null) {
int min = Math.min(i9, i4);
if (min > 0) {
i9 -= min;
i7 = min + i5;
} else {
i7 = i5;
}
view2.measure(i, View.MeasureSpec.makeMeasureSpec(i7, 1073741824));
paddingTop = (paddingTop - i5) + view2.getMeasuredHeight();
i3 = View.combineMeasuredStates(i3, view2.getMeasuredState());
}
if (view3 != null && i9 > 0) {
view3.measure(i, View.MeasureSpec.makeMeasureSpec(i9 + i6, mode));
paddingTop = (paddingTop - i6) + view3.getMeasuredHeight();
i3 = View.combineMeasuredStates(i3, view3.getMeasuredState());
}
int i10 = 0;
for (int i11 = 0; i11 < childCount; i11++) {
View childAt2 = getChildAt(i11);
if (childAt2.getVisibility() != 8) {
i10 = Math.max(i10, childAt2.getMeasuredWidth());
}
}
setMeasuredDimension(View.resolveSizeAndState(i10 + getPaddingLeft() + getPaddingRight(), i, i3), View.resolveSizeAndState(paddingTop, i2, 0));
if (mode2 != 1073741824) {
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(getMeasuredWidth(), 1073741824);
for (int i12 = 0; i12 < childCount; i12++) {
View childAt3 = getChildAt(i12);
if (childAt3.getVisibility() != 8) {
LinearLayoutCompat.RVV rvv = (LinearLayoutCompat.RVV) childAt3.getLayoutParams();
if (((ViewGroup.LayoutParams) rvv).width == -1) {
int i13 = ((ViewGroup.LayoutParams) rvv).height;
((ViewGroup.LayoutParams) rvv).height = childAt3.getMeasuredHeight();
measureChildWithMargins(childAt3, makeMeasureSpec, 0, i2, 0);
((ViewGroup.LayoutParams) rvv).height = i13;
}
}
}
}
}
}