* Decompile and recreate Soul Browser v1.4.85 with APK CI builds Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix CI build: include bundled google.jks and remove PR trigger The apktool build failed in CI because app/unknown/.../google.jks was excluded by the *.jks gitignore rule. Whitelist app-bundled JKS files and commit the missing resource. Also remove the redundant pull_request workflow trigger. Co-authored-by: KaKi87 <KaKi87@pm.me> * Change package ID to com.github.kaki87.soulbrowser Rename the application ID so the rebuilt APK can be installed alongside the original Soul Browser from Google Play. - Update AndroidManifest package, permissions, providers, and actions - Update R class references in smali (com/github/kaki87/soulbrowser/R) - Update shortcuts.xml targetPackage - Rename app label to "Soul Rebuild" for easy identification Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix install compatibility: remove split APK metadata and bundle native libs The rebuilt APK still declared requiredSplitTypes and Play Store split metadata, causing Android to reject standalone installs as incompatible. - Remove requiredSplitTypes and split-related manifest meta-data - Merge native libs from all ABI splits with uncompressed storage - Page-align before signing for extractNativeLibs=false - Add .so to apktool doNotCompress list Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix install failure: use apksigner v2/v3 and bundle arm64 native libs Target SDK 36 requires APK Signature Scheme v2+, but jarsigner only produces v1 signatures, causing Android to reject the install. - Sign with apksigner (v1+v2+v3) instead of jarsigner - Add arm64-v8a native libraries from universal Soul Browser 1.4.79 - Set extractNativeLibs=true for reliable sideload installs - Commit stable debug keystore for consistent signatures across builds Co-authored-by: KaKi87 <KaKi87@pm.me> * Add committed debug keystore for consistent APK signatures Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix startup crash: use original classes2.dex desugar libraries Apktool recompiles smali_classes2 into a broken classes2.dex, causing ClassNotFoundException for j$.com.android.tools.r8.a at ML Kit init. Inject the original classes2.dex (Java 8+ desugar libs) after apktool build instead of using the recompiled version. Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix missing drawable resources from density split APKs The base APK is an app bundle module; density-specific drawables like seek_thumb_nor_b live in config.xhdpi.apk and were missing after rebuild, causing Resources$NotFoundException at runtime. - Merge non-9-patch resources from split APKs before apktool build - Sync public.xml IDs from R smali only when backing files exist - Add 713 density-specific resource IDs to public.xml Co-authored-by: KaKi87 <KaKi87@pm.me> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
256 lines
9.3 KiB
Java
256 lines
9.3 KiB
Java
package androidx.appcompat.widget;
|
|
|
|
import android.content.Context;
|
|
import android.util.AttributeSet;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.widget.LinearLayout;
|
|
import androidx.annotation.Nullable;
|
|
import androidx.annotation.RestrictTo;
|
|
import androidx.appcompat.R;
|
|
import androidx.appcompat.widget.LinearLayoutCompat;
|
|
import androidx.core.view.ViewCompat;
|
|
import java.util.WeakHashMap;
|
|
|
|
@RestrictTo
|
|
/* loaded from: classes.dex */
|
|
public class AlertDialogLayout extends LinearLayoutCompat {
|
|
public AlertDialogLayout(@Nullable Context context, @Nullable AttributeSet attributeSet) {
|
|
super(context, attributeSet, 0);
|
|
}
|
|
|
|
public static int j(View view) {
|
|
WeakHashMap weakHashMap = ViewCompat.f792a;
|
|
int minimumHeight = view.getMinimumHeight();
|
|
if (minimumHeight > 0) {
|
|
return minimumHeight;
|
|
}
|
|
if (view instanceof ViewGroup) {
|
|
ViewGroup viewGroup = (ViewGroup) view;
|
|
if (viewGroup.getChildCount() == 1) {
|
|
return j(viewGroup.getChildAt(0));
|
|
}
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:25:0x009e */
|
|
@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 final void onLayout(boolean r10, int r11, int r12, int r13, int r14) {
|
|
/*
|
|
r9 = this;
|
|
int r10 = r9.getPaddingLeft()
|
|
int r13 = r13 - r11
|
|
int r11 = r9.getPaddingRight()
|
|
int r11 = r13 - r11
|
|
int r13 = r13 - r10
|
|
int r0 = r9.getPaddingRight()
|
|
int r13 = r13 - r0
|
|
int r0 = r9.getMeasuredHeight()
|
|
int r1 = r9.getChildCount()
|
|
int r2 = r9.getGravity()
|
|
r3 = r2 & 112(0x70, float:1.57E-43)
|
|
r4 = 8388615(0x800007, float:1.1754953E-38)
|
|
r2 = r2 & r4
|
|
r4 = 16
|
|
if (r3 == r4) goto L39
|
|
r4 = 80
|
|
if (r3 == r4) goto L30
|
|
int r12 = r9.getPaddingTop()
|
|
goto L43
|
|
L30:
|
|
int r3 = r9.getPaddingTop()
|
|
int r3 = r3 + r14
|
|
int r3 = r3 - r12
|
|
int r12 = r3 - r0
|
|
goto L43
|
|
L39:
|
|
int r3 = r9.getPaddingTop()
|
|
int r14 = r14 - r12
|
|
int r14 = r14 - r0
|
|
int r14 = r14 / 2
|
|
int r12 = r14 + r3
|
|
L43:
|
|
android.graphics.drawable.Drawable r14 = r9.getDividerDrawable()
|
|
r0 = 0
|
|
if (r14 != 0) goto L4c
|
|
r14 = r0
|
|
goto L50
|
|
L4c:
|
|
int r14 = r14.getIntrinsicHeight()
|
|
L50:
|
|
if (r0 >= r1) goto Lb0
|
|
android.view.View r3 = r9.getChildAt(r0)
|
|
if (r3 == 0) goto Lad
|
|
int r4 = r3.getVisibility()
|
|
r5 = 8
|
|
if (r4 == r5) goto Lad
|
|
int r4 = r3.getMeasuredWidth()
|
|
int r5 = r3.getMeasuredHeight()
|
|
android.view.ViewGroup$LayoutParams r6 = r3.getLayoutParams()
|
|
androidx.appcompat.widget.LinearLayoutCompat$LayoutParams r6 = (androidx.appcompat.widget.LinearLayoutCompat.LayoutParams) r6
|
|
int r7 = r6.gravity
|
|
if (r7 >= 0) goto L73
|
|
r7 = r2
|
|
L73:
|
|
int r8 = r9.getLayoutDirection()
|
|
int r7 = android.view.Gravity.getAbsoluteGravity(r7, r8)
|
|
r7 = r7 & 7
|
|
r8 = 1
|
|
if (r7 == r8) goto L8d
|
|
r8 = 5
|
|
if (r7 == r8) goto L87
|
|
int r7 = r6.leftMargin
|
|
int r7 = r7 + r10
|
|
goto L98
|
|
L87:
|
|
int r7 = r11 - r4
|
|
int r8 = r6.rightMargin
|
|
L8b:
|
|
int r7 = r7 - r8
|
|
goto L98
|
|
L8d:
|
|
int r7 = r13 - r4
|
|
int r7 = r7 / 2
|
|
int r7 = r7 + r10
|
|
int r8 = r6.leftMargin
|
|
int r7 = r7 + r8
|
|
int r8 = r6.rightMargin
|
|
goto L8b
|
|
L98:
|
|
boolean r8 = r9.i(r0)
|
|
if (r8 == 0) goto L9f
|
|
int r12 = r12 + r14
|
|
L9f:
|
|
int r8 = r6.topMargin
|
|
int r12 = r12 + r8
|
|
int r4 = r4 + r7
|
|
int r8 = r12 + r5
|
|
r3.layout(r7, r12, r4, r8)
|
|
int r3 = r6.bottomMargin
|
|
int r5 = r5 + r3
|
|
int r5 = r5 + r12
|
|
r12 = r5
|
|
Lad:
|
|
int r0 = r0 + 1
|
|
goto L50
|
|
Lb0:
|
|
return
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: androidx.appcompat.widget.AlertDialogLayout.onLayout(boolean, int, int, int, int):void");
|
|
}
|
|
|
|
@Override // androidx.appcompat.widget.LinearLayoutCompat, android.view.View
|
|
public final void onMeasure(int i, int i2) {
|
|
int i3;
|
|
int i4;
|
|
int i5;
|
|
int i6;
|
|
int makeMeasureSpec;
|
|
AlertDialogLayout alertDialogLayout = this;
|
|
int childCount = alertDialogLayout.getChildCount();
|
|
View view = null;
|
|
View view2 = null;
|
|
View view3 = null;
|
|
for (int i7 = 0; i7 < childCount; i7++) {
|
|
View childAt = alertDialogLayout.getChildAt(i7);
|
|
if (childAt.getVisibility() != 8) {
|
|
int id = childAt.getId();
|
|
if (id == R.id.topPanel) {
|
|
view = childAt;
|
|
} else if (id == R.id.buttonPanel) {
|
|
view2 = childAt;
|
|
} else {
|
|
if ((id != R.id.contentPanel && id != R.id.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 paddingBottom = alertDialogLayout.getPaddingBottom() + alertDialogLayout.getPaddingTop();
|
|
if (view != null) {
|
|
view.measure(i, 0);
|
|
paddingBottom += view.getMeasuredHeight();
|
|
i3 = View.combineMeasuredStates(0, view.getMeasuredState());
|
|
} else {
|
|
i3 = 0;
|
|
}
|
|
if (view2 != null) {
|
|
view2.measure(i, 0);
|
|
i4 = j(view2);
|
|
i5 = view2.getMeasuredHeight() - i4;
|
|
paddingBottom += i4;
|
|
i3 = View.combineMeasuredStates(i3, view2.getMeasuredState());
|
|
} else {
|
|
i4 = 0;
|
|
i5 = 0;
|
|
}
|
|
if (view3 != null) {
|
|
if (mode == 0) {
|
|
makeMeasureSpec = 0;
|
|
} else {
|
|
makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(Math.max(0, size - paddingBottom), mode);
|
|
}
|
|
view3.measure(i, makeMeasureSpec);
|
|
i6 = view3.getMeasuredHeight();
|
|
paddingBottom += i6;
|
|
i3 = View.combineMeasuredStates(i3, view3.getMeasuredState());
|
|
} else {
|
|
i6 = 0;
|
|
}
|
|
int i8 = size - paddingBottom;
|
|
if (view2 != null) {
|
|
int i9 = paddingBottom - i4;
|
|
int min = Math.min(i8, i5);
|
|
if (min > 0) {
|
|
i8 -= min;
|
|
i4 += min;
|
|
}
|
|
view2.measure(i, View.MeasureSpec.makeMeasureSpec(i4, 1073741824));
|
|
paddingBottom = i9 + view2.getMeasuredHeight();
|
|
i3 = View.combineMeasuredStates(i3, view2.getMeasuredState());
|
|
}
|
|
if (view3 != null && i8 > 0) {
|
|
view3.measure(i, View.MeasureSpec.makeMeasureSpec(i6 + i8, mode));
|
|
paddingBottom = (paddingBottom - i6) + view3.getMeasuredHeight();
|
|
i3 = View.combineMeasuredStates(i3, view3.getMeasuredState());
|
|
}
|
|
int i10 = 0;
|
|
for (int i11 = 0; i11 < childCount; i11++) {
|
|
View childAt2 = alertDialogLayout.getChildAt(i11);
|
|
if (childAt2.getVisibility() != 8) {
|
|
i10 = Math.max(i10, childAt2.getMeasuredWidth());
|
|
}
|
|
}
|
|
int i12 = i2;
|
|
alertDialogLayout.setMeasuredDimension(View.resolveSizeAndState(alertDialogLayout.getPaddingRight() + alertDialogLayout.getPaddingLeft() + i10, i, i3), View.resolveSizeAndState(paddingBottom, i12, 0));
|
|
if (mode2 != 1073741824) {
|
|
int makeMeasureSpec2 = View.MeasureSpec.makeMeasureSpec(alertDialogLayout.getMeasuredWidth(), 1073741824);
|
|
int i13 = 0;
|
|
while (i13 < childCount) {
|
|
View childAt3 = alertDialogLayout.getChildAt(i13);
|
|
if (childAt3.getVisibility() != 8) {
|
|
LinearLayoutCompat.LayoutParams layoutParams = (LinearLayoutCompat.LayoutParams) childAt3.getLayoutParams();
|
|
if (((LinearLayout.LayoutParams) layoutParams).width == -1) {
|
|
int i14 = ((LinearLayout.LayoutParams) layoutParams).height;
|
|
((LinearLayout.LayoutParams) layoutParams).height = childAt3.getMeasuredHeight();
|
|
alertDialogLayout.measureChildWithMargins(childAt3, makeMeasureSpec2, 0, i12, 0);
|
|
((LinearLayout.LayoutParams) layoutParams).height = i14;
|
|
}
|
|
}
|
|
i13++;
|
|
alertDialogLayout = this;
|
|
i12 = i2;
|
|
}
|
|
}
|
|
}
|
|
}
|