soul-browser/sources/java/j$/time/format/f.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

158 lines
5.6 KiB
Java

package j$.time.format;
import com.google.android.gms.ads.RequestConfiguration;
import j$.util.Objects;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
/* loaded from: classes2.dex */
public final class f extends i {
public final boolean g;
@Override // j$.time.format.i
public final boolean b(v vVar) {
return vVar.f21220c && this.b == this.f21203c && !this.g;
}
@Override // j$.time.format.i, j$.time.format.e
public final int g(v vVar, CharSequence charSequence, int i) {
boolean z = vVar.f21220c;
DateTimeFormatter dateTimeFormatter = vVar.f21219a;
int i2 = (z || b(vVar)) ? this.b : 0;
int i3 = (vVar.f21220c || b(vVar)) ? this.f21203c : 9;
int length = charSequence.length();
if (i != length) {
if (this.g) {
char charAt = charSequence.charAt(i);
dateTimeFormatter.f21186c.getClass();
if (charAt == '.') {
i++;
} else if (i2 > 0) {
return ~i;
}
}
int i4 = i;
int i5 = i2 + i4;
if (i5 > length) {
return ~i4;
}
int min = Math.min(i3 + i4, length);
int i6 = 0;
int i7 = i4;
while (true) {
if (i7 >= min) {
break;
}
int i8 = i7 + 1;
char charAt2 = charSequence.charAt(i7);
dateTimeFormatter.f21186c.getClass();
int i9 = charAt2 - '0';
if (i9 < 0 || i9 > 9) {
i9 = -1;
}
if (i9 >= 0) {
i6 = (i6 * 10) + i9;
i7 = i8;
} else if (i8 < i5) {
return ~i4;
}
}
BigDecimal movePointLeft = new BigDecimal(i6).movePointLeft(i7 - i4);
j$.time.temporal.v range = this.f21202a.range();
BigDecimal valueOf = BigDecimal.valueOf(range.f21258a);
return vVar.f(this.f21202a, movePointLeft.multiply(BigDecimal.valueOf(range.d).subtract(valueOf).add(BigDecimal.ONE)).setScale(0, RoundingMode.FLOOR).add(valueOf).longValueExact(), i4, i7);
}
if (i2 > 0) {
return ~i;
}
return i;
}
public f(j$.time.temporal.r rVar, int i, int i2, boolean z) {
this(rVar, i, i2, z, 0);
Objects.requireNonNull(rVar, "field");
j$.time.temporal.v range = rVar.range();
if (range.f21258a != range.b || range.f21259c != range.d) {
throw new IllegalArgumentException(j$.time.c.a("Field must have a fixed set of values: ", rVar));
}
if (i < 0 || i > 9) {
throw new IllegalArgumentException("Minimum width must be from 0 to 9 inclusive but was " + i);
}
if (i2 < 1 || i2 > 9) {
throw new IllegalArgumentException("Maximum width must be from 1 to 9 inclusive but was " + i2);
}
if (i2 >= i) {
return;
}
throw new IllegalArgumentException("Maximum width must exceed or equal the minimum width but " + i2 + " < " + i);
}
public f(j$.time.temporal.r rVar, int i, int i2, boolean z, int i3) {
super(rVar, i, i2, f0.NOT_NEGATIVE, i3);
this.g = z;
}
@Override // j$.time.format.i
public final i e() {
if (this.e == -1) {
return this;
}
return new f(this.f21202a, this.b, this.f21203c, this.g, -1);
}
@Override // j$.time.format.i
public final i f(int i) {
return new f(this.f21202a, this.b, this.f21203c, this.g, this.e + i);
}
@Override // j$.time.format.i, j$.time.format.e
public final boolean d(y yVar, StringBuilder sb) {
j$.time.temporal.r rVar = this.f21202a;
Long a2 = yVar.a(rVar);
if (a2 == null) {
return false;
}
c0 c0Var = yVar.b.f21186c;
long longValue = a2.longValue();
j$.time.temporal.v range = rVar.range();
range.b(longValue, rVar);
BigDecimal valueOf = BigDecimal.valueOf(range.f21258a);
BigDecimal add = BigDecimal.valueOf(range.d).subtract(valueOf).add(BigDecimal.ONE);
BigDecimal subtract = BigDecimal.valueOf(longValue).subtract(valueOf);
RoundingMode roundingMode = RoundingMode.FLOOR;
BigDecimal divide = subtract.divide(add, 9, roundingMode);
BigDecimal bigDecimal = BigDecimal.ZERO;
if (divide.compareTo(bigDecimal) != 0) {
bigDecimal = divide.signum() == 0 ? new BigDecimal(BigInteger.ZERO, 0) : divide.stripTrailingZeros();
}
int scale = bigDecimal.scale();
boolean z = this.g;
int i = this.b;
if (scale != 0) {
String substring = bigDecimal.setScale(Math.min(Math.max(bigDecimal.scale(), i), this.f21203c), roundingMode).toPlainString().substring(2);
c0Var.getClass();
if (z) {
sb.append('.');
}
sb.append(substring);
return true;
}
if (i > 0) {
if (z) {
c0Var.getClass();
sb.append('.');
}
for (int i2 = 0; i2 < i; i2++) {
c0Var.getClass();
sb.append('0');
}
}
return true;
}
@Override // j$.time.format.i
public final String toString() {
return "Fraction(" + this.f21202a + "," + this.b + "," + this.f21203c + (this.g ? ",DecimalPoint" : RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED) + ")";
}
}