soul-browser/app/smali_classes3/com/google/common/collect/ImmutableSet$Builder.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

516 lines
11 KiB
Smali

.class public Lcom/google/common/collect/ImmutableSet$Builder;
.super Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/collect/ImmutableSet;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "Builder"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<E:",
"Ljava/lang/Object;",
">",
"Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder<",
"TE;>;"
}
.end annotation
# instance fields
.field public d:[Ljava/lang/Object;
.field public e:I
# virtual methods
.method public bridge synthetic a(Ljava/lang/Object;)Lcom/google/common/collect/ImmutableCollection$Builder;
.locals 0
.line 1
invoke-virtual {p0, p1}, Lcom/google/common/collect/ImmutableSet$Builder;->e(Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet$Builder;
.line 2
.line 3
.line 4
move-result-object p1
.line 5
return-object p1
.end method
.method public bridge synthetic c(Ljava/lang/Object;)Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;
.locals 0
.line 1
invoke-virtual {p0, p1}, Lcom/google/common/collect/ImmutableSet$Builder;->e(Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet$Builder;
.line 2
.line 3
.line 4
move-result-object p1
.line 5
return-object p1
.end method
.method public e(Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet$Builder;
.locals 5
.line 1
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
.line 2
.line 3
.line 4
iget-object v0, p0, Lcom/google/common/collect/ImmutableSet$Builder;->d:[Ljava/lang/Object;
.line 5
.line 6
if-eqz v0, :cond_2
.line 7
.line 8
iget v0, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->b:I
.line 9
.line 10
invoke-static {v0}, Lcom/google/common/collect/ImmutableSet;->r(I)I
.line 11
.line 12
.line 13
move-result v0
.line 14
iget-object v1, p0, Lcom/google/common/collect/ImmutableSet$Builder;->d:[Ljava/lang/Object;
.line 15
.line 16
array-length v2, v1
.line 17
if-gt v0, v2, :cond_2
.line 18
.line 19
invoke-static {v1}, Lj$/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 20
.line 21
.line 22
iget-object v0, p0, Lcom/google/common/collect/ImmutableSet$Builder;->d:[Ljava/lang/Object;
.line 23
.line 24
array-length v0, v0
.line 25
add-int/lit8 v0, v0, -0x1
.line 26
.line 27
invoke-virtual {p1}, Ljava/lang/Object;->hashCode()I
.line 28
.line 29
.line 30
move-result v1
.line 31
invoke-static {v1}, Lcom/google/common/collect/Hashing;->b(I)I
.line 32
.line 33
.line 34
move-result v2
.line 35
:goto_0
and-int/2addr v2, v0
.line 36
iget-object v3, p0, Lcom/google/common/collect/ImmutableSet$Builder;->d:[Ljava/lang/Object;
.line 37
.line 38
aget-object v4, v3, v2
.line 39
.line 40
if-nez v4, :cond_0
.line 41
.line 42
aput-object p1, v3, v2
.line 43
.line 44
iget v0, p0, Lcom/google/common/collect/ImmutableSet$Builder;->e:I
.line 45
.line 46
add-int/2addr v0, v1
.line 47
iput v0, p0, Lcom/google/common/collect/ImmutableSet$Builder;->e:I
.line 48
.line 49
invoke-super {p0, p1}, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->c(Ljava/lang/Object;)Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;
.line 50
.line 51
.line 52
return-object p0
.line 53
:cond_0
invoke-virtual {v4, p1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
.line 54
.line 55
.line 56
move-result v3
.line 57
if-eqz v3, :cond_1
.line 58
.line 59
return-object p0
.line 60
:cond_1
add-int/lit8 v2, v2, 0x1
.line 61
.line 62
goto :goto_0
.line 63
:cond_2
const/4 v0, 0x0
.line 64
iput-object v0, p0, Lcom/google/common/collect/ImmutableSet$Builder;->d:[Ljava/lang/Object;
.line 65
.line 66
invoke-super {p0, p1}, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->c(Ljava/lang/Object;)Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;
.line 67
.line 68
.line 69
return-object p0
.end method
.method public f()Lcom/google/common/collect/ImmutableSet;
.locals 9
.line 1
iget v0, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->b:I
.line 2
.line 3
if-eqz v0, :cond_3
.line 4
.line 5
const/4 v1, 0x1
.line 6
if-eq v0, v1, :cond_2
.line 7
.line 8
iget-object v2, p0, Lcom/google/common/collect/ImmutableSet$Builder;->d:[Ljava/lang/Object;
.line 9
.line 10
if-eqz v2, :cond_1
.line 11
.line 12
invoke-static {v0}, Lcom/google/common/collect/ImmutableSet;->r(I)I
.line 13
.line 14
.line 15
move-result v0
.line 16
iget-object v2, p0, Lcom/google/common/collect/ImmutableSet$Builder;->d:[Ljava/lang/Object;
.line 17
.line 18
array-length v2, v2
.line 19
if-ne v0, v2, :cond_1
.line 20
.line 21
iget v0, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->b:I
.line 22
.line 23
iget-object v2, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->a:[Ljava/lang/Object;
.line 24
.line 25
array-length v3, v2
.line 26
shr-int/lit8 v4, v3, 0x1
.line 27
.line 28
shr-int/lit8 v3, v3, 0x2
.line 29
.line 30
add-int/2addr v4, v3
.line 31
if-ge v0, v4, :cond_0
.line 32
.line 33
invoke-static {v2, v0}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;
.line 34
.line 35
.line 36
move-result-object v2
.line 37
:cond_0
move-object v4, v2
.line 38
new-instance v3, Lcom/google/common/collect/RegularImmutableSet;
.line 39
.line 40
iget v6, p0, Lcom/google/common/collect/ImmutableSet$Builder;->e:I
.line 41
.line 42
iget-object v5, p0, Lcom/google/common/collect/ImmutableSet$Builder;->d:[Ljava/lang/Object;
.line 43
.line 44
array-length v0, v5
.line 45
add-int/lit8 v7, v0, -0x1
.line 46
.line 47
iget v8, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->b:I
.line 48
.line 49
invoke-direct/range {v3 .. v8}, Lcom/google/common/collect/RegularImmutableSet;-><init>([Ljava/lang/Object;[Ljava/lang/Object;III)V
.line 50
.line 51
.line 52
goto :goto_0
.line 53
:cond_1
iget v0, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->b:I
.line 54
.line 55
iget-object v2, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->a:[Ljava/lang/Object;
.line 56
.line 57
invoke-static {v0, v2}, Lcom/google/common/collect/ImmutableSet;->s(I[Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet;
.line 58
.line 59
.line 60
move-result-object v3
.line 61
invoke-virtual {v3}, Ljava/util/AbstractCollection;->size()I
.line 62
.line 63
.line 64
move-result v0
.line 65
iput v0, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->b:I
.line 66
.line 67
:goto_0
iput-boolean v1, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->c:Z
.line 68
.line 69
const/4 v0, 0x0
.line 70
iput-object v0, p0, Lcom/google/common/collect/ImmutableSet$Builder;->d:[Ljava/lang/Object;
.line 71
.line 72
return-object v3
.line 73
:cond_2
iget-object v0, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->a:[Ljava/lang/Object;
.line 74
.line 75
const/4 v1, 0x0
.line 76
aget-object v0, v0, v1
.line 77
.line 78
invoke-static {v0}, Lj$/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 79
.line 80
.line 81
sget v1, Lcom/google/common/collect/ImmutableSet;->g:I
.line 82
.line 83
new-instance v1, Lcom/google/common/collect/SingletonImmutableSet;
.line 84
.line 85
invoke-direct {v1, v0}, Lcom/google/common/collect/SingletonImmutableSet;-><init>(Ljava/lang/Object;)V
.line 86
.line 87
.line 88
return-object v1
.line 89
:cond_3
sget v0, Lcom/google/common/collect/ImmutableSet;->g:I
.line 90
.line 91
sget-object v0, Lcom/google/common/collect/RegularImmutableSet;->n:Lcom/google/common/collect/RegularImmutableSet;
.line 92
.line 93
return-object v0
.end method
.method public g(Lcom/google/common/collect/ImmutableSet$Builder;)Lcom/google/common/collect/ImmutableSet$Builder;
.locals 4
.line 1
iget-object v0, p0, Lcom/google/common/collect/ImmutableSet$Builder;->d:[Ljava/lang/Object;
.line 2
.line 3
const/4 v1, 0x0
.line 4
if-eqz v0, :cond_1
.line 5
.line 6
:goto_0
iget v0, p1, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->b:I
.line 7
.line 8
if-ge v1, v0, :cond_0
.line 9
.line 10
iget-object v0, p1, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->a:[Ljava/lang/Object;
.line 11
.line 12
aget-object v0, v0, v1
.line 13
.line 14
invoke-static {v0}, Lj$/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 15
.line 16
.line 17
invoke-virtual {p0, v0}, Lcom/google/common/collect/ImmutableSet$Builder;->e(Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet$Builder;
.line 18
.line 19
.line 20
add-int/lit8 v1, v1, 0x1
.line 21
.line 22
goto :goto_0
.line 23
:cond_0
return-object p0
.line 24
:cond_1
iget-object v0, p1, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->a:[Ljava/lang/Object;
.line 25
.line 26
iget p1, p1, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->b:I
.line 27
.line 28
invoke-static {p1, v0}, Lcom/google/common/collect/ObjectArrays;->a(I[Ljava/lang/Object;)V
.line 29
.line 30
.line 31
invoke-virtual {p0, p1}, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->d(I)V
.line 32
.line 33
.line 34
iget-object v2, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->a:[Ljava/lang/Object;
.line 35
.line 36
iget v3, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->b:I
.line 37
.line 38
invoke-static {v0, v1, v2, v3, p1}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 39
.line 40
.line 41
iget v0, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->b:I
.line 42
.line 43
add-int/2addr v0, p1
.line 44
iput v0, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->b:I
.line 45
.line 46
return-object p0
.end method