soul-browser/app/smali_classes4/kotlin/jdk7/AutoCloseableKt.smali
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

400 lines
9.1 KiB
Smali

.class public final Lkotlin/jdk7/AutoCloseableKt;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u0000.\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\u0008\u0004\n\u0002\u0018\u0002\n\u0002\u0008\u0003\n\u0002\u0010\u0003\n\u0000\u001a \u0010\u0000\u001a\u00060\u0001j\u0002`\u00052\u000e\u0008\u0004\u0010\u0006\u001a\u0008\u0012\u0004\u0012\u00020\u00080\u0007H\u0087\u0008\u00f8\u0001\u0000\u001aN\u0010\t\u001a\u0002H\n\"\u0010\u0008\u0000\u0010\u000b*\n\u0018\u00010\u0001j\u0004\u0018\u0001`\u0005\"\u0004\u0008\u0001\u0010\n*\u0002H\u000b2\u0012\u0010\u000c\u001a\u000e\u0012\u0004\u0012\u0002H\u000b\u0012\u0004\u0012\u0002H\n0\rH\u0087\u0008\u00f8\u0001\u0000\u0082\u0002\n\n\u0008\u0008\u0001\u0012\u0002\u0010\u0001 \u0001\u00a2\u0006\u0002\u0010\u000e\u001a\u001e\u0010\u000f\u001a\u00020\u0008*\n\u0018\u00010\u0001j\u0004\u0018\u0001`\u00052\u0008\u0010\u0010\u001a\u0004\u0018\u00010\u0011H\u0001*\u001a\u0008\u0007\u0010\u0000\"\u00020\u00012\u00020\u0001B\u000c\u0008\u0002\u0012\u0008\u0008\u0003\u0012\u0004\u0008\u0008(\u0004\u0082\u0002\u0007\n\u0005\u0008\u009920\u0001\u00a8\u0006\u0012"
}
d2 = {
"AutoCloseable",
"Ljava/lang/AutoCloseable;",
"Lkotlin/SinceKotlin;",
"version",
"2.0",
"Lkotlin/AutoCloseable;",
"closeAction",
"Lkotlin/Function0;",
"",
"use",
"R",
"T",
"block",
"Lkotlin/Function1;",
"(Ljava/lang/AutoCloseable;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;",
"closeFinally",
"cause",
"",
"kotlin-stdlib"
}
k = 0x2
mv = {
0x2,
0x2,
0x0
}
pn = "kotlin"
xi = 0x30
.end annotation
.annotation build Lkotlin/jvm/JvmName;
name = "AutoCloseableKt"
.end annotation
# direct methods
.method private static final AutoCloseable(Lkotlin/jvm/functions/Function0;)Ljava/lang/AutoCloseable;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lkotlin/jvm/functions/Function0<",
"Lkotlin/Unit;",
">;)",
"Ljava/lang/AutoCloseable;"
}
.end annotation
.annotation build Lkotlin/SinceKotlin;
version = "2.0"
.end annotation
.annotation build Lkotlin/internal/InlineOnly;
.end annotation
.line 1
const-string v0, "closeAction"
.line 2
.line 3
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 4
.line 5
.line 6
new-instance v0, Lkotlin/jdk7/AutoCloseableKt$AutoCloseable$1;
.line 7
.line 8
invoke-direct {v0, p0}, Lkotlin/jdk7/AutoCloseableKt$AutoCloseable$1;-><init>(Lkotlin/jvm/functions/Function0;)V
.line 9
.line 10
.line 11
return-object v0
.end method
.method public static synthetic AutoCloseable$annotations()V
.locals 0
.annotation build Lkotlin/SinceKotlin;
version = "2.0"
.end annotation
return-void
.end method
.method public static final closeFinally(Ljava/lang/AutoCloseable;Ljava/lang/Throwable;)V
.locals 0
.param p0 # Ljava/lang/AutoCloseable;
.annotation build Lorg/jetbrains/annotations/Nullable;
.end annotation
.end param
.param p1 # Ljava/lang/Throwable;
.annotation build Lorg/jetbrains/annotations/Nullable;
.end annotation
.end param
.annotation build Lkotlin/PublishedApi;
.end annotation
.annotation build Lkotlin/SinceKotlin;
version = "1.2"
.end annotation
.line 1
if-eqz p0, :cond_8
.line 2
.line 3
if-nez p1, :cond_7
.line 4
.line 5
instance-of p1, p0, Ljava/lang/AutoCloseable;
.line 6
.line 7
if-eqz p1, :cond_0
.line 8
.line 9
invoke-interface {p0}, Ljava/lang/AutoCloseable;->close()V
.line 10
.line 11
.line 12
return-void
.line 13
:cond_0
instance-of p1, p0, Ljava/util/concurrent/ExecutorService;
.line 14
.line 15
if-eqz p1, :cond_1
.line 16
.line 17
check-cast p0, Ljava/util/concurrent/ExecutorService;
.line 18
.line 19
invoke-static {p0}, Landroidx/core/provider/b;->f(Ljava/util/concurrent/ExecutorService;)V
.line 20
.line 21
.line 22
return-void
.line 23
:cond_1
instance-of p1, p0, Landroid/content/res/TypedArray;
.line 24
.line 25
if-eqz p1, :cond_2
.line 26
.line 27
check-cast p0, Landroid/content/res/TypedArray;
.line 28
.line 29
invoke-virtual {p0}, Landroid/content/res/TypedArray;->recycle()V
.line 30
.line 31
.line 32
return-void
.line 33
:cond_2
instance-of p1, p0, Landroid/media/MediaMetadataRetriever;
.line 34
.line 35
if-eqz p1, :cond_3
.line 36
.line 37
check-cast p0, Landroid/media/MediaMetadataRetriever;
.line 38
.line 39
invoke-virtual {p0}, Landroid/media/MediaMetadataRetriever;->release()V
.line 40
.line 41
.line 42
return-void
.line 43
:cond_3
instance-of p1, p0, Landroid/media/MediaDrm;
.line 44
.line 45
if-eqz p1, :cond_4
.line 46
.line 47
check-cast p0, Landroid/media/MediaDrm;
.line 48
.line 49
invoke-virtual {p0}, Landroid/media/MediaDrm;->release()V
.line 50
.line 51
.line 52
return-void
.line 53
:cond_4
instance-of p1, p0, Landroid/drm/DrmManagerClient;
.line 54
.line 55
if-eqz p1, :cond_5
.line 56
.line 57
check-cast p0, Landroid/drm/DrmManagerClient;
.line 58
.line 59
invoke-virtual {p0}, Landroid/drm/DrmManagerClient;->release()V
.line 60
.line 61
.line 62
return-void
.line 63
:cond_5
instance-of p1, p0, Landroid/content/ContentProviderClient;
.line 64
.line 65
if-eqz p1, :cond_6
.line 66
.line 67
check-cast p0, Landroid/content/ContentProviderClient;
.line 68
.line 69
invoke-virtual {p0}, Landroid/content/ContentProviderClient;->release()Z
.line 70
.line 71
.line 72
return-void
.line 73
:cond_6
new-instance p0, Ljava/lang/IllegalArgumentException;
.line 74
.line 75
invoke-direct {p0}, Ljava/lang/IllegalArgumentException;-><init>()V
.line 76
.line 77
.line 78
throw p0
.line 79
:cond_7
:try_start_0
invoke-static {p0}, Lcom/mycompany/app/dialog/a;->s(Ljava/lang/AutoCloseable;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 80
.line 81
.line 82
return-void
.line 83
:catchall_0
move-exception p0
.line 84
invoke-static {p1, p0}, Lkotlin/ExceptionsKt;->addSuppressed(Ljava/lang/Throwable;Ljava/lang/Throwable;)V
.line 85
.line 86
.line 87
:cond_8
return-void
.end method
.method private static final use(Ljava/lang/AutoCloseable;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"<T::",
"Ljava/lang/AutoCloseable;",
"R:",
"Ljava/lang/Object;",
">(TT;",
"Lkotlin/jvm/functions/Function1<",
"-TT;+TR;>;)TR;"
}
.end annotation
.annotation build Lkotlin/SinceKotlin;
version = "1.2"
.end annotation
.annotation build Lkotlin/internal/InlineOnly;
.end annotation
.line 1
const-string v0, "block"
.line 2
.line 3
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 4
.line 5
.line 6
const/4 v0, 0x1
.line 7
:try_start_0
invoke-interface {p1, p0}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
.line 8
.line 9
.line 10
move-result-object p1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 11
invoke-static {v0}, Lkotlin/jvm/internal/InlineMarker;->finallyStart(I)V
.line 12
.line 13
.line 14
const/4 v1, 0x0
.line 15
invoke-static {p0, v1}, Lkotlin/jdk7/AutoCloseableKt;->closeFinally(Ljava/lang/AutoCloseable;Ljava/lang/Throwable;)V
.line 16
.line 17
.line 18
invoke-static {v0}, Lkotlin/jvm/internal/InlineMarker;->finallyEnd(I)V
.line 19
.line 20
.line 21
return-object p1
.line 22
:catchall_0
move-exception p1
.line 23
:try_start_1
throw p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
.line 24
:catchall_1
move-exception v1
.line 25
invoke-static {v0}, Lkotlin/jvm/internal/InlineMarker;->finallyStart(I)V
.line 26
.line 27
.line 28
invoke-static {p0, p1}, Lkotlin/jdk7/AutoCloseableKt;->closeFinally(Ljava/lang/AutoCloseable;Ljava/lang/Throwable;)V
.line 29
.line 30
.line 31
invoke-static {v0}, Lkotlin/jvm/internal/InlineMarker;->finallyEnd(I)V
.line 32
.line 33
.line 34
throw v1
.end method