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

160 lines
11 KiB
Java

package kotlin.text;
import com.google.android.gms.ads.RequestConfiguration;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Comparator;
import java.util.SortedSet;
import java.util.TreeSet;
import kotlin.Deprecated;
import kotlin.DeprecatedSinceKotlin;
import kotlin.Metadata;
import kotlin.OverloadResolutionByLambdaReturnType;
import kotlin.ReplaceWith;
import kotlin.SinceKotlin;
import kotlin.internal.InlineOnly;
import kotlin.jvm.JvmName;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import org.jetbrains.annotations.NotNull;
/* JADX INFO: Access modifiers changed from: package-private */
@Metadata(d1 = {"\u0000B\n\u0000\n\u0002\u0010\f\n\u0002\u0010\r\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u000f\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u001a\u0015\u0010\u0000\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0003\u001a\u00020\u0004H\u0087\b\u001a\u0010\u0010\u0005\u001a\b\u0012\u0004\u0012\u00020\u00010\u0006*\u00020\u0002\u001a\u0013\u0010\u0007\u001a\u0004\u0018\u00010\u0001*\u00020\u0002H\u0007¢\u0006\u0002\u0010\b\u001a;\u0010\t\u001a\u0004\u0018\u00010\u0001\"\u000e\b\u0000\u0010\n*\b\u0012\u0004\u0012\u0002H\n0\u000b*\u00020\u00022\u0012\u0010\f\u001a\u000e\u0012\u0004\u0012\u00020\u0001\u0012\u0004\u0012\u0002H\n0\rH\u0087\\u0001\u0000¢\u0006\u0002\u0010\u000e\u001a/\u0010\u000f\u001a\u0004\u0018\u00010\u0001*\u00020\u00022\u001a\u0010\u0010\u001a\u0016\u0012\u0006\b\u0000\u0012\u00020\u00010\u0011j\n\u0012\u0006\b\u0000\u0012\u00020\u0001`\u0012H\u0007¢\u0006\u0002\u0010\u0013\u001a\u0013\u0010\u0014\u001a\u0004\u0018\u00010\u0001*\u00020\u0002H\u0007¢\u0006\u0002\u0010\b\u001a;\u0010\u0015\u001a\u0004\u0018\u00010\u0001\"\u000e\b\u0000\u0010\n*\b\u0012\u0004\u0012\u0002H\n0\u000b*\u00020\u00022\u0012\u0010\f\u001a\u000e\u0012\u0004\u0012\u00020\u0001\u0012\u0004\u0012\u0002H\n0\rH\u0087\\u0001\u0000¢\u0006\u0002\u0010\u000e\u001a/\u0010\u0016\u001a\u0004\u0018\u00010\u0001*\u00020\u00022\u001a\u0010\u0010\u001a\u0016\u0012\u0006\b\u0000\u0012\u00020\u00010\u0011j\n\u0012\u0006\b\u0000\u0012\u00020\u0001`\u0012H\u0007¢\u0006\u0002\u0010\u0013\u001a)\u0010\u0017\u001a\u00020\u0018*\u00020\u00022\u0012\u0010\f\u001a\u000e\u0012\u0004\u0012\u00020\u0001\u0012\u0004\u0012\u00020\u00180\rH\u0087\\u0001\u0000¢\u0006\u0002\b\u0019\u001a)\u0010\u0017\u001a\u00020\u001a*\u00020\u00022\u0012\u0010\f\u001a\u000e\u0012\u0004\u0012\u00020\u0001\u0012\u0004\u0012\u00020\u001a0\rH\u0087\\u0001\u0000¢\u0006\u0002\b\u001b\u0082\u0002\u0007\n\u0005\b\u009920\u0001¨\u0006\u001c"}, d2 = {"elementAt", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "index", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "toSortedSet", "Ljava/util/SortedSet;", "max", "(Ljava/lang/CharSequence;)Ljava/lang/Character;", "maxBy", "R", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "selector", "Lkotlin/Function1;", "(Ljava/lang/CharSequence;Lkotlin/jvm/functions/Function1;)Ljava/lang/Character;", "maxWith", "comparator", "Ljava/util/Comparator;", "Lkotlin/Comparator;", "(Ljava/lang/CharSequence;Ljava/util/Comparator;)Ljava/lang/Character;", "min", "minBy", "minWith", "sumOf", "Ljava/math/BigDecimal;", "sumOfBigDecimal", "Ljava/math/BigInteger;", "sumOfBigInteger", "kotlin-stdlib"}, k = 5, mv = {2, 2, 0}, xi = 49, xs = "kotlin/text/StringsKt")
@SourceDebugExtension({"SMAP\n_StringsJvm.kt\nKotlin\n*S Kotlin\n*F\n+ 1 _StringsJvm.kt\nkotlin/text/StringsKt___StringsJvmKt\n+ 2 _Strings.kt\nkotlin/text/StringsKt___StringsKt\n*L\n1#1,108:1\n1260#2,14:109\n1584#2,14:123\n*S KotlinDebug\n*F\n+ 1 _StringsJvm.kt\nkotlin/text/StringsKt___StringsJvmKt\n*L\n45#1:109,14\n66#1:123,14\n*E\n"})
/* loaded from: classes4.dex */
public class StringsKt___StringsJvmKt extends StringsKt__StringsKt {
@InlineOnly
private static final char elementAt(CharSequence charSequence, int i) {
Intrinsics.checkNotNullParameter(charSequence, "<this>");
return charSequence.charAt(i);
}
@Deprecated(message = "Use maxOrNull instead.", replaceWith = @ReplaceWith(expression = "this.maxOrNull()", imports = {}))
@DeprecatedSinceKotlin(errorSince = "1.5", hiddenSince = "1.6", warningSince = "1.4")
public static final /* synthetic */ Character max(CharSequence charSequence) {
Intrinsics.checkNotNullParameter(charSequence, "<this>");
return StringsKt___StringsKt.maxOrNull(charSequence);
}
@Deprecated(message = "Use maxByOrNull instead.", replaceWith = @ReplaceWith(expression = "this.maxByOrNull(selector)", imports = {}))
@DeprecatedSinceKotlin(errorSince = "1.5", hiddenSince = "1.6", warningSince = "1.4")
public static final /* synthetic */ <R extends Comparable<? super R>> Character maxBy(CharSequence charSequence, Function1<? super Character, ? extends R> function1) {
if (com.mycompany.app.dialog.a.b(charSequence, "<this>", function1, "selector") == 0) {
return null;
}
char charAt = charSequence.charAt(0);
int lastIndex = StringsKt__StringsKt.getLastIndex(charSequence);
if (lastIndex == 0) {
return Character.valueOf(charAt);
}
R invoke = function1.invoke(Character.valueOf(charAt));
int i = 1;
if (1 <= lastIndex) {
while (true) {
char charAt2 = charSequence.charAt(i);
R invoke2 = function1.invoke(Character.valueOf(charAt2));
if (invoke.compareTo(invoke2) < 0) {
charAt = charAt2;
invoke = invoke2;
}
if (i == lastIndex) {
break;
}
i++;
}
}
return Character.valueOf(charAt);
}
@Deprecated(message = "Use maxWithOrNull instead.", replaceWith = @ReplaceWith(expression = "this.maxWithOrNull(comparator)", imports = {}))
@DeprecatedSinceKotlin(errorSince = "1.5", hiddenSince = "1.6", warningSince = "1.4")
public static final /* synthetic */ Character maxWith(CharSequence charSequence, Comparator comparator) {
Intrinsics.checkNotNullParameter(charSequence, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
return StringsKt___StringsKt.maxWithOrNull(charSequence, comparator);
}
@Deprecated(message = "Use minOrNull instead.", replaceWith = @ReplaceWith(expression = "this.minOrNull()", imports = {}))
@DeprecatedSinceKotlin(errorSince = "1.5", hiddenSince = "1.6", warningSince = "1.4")
public static final /* synthetic */ Character min(CharSequence charSequence) {
Intrinsics.checkNotNullParameter(charSequence, "<this>");
return StringsKt___StringsKt.minOrNull(charSequence);
}
@Deprecated(message = "Use minByOrNull instead.", replaceWith = @ReplaceWith(expression = "this.minByOrNull(selector)", imports = {}))
@DeprecatedSinceKotlin(errorSince = "1.5", hiddenSince = "1.6", warningSince = "1.4")
public static final /* synthetic */ <R extends Comparable<? super R>> Character minBy(CharSequence charSequence, Function1<? super Character, ? extends R> function1) {
if (com.mycompany.app.dialog.a.b(charSequence, "<this>", function1, "selector") == 0) {
return null;
}
char charAt = charSequence.charAt(0);
int lastIndex = StringsKt__StringsKt.getLastIndex(charSequence);
if (lastIndex == 0) {
return Character.valueOf(charAt);
}
R invoke = function1.invoke(Character.valueOf(charAt));
int i = 1;
if (1 <= lastIndex) {
while (true) {
char charAt2 = charSequence.charAt(i);
R invoke2 = function1.invoke(Character.valueOf(charAt2));
if (invoke.compareTo(invoke2) > 0) {
charAt = charAt2;
invoke = invoke2;
}
if (i == lastIndex) {
break;
}
i++;
}
}
return Character.valueOf(charAt);
}
@Deprecated(message = "Use minWithOrNull instead.", replaceWith = @ReplaceWith(expression = "this.minWithOrNull(comparator)", imports = {}))
@DeprecatedSinceKotlin(errorSince = "1.5", hiddenSince = "1.6", warningSince = "1.4")
public static final /* synthetic */ Character minWith(CharSequence charSequence, Comparator comparator) {
Intrinsics.checkNotNullParameter(charSequence, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
return StringsKt___StringsKt.minWithOrNull(charSequence, comparator);
}
@SinceKotlin(version = "1.4")
@InlineOnly
@JvmName(name = "sumOfBigDecimal")
@OverloadResolutionByLambdaReturnType
private static final BigDecimal sumOfBigDecimal(CharSequence charSequence, Function1<? super Character, ? extends BigDecimal> selector) {
Intrinsics.checkNotNullParameter(charSequence, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
BigDecimal valueOf = BigDecimal.valueOf(0L);
Intrinsics.checkNotNullExpressionValue(valueOf, "valueOf(...)");
for (int i = 0; i < charSequence.length(); i++) {
valueOf = valueOf.add((BigDecimal) com.mycompany.app.dialog.a.g(charSequence, i, selector));
Intrinsics.checkNotNullExpressionValue(valueOf, "add(...)");
}
return valueOf;
}
@SinceKotlin(version = "1.4")
@InlineOnly
@JvmName(name = "sumOfBigInteger")
@OverloadResolutionByLambdaReturnType
private static final BigInteger sumOfBigInteger(CharSequence charSequence, Function1<? super Character, ? extends BigInteger> selector) {
Intrinsics.checkNotNullParameter(charSequence, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
BigInteger valueOf = BigInteger.valueOf(0L);
Intrinsics.checkNotNullExpressionValue(valueOf, "valueOf(...)");
for (int i = 0; i < charSequence.length(); i++) {
valueOf = valueOf.add((BigInteger) com.mycompany.app.dialog.a.g(charSequence, i, selector));
Intrinsics.checkNotNullExpressionValue(valueOf, "add(...)");
}
return valueOf;
}
@NotNull
public static final SortedSet<Character> toSortedSet(@NotNull CharSequence charSequence) {
Intrinsics.checkNotNullParameter(charSequence, "<this>");
return (SortedSet) StringsKt___StringsKt.toCollection(charSequence, new TreeSet());
}
}