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

848 lines
16 KiB
Smali

.class public Landroidx/appcompat/widget/ContentFrameLayout;
.super Landroid/widget/FrameLayout;
.source "SourceFile"
# annotations
.annotation build Landroidx/annotation/RestrictTo;
.end annotation
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/appcompat/widget/ContentFrameLayout$OnAttachListener;
}
.end annotation
# instance fields
.field public c:Landroid/util/TypedValue;
.field public f:Landroid/util/TypedValue;
.field public g:Landroid/util/TypedValue;
.field public h:Landroid/util/TypedValue;
.field public i:Landroid/util/TypedValue;
.field public j:Landroid/util/TypedValue;
.field public final k:Landroid/graphics/Rect;
.field public l:Landroidx/appcompat/widget/ContentFrameLayout$OnAttachListener;
# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 1
.param p1 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Landroid/util/AttributeSet;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.line 1
const/4 v0, 0x0
.line 2
invoke-direct {p0, p1, p2, v0}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.line 3
.line 4
.line 5
new-instance p1, Landroid/graphics/Rect;
.line 6
.line 7
invoke-direct {p1}, Landroid/graphics/Rect;-><init>()V
.line 8
.line 9
.line 10
iput-object p1, p0, Landroidx/appcompat/widget/ContentFrameLayout;->k:Landroid/graphics/Rect;
.line 11
.line 12
return-void
.end method
# virtual methods
.method public getFixedHeightMajor()Landroid/util/TypedValue;
.locals 1
.line 1
iget-object v0, p0, Landroidx/appcompat/widget/ContentFrameLayout;->i:Landroid/util/TypedValue;
.line 2
.line 3
if-nez v0, :cond_0
.line 4
.line 5
new-instance v0, Landroid/util/TypedValue;
.line 6
.line 7
invoke-direct {v0}, Landroid/util/TypedValue;-><init>()V
.line 8
.line 9
.line 10
iput-object v0, p0, Landroidx/appcompat/widget/ContentFrameLayout;->i:Landroid/util/TypedValue;
.line 11
.line 12
:cond_0
iget-object v0, p0, Landroidx/appcompat/widget/ContentFrameLayout;->i:Landroid/util/TypedValue;
.line 13
.line 14
return-object v0
.end method
.method public getFixedHeightMinor()Landroid/util/TypedValue;
.locals 1
.line 1
iget-object v0, p0, Landroidx/appcompat/widget/ContentFrameLayout;->j:Landroid/util/TypedValue;
.line 2
.line 3
if-nez v0, :cond_0
.line 4
.line 5
new-instance v0, Landroid/util/TypedValue;
.line 6
.line 7
invoke-direct {v0}, Landroid/util/TypedValue;-><init>()V
.line 8
.line 9
.line 10
iput-object v0, p0, Landroidx/appcompat/widget/ContentFrameLayout;->j:Landroid/util/TypedValue;
.line 11
.line 12
:cond_0
iget-object v0, p0, Landroidx/appcompat/widget/ContentFrameLayout;->j:Landroid/util/TypedValue;
.line 13
.line 14
return-object v0
.end method
.method public getFixedWidthMajor()Landroid/util/TypedValue;
.locals 1
.line 1
iget-object v0, p0, Landroidx/appcompat/widget/ContentFrameLayout;->g:Landroid/util/TypedValue;
.line 2
.line 3
if-nez v0, :cond_0
.line 4
.line 5
new-instance v0, Landroid/util/TypedValue;
.line 6
.line 7
invoke-direct {v0}, Landroid/util/TypedValue;-><init>()V
.line 8
.line 9
.line 10
iput-object v0, p0, Landroidx/appcompat/widget/ContentFrameLayout;->g:Landroid/util/TypedValue;
.line 11
.line 12
:cond_0
iget-object v0, p0, Landroidx/appcompat/widget/ContentFrameLayout;->g:Landroid/util/TypedValue;
.line 13
.line 14
return-object v0
.end method
.method public getFixedWidthMinor()Landroid/util/TypedValue;
.locals 1
.line 1
iget-object v0, p0, Landroidx/appcompat/widget/ContentFrameLayout;->h:Landroid/util/TypedValue;
.line 2
.line 3
if-nez v0, :cond_0
.line 4
.line 5
new-instance v0, Landroid/util/TypedValue;
.line 6
.line 7
invoke-direct {v0}, Landroid/util/TypedValue;-><init>()V
.line 8
.line 9
.line 10
iput-object v0, p0, Landroidx/appcompat/widget/ContentFrameLayout;->h:Landroid/util/TypedValue;
.line 11
.line 12
:cond_0
iget-object v0, p0, Landroidx/appcompat/widget/ContentFrameLayout;->h:Landroid/util/TypedValue;
.line 13
.line 14
return-object v0
.end method
.method public getMinWidthMajor()Landroid/util/TypedValue;
.locals 1
.line 1
iget-object v0, p0, Landroidx/appcompat/widget/ContentFrameLayout;->c:Landroid/util/TypedValue;
.line 2
.line 3
if-nez v0, :cond_0
.line 4
.line 5
new-instance v0, Landroid/util/TypedValue;
.line 6
.line 7
invoke-direct {v0}, Landroid/util/TypedValue;-><init>()V
.line 8
.line 9
.line 10
iput-object v0, p0, Landroidx/appcompat/widget/ContentFrameLayout;->c:Landroid/util/TypedValue;
.line 11
.line 12
:cond_0
iget-object v0, p0, Landroidx/appcompat/widget/ContentFrameLayout;->c:Landroid/util/TypedValue;
.line 13
.line 14
return-object v0
.end method
.method public getMinWidthMinor()Landroid/util/TypedValue;
.locals 1
.line 1
iget-object v0, p0, Landroidx/appcompat/widget/ContentFrameLayout;->f:Landroid/util/TypedValue;
.line 2
.line 3
if-nez v0, :cond_0
.line 4
.line 5
new-instance v0, Landroid/util/TypedValue;
.line 6
.line 7
invoke-direct {v0}, Landroid/util/TypedValue;-><init>()V
.line 8
.line 9
.line 10
iput-object v0, p0, Landroidx/appcompat/widget/ContentFrameLayout;->f:Landroid/util/TypedValue;
.line 11
.line 12
:cond_0
iget-object v0, p0, Landroidx/appcompat/widget/ContentFrameLayout;->f:Landroid/util/TypedValue;
.line 13
.line 14
return-object v0
.end method
.method public final onAttachedToWindow()V
.locals 0
.line 1
invoke-super {p0}, Landroid/widget/FrameLayout;->onAttachedToWindow()V
.line 2
.line 3
.line 4
return-void
.end method
.method public final onDetachedFromWindow()V
.locals 1
.line 1
invoke-super {p0}, Landroid/widget/FrameLayout;->onDetachedFromWindow()V
.line 2
.line 3
.line 4
iget-object v0, p0, Landroidx/appcompat/widget/ContentFrameLayout;->l:Landroidx/appcompat/widget/ContentFrameLayout$OnAttachListener;
.line 5
.line 6
if-eqz v0, :cond_0
.line 7
.line 8
invoke-interface {v0}, Landroidx/appcompat/widget/ContentFrameLayout$OnAttachListener;->onDetachedFromWindow()V
.line 9
.line 10
.line 11
:cond_0
return-void
.end method
.method public final onMeasure(II)V
.locals 16
.line 1
move-object/from16 v0, p0
.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
invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
.line 8
.line 9
.line 10
move-result-object v1
.line 11
invoke-virtual {v1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
.line 12
.line 13
.line 14
move-result-object v1
.line 15
iget v2, v1, Landroid/util/DisplayMetrics;->widthPixels:I
.line 16
.line 17
iget v3, v1, Landroid/util/DisplayMetrics;->heightPixels:I
.line 18
.line 19
const/4 v4, 0x1
.line 20
const/4 v5, 0x0
.line 21
if-ge v2, v3, :cond_0
.line 22
.line 23
move v2, v4
.line 24
goto :goto_0
.line 25
:cond_0
move v2, v5
.line 26
:goto_0
invoke-static/range {p1 .. p1}, Landroid/view/View$MeasureSpec;->getMode(I)I
.line 27
.line 28
.line 29
move-result v3
.line 30
invoke-static/range {p2 .. p2}, Landroid/view/View$MeasureSpec;->getMode(I)I
.line 31
.line 32
.line 33
move-result v6
.line 34
iget-object v7, v0, Landroidx/appcompat/widget/ContentFrameLayout;->k:Landroid/graphics/Rect;
.line 35
.line 36
const/4 v8, 0x6
.line 37
const/4 v9, 0x5
.line 38
const/high16 v10, -0x80000000
.line 39
.line 40
const/high16 v11, 0x40000000 # 2.0f
.line 41
.line 42
if-ne v3, v10, :cond_4
.line 43
.line 44
if-eqz v2, :cond_1
.line 45
.line 46
iget-object v12, v0, Landroidx/appcompat/widget/ContentFrameLayout;->h:Landroid/util/TypedValue;
.line 47
.line 48
goto :goto_1
.line 49
:cond_1
iget-object v12, v0, Landroidx/appcompat/widget/ContentFrameLayout;->g:Landroid/util/TypedValue;
.line 50
.line 51
:goto_1
if-eqz v12, :cond_4
.line 52
.line 53
iget v13, v12, Landroid/util/TypedValue;->type:I
.line 54
.line 55
if-eqz v13, :cond_4
.line 56
.line 57
if-ne v13, v9, :cond_2
.line 58
.line 59
invoke-virtual {v12, v1}, Landroid/util/TypedValue;->getDimension(Landroid/util/DisplayMetrics;)F
.line 60
.line 61
.line 62
move-result v12
.line 63
:goto_2
float-to-int v12, v12
.line 64
goto :goto_3
.line 65
:cond_2
if-ne v13, v8, :cond_3
.line 66
.line 67
iget v13, v1, Landroid/util/DisplayMetrics;->widthPixels:I
.line 68
.line 69
int-to-float v14, v13
.line 70
int-to-float v13, v13
.line 71
invoke-virtual {v12, v14, v13}, Landroid/util/TypedValue;->getFraction(FF)F
.line 72
.line 73
.line 74
move-result v12
.line 75
goto :goto_2
.line 76
:cond_3
move v12, v5
.line 77
:goto_3
if-lez v12, :cond_4
.line 78
.line 79
iget v13, v7, Landroid/graphics/Rect;->left:I
.line 80
.line 81
iget v14, v7, Landroid/graphics/Rect;->right:I
.line 82
.line 83
add-int/2addr v13, v14
.line 84
sub-int/2addr v12, v13
.line 85
invoke-static/range {p1 .. p1}, Landroid/view/View$MeasureSpec;->getSize(I)I
.line 86
.line 87
.line 88
move-result v13
.line 89
invoke-static {v12, v13}, Ljava/lang/Math;->min(II)I
.line 90
.line 91
.line 92
move-result v12
.line 93
invoke-static {v12, v11}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
.line 94
.line 95
.line 96
move-result v12
.line 97
move v13, v4
.line 98
goto :goto_4
.line 99
:cond_4
move/from16 v12, p1
.line 100
.line 101
move v13, v5
.line 102
:goto_4
if-ne v6, v10, :cond_8
.line 103
.line 104
if-eqz v2, :cond_5
.line 105
.line 106
iget-object v6, v0, Landroidx/appcompat/widget/ContentFrameLayout;->i:Landroid/util/TypedValue;
.line 107
.line 108
goto :goto_5
.line 109
:cond_5
iget-object v6, v0, Landroidx/appcompat/widget/ContentFrameLayout;->j:Landroid/util/TypedValue;
.line 110
.line 111
:goto_5
if-eqz v6, :cond_8
.line 112
.line 113
iget v14, v6, Landroid/util/TypedValue;->type:I
.line 114
.line 115
if-eqz v14, :cond_8
.line 116
.line 117
if-ne v14, v9, :cond_6
.line 118
.line 119
invoke-virtual {v6, v1}, Landroid/util/TypedValue;->getDimension(Landroid/util/DisplayMetrics;)F
.line 120
.line 121
.line 122
move-result v6
.line 123
:goto_6
float-to-int v6, v6
.line 124
goto :goto_7
.line 125
:cond_6
if-ne v14, v8, :cond_7
.line 126
.line 127
iget v14, v1, Landroid/util/DisplayMetrics;->heightPixels:I
.line 128
.line 129
int-to-float v15, v14
.line 130
int-to-float v14, v14
.line 131
invoke-virtual {v6, v15, v14}, Landroid/util/TypedValue;->getFraction(FF)F
.line 132
.line 133
.line 134
move-result v6
.line 135
goto :goto_6
.line 136
:cond_7
move v6, v5
.line 137
:goto_7
if-lez v6, :cond_8
.line 138
.line 139
iget v14, v7, Landroid/graphics/Rect;->top:I
.line 140
.line 141
iget v15, v7, Landroid/graphics/Rect;->bottom:I
.line 142
.line 143
add-int/2addr v14, v15
.line 144
sub-int/2addr v6, v14
.line 145
invoke-static/range {p2 .. p2}, Landroid/view/View$MeasureSpec;->getSize(I)I
.line 146
.line 147
.line 148
move-result v14
.line 149
invoke-static {v6, v14}, Ljava/lang/Math;->min(II)I
.line 150
.line 151
.line 152
move-result v6
.line 153
invoke-static {v6, v11}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
.line 154
.line 155
.line 156
move-result v6
.line 157
goto :goto_8
.line 158
:cond_8
move/from16 v6, p2
.line 159
.line 160
:goto_8
invoke-super {v0, v12, v6}, Landroid/widget/FrameLayout;->onMeasure(II)V
.line 161
.line 162
.line 163
invoke-virtual {v0}, Landroid/view/View;->getMeasuredWidth()I
.line 164
.line 165
.line 166
move-result v12
.line 167
invoke-static {v12, v11}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
.line 168
.line 169
.line 170
move-result v14
.line 171
if-nez v13, :cond_d
.line 172
.line 173
if-ne v3, v10, :cond_d
.line 174
.line 175
if-eqz v2, :cond_9
.line 176
.line 177
iget-object v2, v0, Landroidx/appcompat/widget/ContentFrameLayout;->f:Landroid/util/TypedValue;
.line 178
.line 179
goto :goto_9
.line 180
:cond_9
iget-object v2, v0, Landroidx/appcompat/widget/ContentFrameLayout;->c:Landroid/util/TypedValue;
.line 181
.line 182
:goto_9
if-eqz v2, :cond_d
.line 183
.line 184
iget v3, v2, Landroid/util/TypedValue;->type:I
.line 185
.line 186
if-eqz v3, :cond_d
.line 187
.line 188
if-ne v3, v9, :cond_a
.line 189
.line 190
invoke-virtual {v2, v1}, Landroid/util/TypedValue;->getDimension(Landroid/util/DisplayMetrics;)F
.line 191
.line 192
.line 193
move-result v1
.line 194
:goto_a
float-to-int v1, v1
.line 195
goto :goto_b
.line 196
:cond_a
if-ne v3, v8, :cond_b
.line 197
.line 198
iget v1, v1, Landroid/util/DisplayMetrics;->widthPixels:I
.line 199
.line 200
int-to-float v3, v1
.line 201
int-to-float v1, v1
.line 202
invoke-virtual {v2, v3, v1}, Landroid/util/TypedValue;->getFraction(FF)F
.line 203
.line 204
.line 205
move-result v1
.line 206
goto :goto_a
.line 207
:cond_b
move v1, v5
.line 208
:goto_b
if-lez v1, :cond_c
.line 209
.line 210
iget v2, v7, Landroid/graphics/Rect;->left:I
.line 211
.line 212
iget v3, v7, Landroid/graphics/Rect;->right:I
.line 213
.line 214
add-int/2addr v2, v3
.line 215
sub-int/2addr v1, v2
.line 216
:cond_c
if-ge v12, v1, :cond_d
.line 217
.line 218
invoke-static {v1, v11}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
.line 219
.line 220
.line 221
move-result v14
.line 222
goto :goto_c
.line 223
:cond_d
move v4, v5
.line 224
:goto_c
if-eqz v4, :cond_e
.line 225
.line 226
invoke-super {v0, v14, v6}, Landroid/widget/FrameLayout;->onMeasure(II)V
.line 227
.line 228
.line 229
:cond_e
return-void
.end method
.method public setAttachListener(Landroidx/appcompat/widget/ContentFrameLayout$OnAttachListener;)V
.locals 0
.line 1
iput-object p1, p0, Landroidx/appcompat/widget/ContentFrameLayout;->l:Landroidx/appcompat/widget/ContentFrameLayout$OnAttachListener;
.line 2
.line 3
return-void
.end method