soul-browser/app/smali_classes4/okhttp3/internal/connection/Exchange$ResponseBodySource.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

525 lines
11 KiB
Smali

.class public final Lokhttp3/internal/connection/Exchange$ResponseBodySource;
.super Lokio/ForwardingSource;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/connection/Exchange;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x11
name = "ResponseBodySource"
.end annotation
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u0000\n\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\u0008\u0080\u0004\u0018\u00002\u00020\u0001\u00a8\u0006\u0002"
}
d2 = {
"Lokhttp3/internal/connection/Exchange$ResponseBodySource;",
"Lokio/ForwardingSource;",
"okhttp"
}
k = 0x1
mv = {
0x2,
0x2,
0x0
}
xi = 0x30
.end annotation
.annotation build Lkotlin/jvm/internal/SourceDebugExtension;
value = {
"SMAP\nExchange.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Exchange.kt\nokhttp3/internal/connection/Exchange$ResponseBodySource\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,404:1\n1#2:405\n*E\n"
}
.end annotation
# instance fields
.field public final f:J
.field public final g:Z
.field public h:J
.field public i:Z
.field public j:Z
.field public k:Z
.field public final synthetic l:Lokhttp3/internal/connection/Exchange;
# direct methods
.method public constructor <init>(Lokhttp3/internal/connection/Exchange;Lokio/Source;JZ)V
.locals 1
.line 1
const-string v0, "delegate"
.line 2
.line 3
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 4
.line 5
.line 6
iput-object p1, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->l:Lokhttp3/internal/connection/Exchange;
.line 7
.line 8
invoke-direct {p0, p2}, Lokio/ForwardingSource;-><init>(Lokio/Source;)V
.line 9
.line 10
.line 11
iput-wide p3, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->f:J
.line 12
.line 13
iput-boolean p5, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->g:Z
.line 14
.line 15
const/4 p1, 0x1
.line 16
iput-boolean p1, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->i:Z
.line 17
.line 18
const-wide/16 p1, 0x0
.line 19
.line 20
cmp-long p1, p3, p1
.line 21
.line 22
if-nez p1, :cond_0
.line 23
.line 24
const/4 p1, 0x0
.line 25
invoke-virtual {p0, p1}, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->a(Ljava/io/IOException;)Ljava/io/IOException;
.line 26
.line 27
.line 28
:cond_0
return-void
.end method
# virtual methods
.method public final a(Ljava/io/IOException;)Ljava/io/IOException;
.locals 7
.line 1
iget-boolean v0, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->j:Z
.line 2
.line 3
if-eqz v0, :cond_0
.line 4
.line 5
return-object p1
.line 6
:cond_0
const/4 v0, 0x1
.line 7
iput-boolean v0, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->j:Z
.line 8
.line 9
iget-object v1, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->l:Lokhttp3/internal/connection/Exchange;
.line 10
.line 11
if-nez p1, :cond_1
.line 12
.line 13
iget-boolean v0, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->i:Z
.line 14
.line 15
if-eqz v0, :cond_1
.line 16
.line 17
const/4 v0, 0x0
.line 18
iput-boolean v0, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->i:Z
.line 19
.line 20
iget-object v0, v1, Lokhttp3/internal/connection/Exchange;->b:Lokhttp3/EventListener;
.line 21
.line 22
iget-object v2, v1, Lokhttp3/internal/connection/Exchange;->a:Lokhttp3/internal/connection/RealCall;
.line 23
.line 24
invoke-virtual {v0, v2}, Lokhttp3/EventListener;->m(Lokhttp3/Call;)V
.line 25
.line 26
.line 27
:cond_1
iget-wide v2, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->h:J
.line 28
.line 29
iget-boolean v4, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->g:Z
.line 30
.line 31
const/16 v6, 0x8
.line 32
.line 33
move-object v5, p1
.line 34
invoke-static/range {v1 .. v6}, Lokhttp3/internal/connection/Exchange;->a(Lokhttp3/internal/connection/Exchange;JZLjava/io/IOException;I)Ljava/io/IOException;
.line 35
.line 36
.line 37
move-result-object p1
.line 38
return-object p1
.end method
.method public final close()V
.locals 1
.line 1
iget-boolean v0, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->k:Z
.line 2
.line 3
if-eqz v0, :cond_0
.line 4
.line 5
return-void
.line 6
:cond_0
const/4 v0, 0x1
.line 7
iput-boolean v0, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->k:Z
.line 8
.line 9
:try_start_0
invoke-super {p0}, Lokio/ForwardingSource;->close()V
.line 10
.line 11
.line 12
const/4 v0, 0x0
.line 13
invoke-virtual {p0, v0}, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->a(Ljava/io/IOException;)Ljava/io/IOException;
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
.line 14
.line 15
.line 16
return-void
.line 17
:catch_0
move-exception v0
.line 18
invoke-virtual {p0, v0}, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->a(Ljava/io/IOException;)Ljava/io/IOException;
.line 19
.line 20
.line 21
move-result-object v0
.line 22
invoke-static {v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
.line 23
.line 24
.line 25
throw v0
.end method
.method public final p0(JLokio/Buffer;)J
.locals 9
.line 1
const-string v0, "expected "
.line 2
.line 3
const-string v1, "sink"
.line 4
.line 5
invoke-static {p3, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 6
.line 7
.line 8
iget-boolean v1, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->k:Z
.line 9
.line 10
if-nez v1, :cond_5
.line 11
.line 12
:try_start_0
iget-object v1, p0, Lokio/ForwardingSource;->c:Lokio/Source;
.line 13
.line 14
invoke-interface {v1, p1, p2, p3}, Lokio/Source;->p0(JLokio/Buffer;)J
.line 15
.line 16
.line 17
move-result-wide p1
.line 18
iget-boolean p3, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->i:Z
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
.line 19
.line 20
iget-object v1, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->l:Lokhttp3/internal/connection/Exchange;
.line 21
.line 22
if-eqz p3, :cond_0
.line 23
.line 24
const/4 p3, 0x0
.line 25
:try_start_1
iput-boolean p3, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->i:Z
.line 26
.line 27
iget-object p3, v1, Lokhttp3/internal/connection/Exchange;->b:Lokhttp3/EventListener;
.line 28
.line 29
iget-object v2, v1, Lokhttp3/internal/connection/Exchange;->a:Lokhttp3/internal/connection/RealCall;
.line 30
.line 31
invoke-virtual {p3, v2}, Lokhttp3/EventListener;->m(Lokhttp3/Call;)V
.line 32
.line 33
.line 34
goto :goto_0
.line 35
:catch_0
move-exception p1
.line 36
goto :goto_2
.line 37
:cond_0
:goto_0
const-wide/16 v2, -0x1
.line 38
.line 39
cmp-long p3, p1, v2
.line 40
.line 41
const/4 v4, 0x0
.line 42
if-nez p3, :cond_1
.line 43
.line 44
invoke-virtual {p0, v4}, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->a(Ljava/io/IOException;)Ljava/io/IOException;
.line 45
.line 46
.line 47
return-wide v2
.line 48
:cond_1
iget-wide v5, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->h:J
:try_end_1
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0
.line 49
.line 50
add-long/2addr v5, p1
.line 51
iget-wide v7, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->f:J
.line 52
.line 53
cmp-long p3, v7, v2
.line 54
.line 55
if-eqz p3, :cond_3
.line 56
.line 57
cmp-long p3, v5, v7
.line 58
.line 59
if-gtz p3, :cond_2
.line 60
.line 61
goto :goto_1
.line 62
:cond_2
:try_start_2
new-instance p1, Ljava/net/ProtocolException;
.line 63
.line 64
new-instance p2, Ljava/lang/StringBuilder;
.line 65
.line 66
invoke-direct {p2, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
.line 67
.line 68
.line 69
invoke-virtual {p2, v7, v8}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
.line 70
.line 71
.line 72
const-string p3, " bytes but received "
.line 73
.line 74
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 75
.line 76
.line 77
invoke-virtual {p2, v5, v6}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
.line 78
.line 79
.line 80
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
.line 81
.line 82
.line 83
move-result-object p2
.line 84
invoke-direct {p1, p2}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
.line 85
.line 86
.line 87
throw p1
.line 88
:cond_3
:goto_1
iput-wide v5, p0, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->h:J
.line 89
.line 90
iget-object p3, v1, Lokhttp3/internal/connection/Exchange;->d:Lokhttp3/internal/http/ExchangeCodec;
.line 91
.line 92
invoke-interface {p3}, Lokhttp3/internal/http/ExchangeCodec;->c()Z
.line 93
.line 94
.line 95
move-result p3
.line 96
if-eqz p3, :cond_4
.line 97
.line 98
invoke-virtual {p0, v4}, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->a(Ljava/io/IOException;)Ljava/io/IOException;
:try_end_2
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_0
.line 99
.line 100
.line 101
:cond_4
return-wide p1
.line 102
:goto_2
invoke-virtual {p0, p1}, Lokhttp3/internal/connection/Exchange$ResponseBodySource;->a(Ljava/io/IOException;)Ljava/io/IOException;
.line 103
.line 104
.line 105
move-result-object p1
.line 106
invoke-static {p1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
.line 107
.line 108
.line 109
throw p1
.line 110
:cond_5
new-instance p1, Ljava/lang/IllegalStateException;
.line 111
.line 112
const-string p2, "closed"
.line 113
.line 114
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
.line 115
.line 116
.line 117
throw p1
.end method