soul-browser/sources/java/kotlin/concurrent/TimersKt.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

183 lines
11 KiB
Java

package kotlin.concurrent;
import com.google.android.gms.ads.RequestConfiguration;
import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;
import kotlin.Metadata;
import kotlin.PublishedApi;
import kotlin.Unit;
import kotlin.internal.InlineOnly;
import kotlin.jvm.JvmName;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@Metadata(d1 = {"\u00006\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0005\u001a3\u0010\u0000\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0003\u001a\u00020\u00042\u0019\b\u0004\u0010\u0005\u001a\u0013\u0012\u0004\u0012\u00020\u0001\u0012\u0004\u0012\u00020\u00070\u0006¢\u0006\u0002\b\bH\u0087\\u0001\u0000\u001a3\u0010\u0000\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\t\u001a\u00020\n2\u0019\b\u0004\u0010\u0005\u001a\u0013\u0012\u0004\u0012\u00020\u0001\u0012\u0004\u0012\u00020\u00070\u0006¢\u0006\u0002\b\bH\u0087\\u0001\u0000\u001a;\u0010\u0000\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u000b\u001a\u00020\u00042\u0019\b\u0004\u0010\u0005\u001a\u0013\u0012\u0004\u0012\u00020\u0001\u0012\u0004\u0012\u00020\u00070\u0006¢\u0006\u0002\b\bH\u0087\\u0001\u0000\u001a;\u0010\u0000\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\u00042\u0019\b\u0004\u0010\u0005\u001a\u0013\u0012\u0004\u0012\u00020\u0001\u0012\u0004\u0012\u00020\u00070\u0006¢\u0006\u0002\b\bH\u0087\\u0001\u0000\u001a;\u0010\f\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u000b\u001a\u00020\u00042\u0019\b\u0004\u0010\u0005\u001a\u0013\u0012\u0004\u0012\u00020\u0001\u0012\u0004\u0012\u00020\u00070\u0006¢\u0006\u0002\b\bH\u0087\\u0001\u0000\u001a;\u0010\f\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\u00042\u0019\b\u0004\u0010\u0005\u001a\u0013\u0012\u0004\u0012\u00020\u0001\u0012\u0004\u0012\u00020\u00070\u0006¢\u0006\u0002\b\bH\u0087\\u0001\u0000\u001a\u001a\u0010\r\u001a\u00020\u00022\b\u0010\u000e\u001a\u0004\u0018\u00010\u000f2\u0006\u0010\u0010\u001a\u00020\u0011H\u0001\u001aO\u0010\r\u001a\u00020\u00022\n\b\u0002\u0010\u000e\u001a\u0004\u0018\u00010\u000f2\b\b\u0002\u0010\u0010\u001a\u00020\u00112\b\b\u0002\u0010\u0012\u001a\u00020\u00042\u0006\u0010\u000b\u001a\u00020\u00042\u0019\b\u0004\u0010\u0005\u001a\u0013\u0012\u0004\u0012\u00020\u0001\u0012\u0004\u0012\u00020\u00070\u0006¢\u0006\u0002\b\bH\u0087\\u0001\u0000\u001aM\u0010\r\u001a\u00020\u00022\n\b\u0002\u0010\u000e\u001a\u0004\u0018\u00010\u000f2\b\b\u0002\u0010\u0010\u001a\u00020\u00112\u0006\u0010\u0013\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\u00042\u0019\b\u0004\u0010\u0005\u001a\u0013\u0012\u0004\u0012\u00020\u0001\u0012\u0004\u0012\u00020\u00070\u0006¢\u0006\u0002\b\bH\u0087\\u0001\u0000\u001aO\u0010\u0014\u001a\u00020\u00022\n\b\u0002\u0010\u000e\u001a\u0004\u0018\u00010\u000f2\b\b\u0002\u0010\u0010\u001a\u00020\u00112\b\b\u0002\u0010\u0012\u001a\u00020\u00042\u0006\u0010\u000b\u001a\u00020\u00042\u0019\b\u0004\u0010\u0005\u001a\u0013\u0012\u0004\u0012\u00020\u0001\u0012\u0004\u0012\u00020\u00070\u0006¢\u0006\u0002\b\bH\u0087\\u0001\u0000\u001aM\u0010\u0014\u001a\u00020\u00022\n\b\u0002\u0010\u000e\u001a\u0004\u0018\u00010\u000f2\b\b\u0002\u0010\u0010\u001a\u00020\u00112\u0006\u0010\u0013\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\u00042\u0019\b\u0004\u0010\u0005\u001a\u0013\u0012\u0004\u0012\u00020\u0001\u0012\u0004\u0012\u00020\u00070\u0006¢\u0006\u0002\b\bH\u0087\\u0001\u0000\u001a'\u0010\u0015\u001a\u00020\u00012\u0019\b\u0004\u0010\u0005\u001a\u0013\u0012\u0004\u0012\u00020\u0001\u0012\u0004\u0012\u00020\u00070\u0006¢\u0006\u0002\b\bH\u0087\\u0001\u0000\u0082\u0002\u0007\n\u0005\b\u009920\u0001¨\u0006\u0016"}, d2 = {"schedule", "Ljava/util/TimerTask;", "Ljava/util/Timer;", "delay", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "action", "Lkotlin/Function1;", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "Lkotlin/ExtensionFunctionType;", "time", "Ljava/util/Date;", "period", "scheduleAtFixedRate", "timer", "name", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "daemon", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "initialDelay", "startAt", "fixedRateTimer", "timerTask", "kotlin-stdlib"}, k = 2, mv = {2, 2, 0}, xi = 48)
@JvmName(name = "TimersKt")
/* loaded from: classes3.dex */
public final class TimersKt {
@InlineOnly
private static final Timer fixedRateTimer(String str, boolean z, long j, long j2, Function1<? super TimerTask, Unit> action) {
Intrinsics.checkNotNullParameter(action, "action");
Timer timer = timer(str, z);
timer.scheduleAtFixedRate(new TimersKt$timerTask$1(action), j, j2);
return timer;
}
public static /* synthetic */ Timer fixedRateTimer$default(String str, boolean z, long j, long j2, Function1 action, int i, Object obj) {
if ((i & 1) != 0) {
str = null;
}
if ((i & 2) != 0) {
z = false;
}
if ((i & 4) != 0) {
j = 0;
}
Intrinsics.checkNotNullParameter(action, "action");
Timer timer = timer(str, z);
timer.scheduleAtFixedRate(new TimersKt$timerTask$1(action), j, j2);
return timer;
}
@InlineOnly
private static final TimerTask schedule(Timer timer, long j, Function1<? super TimerTask, Unit> action) {
Intrinsics.checkNotNullParameter(timer, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
TimersKt$timerTask$1 timersKt$timerTask$1 = new TimersKt$timerTask$1(action);
timer.schedule(timersKt$timerTask$1, j);
return timersKt$timerTask$1;
}
@InlineOnly
private static final TimerTask scheduleAtFixedRate(Timer timer, long j, long j2, Function1<? super TimerTask, Unit> action) {
Intrinsics.checkNotNullParameter(timer, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
TimersKt$timerTask$1 timersKt$timerTask$1 = new TimersKt$timerTask$1(action);
timer.scheduleAtFixedRate(timersKt$timerTask$1, j, j2);
return timersKt$timerTask$1;
}
@PublishedApi
@NotNull
public static final Timer timer(@Nullable String str, boolean z) {
return str == null ? new Timer(z) : new Timer(str, z);
}
public static /* synthetic */ Timer timer$default(String str, boolean z, long j, long j2, Function1 action, int i, Object obj) {
if ((i & 1) != 0) {
str = null;
}
if ((i & 2) != 0) {
z = false;
}
if ((i & 4) != 0) {
j = 0;
}
Intrinsics.checkNotNullParameter(action, "action");
Timer timer = timer(str, z);
timer.schedule(new TimersKt$timerTask$1(action), j, j2);
return timer;
}
@InlineOnly
private static final TimerTask timerTask(Function1<? super TimerTask, Unit> action) {
Intrinsics.checkNotNullParameter(action, "action");
return new TimersKt$timerTask$1(action);
}
@InlineOnly
private static final Timer timer(String str, boolean z, long j, long j2, Function1<? super TimerTask, Unit> action) {
Intrinsics.checkNotNullParameter(action, "action");
Timer timer = timer(str, z);
timer.schedule(new TimersKt$timerTask$1(action), j, j2);
return timer;
}
@InlineOnly
private static final Timer fixedRateTimer(String str, boolean z, Date startAt, long j, Function1<? super TimerTask, Unit> action) {
Intrinsics.checkNotNullParameter(startAt, "startAt");
Intrinsics.checkNotNullParameter(action, "action");
Timer timer = timer(str, z);
timer.scheduleAtFixedRate(new TimersKt$timerTask$1(action), startAt, j);
return timer;
}
@InlineOnly
private static final TimerTask schedule(Timer timer, Date time, Function1<? super TimerTask, Unit> action) {
Intrinsics.checkNotNullParameter(timer, "<this>");
Intrinsics.checkNotNullParameter(time, "time");
Intrinsics.checkNotNullParameter(action, "action");
TimersKt$timerTask$1 timersKt$timerTask$1 = new TimersKt$timerTask$1(action);
timer.schedule(timersKt$timerTask$1, time);
return timersKt$timerTask$1;
}
@InlineOnly
private static final TimerTask scheduleAtFixedRate(Timer timer, Date time, long j, Function1<? super TimerTask, Unit> action) {
Intrinsics.checkNotNullParameter(timer, "<this>");
Intrinsics.checkNotNullParameter(time, "time");
Intrinsics.checkNotNullParameter(action, "action");
TimersKt$timerTask$1 timersKt$timerTask$1 = new TimersKt$timerTask$1(action);
timer.scheduleAtFixedRate(timersKt$timerTask$1, time, j);
return timersKt$timerTask$1;
}
public static /* synthetic */ Timer fixedRateTimer$default(String str, boolean z, Date startAt, long j, Function1 action, int i, Object obj) {
if ((i & 1) != 0) {
str = null;
}
if ((i & 2) != 0) {
z = false;
}
Intrinsics.checkNotNullParameter(startAt, "startAt");
Intrinsics.checkNotNullParameter(action, "action");
Timer timer = timer(str, z);
timer.scheduleAtFixedRate(new TimersKt$timerTask$1(action), startAt, j);
return timer;
}
@InlineOnly
private static final Timer timer(String str, boolean z, Date startAt, long j, Function1<? super TimerTask, Unit> action) {
Intrinsics.checkNotNullParameter(startAt, "startAt");
Intrinsics.checkNotNullParameter(action, "action");
Timer timer = timer(str, z);
timer.schedule(new TimersKt$timerTask$1(action), startAt, j);
return timer;
}
public static /* synthetic */ Timer timer$default(String str, boolean z, Date startAt, long j, Function1 action, int i, Object obj) {
if ((i & 1) != 0) {
str = null;
}
if ((i & 2) != 0) {
z = false;
}
Intrinsics.checkNotNullParameter(startAt, "startAt");
Intrinsics.checkNotNullParameter(action, "action");
Timer timer = timer(str, z);
timer.schedule(new TimersKt$timerTask$1(action), startAt, j);
return timer;
}
@InlineOnly
private static final TimerTask schedule(Timer timer, long j, long j2, Function1<? super TimerTask, Unit> action) {
Intrinsics.checkNotNullParameter(timer, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
TimersKt$timerTask$1 timersKt$timerTask$1 = new TimersKt$timerTask$1(action);
timer.schedule(timersKt$timerTask$1, j, j2);
return timersKt$timerTask$1;
}
@InlineOnly
private static final TimerTask schedule(Timer timer, Date time, long j, Function1<? super TimerTask, Unit> action) {
Intrinsics.checkNotNullParameter(timer, "<this>");
Intrinsics.checkNotNullParameter(time, "time");
Intrinsics.checkNotNullParameter(action, "action");
TimersKt$timerTask$1 timersKt$timerTask$1 = new TimersKt$timerTask$1(action);
timer.schedule(timersKt$timerTask$1, time, j);
return timersKt$timerTask$1;
}
}