soul-browser/sources/java/com/google/android/material/carousel/Arrangement.java
KaKi87 550ddb0413
Decompile and recreate Soul Browser v1.4.85 with APK CI builds (#1)
* 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>
2026-08-10 16:07:14 +02:00

83 lines
3 KiB
Java

package com.google.android.material.carousel;
import androidx.annotation.RestrictTo;
@RestrictTo
/* loaded from: classes3.dex */
public final class Arrangement {
/* renamed from: a, reason: collision with root package name */
public final int f11704a;
public final float b;
/* renamed from: c, reason: collision with root package name */
public int f11705c;
public int d;
public final float e;
public final float f;
public final int g;
public final float h;
/* JADX WARN: Code restructure failed: missing block: B:28:0x00b4, code lost:
if (r6 > r3.b) goto L44;
*/
/* JADX WARN: Code restructure failed: missing block: B:38:0x00c3, code lost:
if (r3.f <= r3.b) goto L43;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public Arrangement(int r4, float r5, float r6, float r7, int r8, float r9, int r10, float r11, int r12, float r13) {
/*
Method dump skipped, instructions count: 214
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.material.carousel.Arrangement.<init>(int, float, float, float, int, float, int, float, int, float):void");
}
public static Arrangement a(float f, float f2, float f3, float f4, int[] iArr, float f5, int[] iArr2, float f6, int[] iArr3) {
Arrangement arrangement = null;
int i = 1;
for (int i2 : iArr3) {
int length = iArr2.length;
int i3 = 0;
while (i3 < length) {
int i4 = iArr2[i3];
int length2 = iArr.length;
int i5 = 0;
while (i5 < length2) {
int i6 = length;
int i7 = i3;
int i8 = i;
int i9 = length2;
int i10 = i5;
Arrangement arrangement2 = new Arrangement(i8, f2, f3, f4, iArr[i5], f5, i4, f6, i2, f);
float f7 = arrangement2.h;
if (arrangement == null || f7 < arrangement.h) {
if (f7 == 0.0f) {
return arrangement2;
}
arrangement = arrangement2;
}
int i11 = i8 + 1;
i5 = i10 + 1;
i3 = i7;
i = i11;
length = i6;
length2 = i9;
}
i3++;
i = i;
length = length;
}
}
return arrangement;
}
public final String toString() {
return "Arrangement [priority=" + this.f11704a + ", smallCount=" + this.f11705c + ", smallSize=" + this.b + ", mediumCount=" + this.d + ", mediumSize=" + this.e + ", largeCount=" + this.g + ", largeSize=" + this.f + ", cost=" + this.h + "]";
}
}