soul-browser/app/smali/androidx/appcompat/widget/AppCompatCompoundButtonHelper.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

469 lines
10 KiB
Smali

.class Landroidx/appcompat/widget/AppCompatCompoundButtonHelper;
.super Ljava/lang/Object;
.source "SourceFile"
# instance fields
.field public final a:Landroid/widget/CompoundButton;
.field public b:Landroid/content/res/ColorStateList;
.field public c:Landroid/graphics/PorterDuff$Mode;
.field public d:Z
.field public e:Z
.field public f:Z
# direct methods
.method public constructor <init>(Landroid/widget/CompoundButton;)V
.locals 1
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
.line 3
.line 4
const/4 v0, 0x0
.line 5
iput-object v0, p0, Landroidx/appcompat/widget/AppCompatCompoundButtonHelper;->b:Landroid/content/res/ColorStateList;
.line 6
.line 7
iput-object v0, p0, Landroidx/appcompat/widget/AppCompatCompoundButtonHelper;->c:Landroid/graphics/PorterDuff$Mode;
.line 8
.line 9
const/4 v0, 0x0
.line 10
iput-boolean v0, p0, Landroidx/appcompat/widget/AppCompatCompoundButtonHelper;->d:Z
.line 11
.line 12
iput-boolean v0, p0, Landroidx/appcompat/widget/AppCompatCompoundButtonHelper;->e:Z
.line 13
.line 14
iput-object p1, p0, Landroidx/appcompat/widget/AppCompatCompoundButtonHelper;->a:Landroid/widget/CompoundButton;
.line 15
.line 16
return-void
.end method
# virtual methods
.method public final a()V
.locals 3
.line 1
iget-object v0, p0, Landroidx/appcompat/widget/AppCompatCompoundButtonHelper;->a:Landroid/widget/CompoundButton;
.line 2
.line 3
invoke-virtual {v0}, Landroid/widget/CompoundButton;->getButtonDrawable()Landroid/graphics/drawable/Drawable;
.line 4
.line 5
.line 6
move-result-object v1
.line 7
if-eqz v1, :cond_4
.line 8
.line 9
iget-boolean v2, p0, Landroidx/appcompat/widget/AppCompatCompoundButtonHelper;->d:Z
.line 10
.line 11
if-nez v2, :cond_0
.line 12
.line 13
iget-boolean v2, p0, Landroidx/appcompat/widget/AppCompatCompoundButtonHelper;->e:Z
.line 14
.line 15
if-eqz v2, :cond_4
.line 16
.line 17
:cond_0
invoke-virtual {v1}, Landroid/graphics/drawable/Drawable;->mutate()Landroid/graphics/drawable/Drawable;
.line 18
.line 19
.line 20
move-result-object v1
.line 21
iget-boolean v2, p0, Landroidx/appcompat/widget/AppCompatCompoundButtonHelper;->d:Z
.line 22
.line 23
if-eqz v2, :cond_1
.line 24
.line 25
iget-object v2, p0, Landroidx/appcompat/widget/AppCompatCompoundButtonHelper;->b:Landroid/content/res/ColorStateList;
.line 26
.line 27
invoke-virtual {v1, v2}, Landroid/graphics/drawable/Drawable;->setTintList(Landroid/content/res/ColorStateList;)V
.line 28
.line 29
.line 30
:cond_1
iget-boolean v2, p0, Landroidx/appcompat/widget/AppCompatCompoundButtonHelper;->e:Z
.line 31
.line 32
if-eqz v2, :cond_2
.line 33
.line 34
iget-object v2, p0, Landroidx/appcompat/widget/AppCompatCompoundButtonHelper;->c:Landroid/graphics/PorterDuff$Mode;
.line 35
.line 36
invoke-virtual {v1, v2}, Landroid/graphics/drawable/Drawable;->setTintMode(Landroid/graphics/PorterDuff$Mode;)V
.line 37
.line 38
.line 39
:cond_2
invoke-virtual {v1}, Landroid/graphics/drawable/Drawable;->isStateful()Z
.line 40
.line 41
.line 42
move-result v2
.line 43
if-eqz v2, :cond_3
.line 44
.line 45
invoke-virtual {v0}, Landroid/view/View;->getDrawableState()[I
.line 46
.line 47
.line 48
move-result-object v2
.line 49
invoke-virtual {v1, v2}, Landroid/graphics/drawable/Drawable;->setState([I)Z
.line 50
.line 51
.line 52
:cond_3
invoke-virtual {v0, v1}, Landroid/widget/CompoundButton;->setButtonDrawable(Landroid/graphics/drawable/Drawable;)V
.line 53
.line 54
.line 55
:cond_4
return-void
.end method
.method public final b(Landroid/util/AttributeSet;I)V
.locals 8
.line 1
iget-object v0, p0, Landroidx/appcompat/widget/AppCompatCompoundButtonHelper;->a:Landroid/widget/CompoundButton;
.line 2
.line 3
invoke-virtual {v0}, Landroid/view/View;->getContext()Landroid/content/Context;
.line 4
.line 5
.line 6
move-result-object v1
.line 7
sget-object v2, Landroidx/appcompat/R$styleable;->CompoundButton:[I
.line 8
.line 9
invoke-static {v1, p1, v2, p2}, Landroidx/appcompat/widget/TintTypedArray;->e(Landroid/content/Context;Landroid/util/AttributeSet;[II)Landroidx/appcompat/widget/TintTypedArray;
.line 10
.line 11
.line 12
move-result-object v6
.line 13
iget-object v7, v6, Landroidx/appcompat/widget/TintTypedArray;->b:Landroid/content/res/TypedArray;
.line 14
.line 15
invoke-virtual {v0}, Landroid/view/View;->getContext()Landroid/content/Context;
.line 16
.line 17
.line 18
move-result-object v1
.line 19
sget-object v2, Landroidx/appcompat/R$styleable;->CompoundButton:[I
.line 20
.line 21
iget-object v4, v6, Landroidx/appcompat/widget/TintTypedArray;->b:Landroid/content/res/TypedArray;
.line 22
.line 23
move-object v3, p1
.line 24
move v5, p2
.line 25
invoke-static/range {v0 .. v5}, Landroidx/core/view/ViewCompat;->y(Landroid/view/View;Landroid/content/Context;[ILandroid/util/AttributeSet;Landroid/content/res/TypedArray;I)V
.line 26
.line 27
.line 28
:try_start_0
sget p1, Landroidx/appcompat/R$styleable;->CompoundButton_buttonCompat:I
.line 29
.line 30
invoke-virtual {v7, p1}, Landroid/content/res/TypedArray;->hasValue(I)Z
.line 31
.line 32
.line 33
move-result p1
.line 34
const/4 p2, 0x0
.line 35
if-eqz p1, :cond_0
.line 36
.line 37
sget p1, Landroidx/appcompat/R$styleable;->CompoundButton_buttonCompat:I
.line 38
.line 39
invoke-virtual {v7, p1, p2}, Landroid/content/res/TypedArray;->getResourceId(II)I
.line 40
.line 41
.line 42
move-result p1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 43
if-eqz p1, :cond_0
.line 44
.line 45
:try_start_1
invoke-virtual {v0}, Landroid/view/View;->getContext()Landroid/content/Context;
.line 46
.line 47
.line 48
move-result-object v1
.line 49
invoke-static {v1, p1}, Landroidx/appcompat/content/res/AppCompatResources;->a(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;
.line 50
.line 51
.line 52
move-result-object p1
.line 53
invoke-virtual {v0, p1}, Landroid/widget/CompoundButton;->setButtonDrawable(Landroid/graphics/drawable/Drawable;)V
:try_end_1
.catch Landroid/content/res/Resources$NotFoundException; {:try_start_1 .. :try_end_1} :catch_0
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 54
.line 55
.line 56
goto :goto_0
.line 57
:catchall_0
move-exception v0
.line 58
move-object p1, v0
.line 59
goto :goto_1
.line 60
:catch_0
:cond_0
:try_start_2
sget p1, Landroidx/appcompat/R$styleable;->CompoundButton_android_button:I
.line 61
.line 62
invoke-virtual {v7, p1}, Landroid/content/res/TypedArray;->hasValue(I)Z
.line 63
.line 64
.line 65
move-result p1
.line 66
if-eqz p1, :cond_1
.line 67
.line 68
sget p1, Landroidx/appcompat/R$styleable;->CompoundButton_android_button:I
.line 69
.line 70
invoke-virtual {v7, p1, p2}, Landroid/content/res/TypedArray;->getResourceId(II)I
.line 71
.line 72
.line 73
move-result p1
.line 74
if-eqz p1, :cond_1
.line 75
.line 76
invoke-virtual {v0}, Landroid/view/View;->getContext()Landroid/content/Context;
.line 77
.line 78
.line 79
move-result-object p2
.line 80
invoke-static {p2, p1}, Landroidx/appcompat/content/res/AppCompatResources;->a(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;
.line 81
.line 82
.line 83
move-result-object p1
.line 84
invoke-virtual {v0, p1}, Landroid/widget/CompoundButton;->setButtonDrawable(Landroid/graphics/drawable/Drawable;)V
.line 85
.line 86
.line 87
:cond_1
:goto_0
sget p1, Landroidx/appcompat/R$styleable;->CompoundButton_buttonTint:I
.line 88
.line 89
invoke-virtual {v7, p1}, Landroid/content/res/TypedArray;->hasValue(I)Z
.line 90
.line 91
.line 92
move-result p1
.line 93
if-eqz p1, :cond_2
.line 94
.line 95
sget p1, Landroidx/appcompat/R$styleable;->CompoundButton_buttonTint:I
.line 96
.line 97
invoke-virtual {v6, p1}, Landroidx/appcompat/widget/TintTypedArray;->a(I)Landroid/content/res/ColorStateList;
.line 98
.line 99
.line 100
move-result-object p1
.line 101
invoke-virtual {v0, p1}, Landroid/widget/CompoundButton;->setButtonTintList(Landroid/content/res/ColorStateList;)V
.line 102
.line 103
.line 104
:cond_2
sget p1, Landroidx/appcompat/R$styleable;->CompoundButton_buttonTintMode:I
.line 105
.line 106
invoke-virtual {v7, p1}, Landroid/content/res/TypedArray;->hasValue(I)Z
.line 107
.line 108
.line 109
move-result p1
.line 110
if-eqz p1, :cond_3
.line 111
.line 112
sget p1, Landroidx/appcompat/R$styleable;->CompoundButton_buttonTintMode:I
.line 113
.line 114
const/4 p2, -0x1
.line 115
invoke-virtual {v7, p1, p2}, Landroid/content/res/TypedArray;->getInt(II)I
.line 116
.line 117
.line 118
move-result p1
.line 119
const/4 p2, 0x0
.line 120
invoke-static {p1, p2}, Landroidx/appcompat/widget/DrawableUtils;->c(ILandroid/graphics/PorterDuff$Mode;)Landroid/graphics/PorterDuff$Mode;
.line 121
.line 122
.line 123
move-result-object p1
.line 124
invoke-virtual {v0, p1}, Landroid/widget/CompoundButton;->setButtonTintMode(Landroid/graphics/PorterDuff$Mode;)V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
.line 125
.line 126
.line 127
:cond_3
invoke-virtual {v6}, Landroidx/appcompat/widget/TintTypedArray;->f()V
.line 128
.line 129
.line 130
return-void
.line 131
:goto_1
invoke-virtual {v6}, Landroidx/appcompat/widget/TintTypedArray;->f()V
.line 132
.line 133
.line 134
throw p1
.end method