soul-browser/sources/java/kotlin/text/CharsKt__CharKt.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

112 lines
5.3 KiB
Java

package kotlin.text;
import com.google.android.gms.ads.RequestConfiguration;
import kotlin.Metadata;
import kotlin.SinceKotlin;
import kotlin.internal.InlineOnly;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/* JADX INFO: Access modifiers changed from: package-private */
@Metadata(d1 = {"\u0000\u001e\n\u0000\n\u0002\u0010\b\n\u0002\u0010\f\n\u0002\b\u0006\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0003\u001a\f\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u0007\u001a\u0014\u0010\u0000\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0003\u001a\u00020\u0001H\u0007\u001a\u0013\u0010\u0004\u001a\u0004\u0018\u00010\u0001*\u00020\u0002H\u0007¢\u0006\u0002\u0010\u0005\u001a\u001b\u0010\u0004\u001a\u0004\u0018\u00010\u0001*\u00020\u00022\u0006\u0010\u0003\u001a\u00020\u0001H\u0007¢\u0006\u0002\u0010\u0006\u001a\f\u0010\u0007\u001a\u00020\u0002*\u00020\u0001H\u0007\u001a\u0014\u0010\u0007\u001a\u00020\u0002*\u00020\u00012\u0006\u0010\u0003\u001a\u00020\u0001H\u0007\u001a\f\u0010\b\u001a\u00020\t*\u00020\u0002H\u0007\u001a\u0015\u0010\n\u001a\u00020\t*\u00020\u00022\u0006\u0010\u000b\u001a\u00020\tH\u0087\n\u001a\u001c\u0010\f\u001a\u00020\r*\u00020\u00022\u0006\u0010\u000b\u001a\u00020\u00022\b\b\u0002\u0010\u000e\u001a\u00020\r\u001a\n\u0010\u000f\u001a\u00020\r*\u00020\u0002¨\u0006\u0010"}, d2 = {"digitToInt", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "radix", "digitToIntOrNull", "(C)Ljava/lang/Integer;", "(CI)Ljava/lang/Integer;", "digitToChar", "titlecase", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "plus", "other", "equals", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "ignoreCase", "isSurrogate", "kotlin-stdlib"}, k = 5, mv = {2, 2, 0}, xi = 49, xs = "kotlin/text/CharsKt")
@SourceDebugExtension({"SMAP\nChar.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Char.kt\nkotlin/text/CharsKt__CharKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,339:1\n1#2:340\n*E\n"})
/* loaded from: classes4.dex */
public class CharsKt__CharKt extends CharsKt__CharJVMKt {
@SinceKotlin(version = "1.5")
public static final char digitToChar(int i) {
if (i < 0 || i >= 10) {
throw new IllegalArgumentException(android.support.v4.media.a.f(i, "Int ", " is not a decimal digit"));
}
return (char) (i + 48);
}
@SinceKotlin(version = "1.5")
public static final int digitToInt(char c2) {
int digitOf = CharsKt__CharJVMKt.digitOf(c2, 10);
if (digitOf >= 0) {
return digitOf;
}
throw new IllegalArgumentException("Char " + c2 + " is not a decimal digit");
}
@SinceKotlin(version = "1.5")
@Nullable
public static final Integer digitToIntOrNull(char c2) {
Integer valueOf = Integer.valueOf(CharsKt__CharJVMKt.digitOf(c2, 10));
if (valueOf.intValue() >= 0) {
return valueOf;
}
return null;
}
public static final boolean equals(char c2, char c3, boolean z) {
if (c2 == c3) {
return true;
}
if (!z) {
return false;
}
char upperCase = Character.toUpperCase(c2);
char upperCase2 = Character.toUpperCase(c3);
if (upperCase == upperCase2 || Character.toLowerCase(upperCase) == Character.toLowerCase(upperCase2)) {
return true;
}
return false;
}
public static /* synthetic */ boolean equals$default(char c2, char c3, boolean z, int i, Object obj) {
if ((i & 2) != 0) {
z = false;
}
return equals(c2, c3, z);
}
public static boolean isSurrogate(char c2) {
return 55296 <= c2 && c2 < 57344;
}
@InlineOnly
private static final String plus(char c2, String other) {
Intrinsics.checkNotNullParameter(other, "other");
return c2 + other;
}
@SinceKotlin(version = "1.5")
@NotNull
public static final String titlecase(char c2) {
return _OneToManyTitlecaseMappingsKt.titlecaseImpl(c2);
}
@SinceKotlin(version = "1.5")
@Nullable
public static final Integer digitToIntOrNull(char c2, int i) {
CharsKt__CharJVMKt.checkRadix(i);
Integer valueOf = Integer.valueOf(CharsKt__CharJVMKt.digitOf(c2, i));
if (valueOf.intValue() >= 0) {
return valueOf;
}
return null;
}
@SinceKotlin(version = "1.5")
public static final int digitToInt(char c2, int i) {
Integer digitToIntOrNull = digitToIntOrNull(c2, i);
if (digitToIntOrNull != null) {
return digitToIntOrNull.intValue();
}
throw new IllegalArgumentException("Char " + c2 + " is not a digit in the given radix=" + i);
}
@SinceKotlin(version = "1.5")
public static final char digitToChar(int i, int i2) {
if (2 > i2 || i2 >= 37) {
throw new IllegalArgumentException(android.support.v4.media.a.f(i2, "Invalid radix: ", ". Valid radix values are in range 2..36"));
}
if (i < 0 || i >= i2) {
throw new IllegalArgumentException(androidx.work.impl.workers.a.s("Digit ", i, i2, " does not represent a valid digit in radix "));
}
return (char) (i < 10 ? i + 48 : ((char) (i + 65)) - '\n');
}
}