soul-browser/sources/java/androidx/constraintlayout/core/SolverVariableValues.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

248 lines
7 KiB
Java

package androidx.constraintlayout.core;
import androidx.constraintlayout.core.ArrayRow;
import java.util.Arrays;
/* loaded from: classes.dex */
public class SolverVariableValues implements ArrayRow.ArrayRowVariables {
/* renamed from: a, reason: collision with root package name */
public int f506a;
public int[] b;
/* renamed from: c, reason: collision with root package name */
public int[] f507c;
public float[] d;
public int[] e;
public int[] f;
public int g;
public int h;
@Override // androidx.constraintlayout.core.ArrayRow.ArrayRowVariables
public final int a() {
return this.g;
}
@Override // androidx.constraintlayout.core.ArrayRow.ArrayRowVariables
public final boolean b(SolverVariable solverVariable) {
m(solverVariable);
return false;
}
@Override // androidx.constraintlayout.core.ArrayRow.ArrayRowVariables
public final float c(ArrayRow arrayRow, boolean z) {
j(arrayRow.f495a);
i(arrayRow.f495a, z);
SolverVariableValues solverVariableValues = (SolverVariableValues) arrayRow.d;
int i = solverVariableValues.g;
int i2 = 0;
while (i > 0) {
if (solverVariableValues.f507c[i2] == -1) {
i2++;
} else {
float f = solverVariableValues.d[i2];
throw null;
}
}
return 0.0f;
}
@Override // androidx.constraintlayout.core.ArrayRow.ArrayRowVariables
public final void clear() {
int i = this.g;
for (int i2 = 0; i2 < i; i2++) {
if (e(i2) != null) {
throw null;
}
}
for (int i3 = 0; i3 < this.f506a; i3++) {
this.f507c[i3] = -1;
this.b[i3] = -1;
}
this.g = 0;
this.h = -1;
}
@Override // androidx.constraintlayout.core.ArrayRow.ArrayRowVariables
public final void d(SolverVariable solverVariable, float f) {
if (f > -0.001f && f < 0.001f) {
i(solverVariable, true);
return;
}
int i = 0;
if (this.g != 0) {
m(solverVariable);
int i2 = this.g + 1;
int i3 = this.f506a;
if (i2 >= i3) {
int i4 = i3 * 2;
this.f507c = Arrays.copyOf(this.f507c, i4);
this.d = Arrays.copyOf(this.d, i4);
this.e = Arrays.copyOf(this.e, i4);
this.f = Arrays.copyOf(this.f, i4);
this.b = Arrays.copyOf(this.b, i4);
for (int i5 = this.f506a; i5 < i4; i5++) {
this.f507c[i5] = -1;
this.b[i5] = -1;
}
this.f506a = i4;
}
int i6 = this.g;
int i7 = this.h;
int i8 = -1;
for (int i9 = 0; i9 < i6; i9++) {
int i10 = this.f507c[i7];
int i11 = solverVariable.f;
if (i10 == i11) {
this.d[i7] = f;
return;
}
if (i10 < i11) {
i8 = i7;
}
i7 = this.f[i7];
if (i7 == -1) {
break;
}
}
while (true) {
if (i < this.f506a) {
if (this.f507c[i] == -1) {
break;
} else {
i++;
}
} else {
i = -1;
break;
}
}
l(i, solverVariable, f);
if (i8 != -1) {
this.e[i] = i8;
int[] iArr = this.f;
iArr[i] = iArr[i8];
iArr[i8] = i;
} else {
this.e[i] = -1;
if (this.g > 0) {
this.f[i] = this.h;
this.h = i;
} else {
this.f[i] = -1;
}
}
int i12 = this.f[i];
if (i12 != -1) {
this.e[i12] = i;
throw null;
}
throw null;
}
l(0, solverVariable, f);
throw null;
}
@Override // androidx.constraintlayout.core.ArrayRow.ArrayRowVariables
public final SolverVariable e(int i) {
int i2 = this.g;
if (i2 == 0) {
return null;
}
int i3 = this.h;
for (int i4 = 0; i4 < i2; i4++) {
if (i4 == i && i3 != -1) {
throw null;
}
i3 = this.f[i3];
if (i3 == -1) {
break;
}
}
return null;
}
@Override // androidx.constraintlayout.core.ArrayRow.ArrayRowVariables
public final void f(SolverVariable solverVariable, float f, boolean z) {
if (f > -0.001f && f < 0.001f) {
return;
}
m(solverVariable);
d(solverVariable, f);
}
@Override // androidx.constraintlayout.core.ArrayRow.ArrayRowVariables
public final void g() {
int i = this.g;
int i2 = this.h;
for (int i3 = 0; i3 < i; i3++) {
float[] fArr = this.d;
fArr[i2] = fArr[i2] * (-1.0f);
i2 = this.f[i2];
if (i2 == -1) {
return;
}
}
}
@Override // androidx.constraintlayout.core.ArrayRow.ArrayRowVariables
public final float h(int i) {
int i2 = this.g;
int i3 = this.h;
for (int i4 = 0; i4 < i2; i4++) {
if (i4 == i) {
return this.d[i3];
}
i3 = this.f[i3];
if (i3 == -1) {
return 0.0f;
}
}
return 0.0f;
}
@Override // androidx.constraintlayout.core.ArrayRow.ArrayRowVariables
public final float i(SolverVariable solverVariable, boolean z) {
m(solverVariable);
return 0.0f;
}
@Override // androidx.constraintlayout.core.ArrayRow.ArrayRowVariables
public final float j(SolverVariable solverVariable) {
m(solverVariable);
return 0.0f;
}
@Override // androidx.constraintlayout.core.ArrayRow.ArrayRowVariables
public final void k(float f) {
int i = this.g;
int i2 = this.h;
for (int i3 = 0; i3 < i; i3++) {
float[] fArr = this.d;
fArr[i2] = fArr[i2] / f;
i2 = this.f[i2];
if (i2 == -1) {
return;
}
}
}
public final void l(int i, SolverVariable solverVariable, float f) {
this.f507c[i] = solverVariable.f;
this.d[i] = f;
this.e[i] = -1;
this.f[i] = -1;
throw null;
}
public final int m(SolverVariable solverVariable) {
if (this.g != 0 && solverVariable != null) {
throw null;
}
return -1;
}
public final String toString() {
throw null;
}
}