* 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>
175 lines
5.4 KiB
Java
175 lines
5.4 KiB
Java
package androidx.loader.content;
|
|
|
|
import android.os.AsyncTask;
|
|
import android.os.SystemClock;
|
|
import androidx.core.os.OperationCanceledException;
|
|
import androidx.loader.content.ModernAsyncTask;
|
|
import java.io.FileDescriptor;
|
|
import java.io.PrintWriter;
|
|
import java.util.concurrent.Executor;
|
|
|
|
/* loaded from: classes.dex */
|
|
public abstract class AsyncTaskLoader<D> extends Loader<D> {
|
|
public Executor h;
|
|
public volatile LoadTask i;
|
|
public volatile LoadTask j;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class LoadTask extends ModernAsyncTask<D> implements Runnable {
|
|
public LoadTask() {
|
|
}
|
|
|
|
@Override // androidx.loader.content.ModernAsyncTask
|
|
public final Object a() {
|
|
try {
|
|
return AsyncTaskLoader.this.i();
|
|
} catch (OperationCanceledException e) {
|
|
if (this.g.get()) {
|
|
return null;
|
|
}
|
|
throw e;
|
|
}
|
|
}
|
|
|
|
@Override // androidx.loader.content.ModernAsyncTask
|
|
public final void b(Object obj) {
|
|
AsyncTaskLoader asyncTaskLoader = AsyncTaskLoader.this;
|
|
asyncTaskLoader.j(obj);
|
|
if (asyncTaskLoader.j == this) {
|
|
if (asyncTaskLoader.g) {
|
|
if (asyncTaskLoader.f1247c) {
|
|
asyncTaskLoader.k();
|
|
} else {
|
|
asyncTaskLoader.f = true;
|
|
}
|
|
}
|
|
SystemClock.uptimeMillis();
|
|
asyncTaskLoader.j = null;
|
|
asyncTaskLoader.h();
|
|
}
|
|
}
|
|
|
|
@Override // androidx.loader.content.ModernAsyncTask
|
|
public final void c(Object obj) {
|
|
AsyncTaskLoader asyncTaskLoader = AsyncTaskLoader.this;
|
|
if (asyncTaskLoader.i != this) {
|
|
asyncTaskLoader.j(obj);
|
|
if (asyncTaskLoader.j == this) {
|
|
if (asyncTaskLoader.g) {
|
|
if (asyncTaskLoader.f1247c) {
|
|
asyncTaskLoader.k();
|
|
} else {
|
|
asyncTaskLoader.f = true;
|
|
}
|
|
}
|
|
SystemClock.uptimeMillis();
|
|
asyncTaskLoader.j = null;
|
|
asyncTaskLoader.h();
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
if (asyncTaskLoader.d) {
|
|
asyncTaskLoader.j(obj);
|
|
return;
|
|
}
|
|
asyncTaskLoader.g = false;
|
|
SystemClock.uptimeMillis();
|
|
asyncTaskLoader.i = null;
|
|
asyncTaskLoader.a(obj);
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
AsyncTaskLoader.this.h();
|
|
}
|
|
}
|
|
|
|
@Override // androidx.loader.content.Loader
|
|
public void b(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) {
|
|
super.b(str, fileDescriptor, printWriter, strArr);
|
|
if (this.i != null) {
|
|
printWriter.print(str);
|
|
printWriter.print("mTask=");
|
|
printWriter.print(this.i);
|
|
printWriter.print(" waiting=");
|
|
this.i.getClass();
|
|
printWriter.println(false);
|
|
}
|
|
if (this.j != null) {
|
|
printWriter.print(str);
|
|
printWriter.print("mCancellingTask=");
|
|
printWriter.print(this.j);
|
|
printWriter.print(" waiting=");
|
|
this.j.getClass();
|
|
printWriter.println(false);
|
|
}
|
|
}
|
|
|
|
@Override // androidx.loader.content.Loader
|
|
public final boolean c() {
|
|
if (this.i == null) {
|
|
return false;
|
|
}
|
|
boolean z = this.f1247c;
|
|
if (!z) {
|
|
if (z) {
|
|
k();
|
|
} else {
|
|
this.f = true;
|
|
}
|
|
}
|
|
if (this.j != null) {
|
|
this.i.getClass();
|
|
this.i = null;
|
|
return false;
|
|
}
|
|
this.i.getClass();
|
|
LoadTask loadTask = this.i;
|
|
loadTask.g.set(true);
|
|
boolean cancel = loadTask.f1248c.cancel(false);
|
|
if (cancel) {
|
|
this.j = this.i;
|
|
g();
|
|
}
|
|
this.i = null;
|
|
return cancel;
|
|
}
|
|
|
|
public void g() {
|
|
}
|
|
|
|
public final void h() {
|
|
if (this.j == null && this.i != null) {
|
|
this.i.getClass();
|
|
if (this.h == null) {
|
|
this.h = AsyncTask.THREAD_POOL_EXECUTOR;
|
|
}
|
|
LoadTask loadTask = this.i;
|
|
Executor executor = this.h;
|
|
if (loadTask.f != ModernAsyncTask.Status.f1253c) {
|
|
int ordinal = loadTask.f.ordinal();
|
|
if (ordinal != 1) {
|
|
if (ordinal != 2) {
|
|
throw new IllegalStateException("We should never reach this state");
|
|
}
|
|
throw new IllegalStateException("Cannot execute task: the task has already been executed (a task can be executed only once)");
|
|
}
|
|
throw new IllegalStateException("Cannot execute task: the task is already running.");
|
|
}
|
|
loadTask.f = ModernAsyncTask.Status.f;
|
|
executor.execute(loadTask.f1248c);
|
|
}
|
|
}
|
|
|
|
public abstract Object i();
|
|
|
|
public void j(Object obj) {
|
|
}
|
|
|
|
public final void k() {
|
|
c();
|
|
this.i = new LoadTask();
|
|
h();
|
|
}
|
|
}
|