soul-browser/app/smali/androidx/appcompat/view/menu/MenuPopup.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

297 lines
5.3 KiB
Smali

.class abstract Landroidx/appcompat/view/menu/MenuPopup;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Landroidx/appcompat/view/menu/ShowableListMenu;
.implements Landroidx/appcompat/view/menu/MenuPresenter;
.implements Landroid/widget/AdapterView$OnItemClickListener;
# instance fields
.field public c:Landroid/graphics/Rect;
# direct methods
.method public static m(Landroid/widget/ListAdapter;Landroid/content/Context;I)I
.locals 10
.line 1
const/4 v0, 0x0
.line 2
invoke-static {v0, v0}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
.line 3
.line 4
.line 5
move-result v1
.line 6
invoke-static {v0, v0}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
.line 7
.line 8
.line 9
move-result v2
.line 10
invoke-interface {p0}, Landroid/widget/Adapter;->getCount()I
.line 11
.line 12
.line 13
move-result v3
.line 14
const/4 v4, 0x0
.line 15
move v5, v0
.line 16
move v6, v5
.line 17
move-object v7, v4
.line 18
move-object v8, v7
.line 19
:goto_0
if-ge v0, v3, :cond_4
.line 20
.line 21
invoke-interface {p0, v0}, Landroid/widget/Adapter;->getItemViewType(I)I
.line 22
.line 23
.line 24
move-result v9
.line 25
if-eq v9, v6, :cond_0
.line 26
.line 27
move-object v8, v4
.line 28
move v6, v9
.line 29
:cond_0
if-nez v7, :cond_1
.line 30
.line 31
new-instance v7, Landroid/widget/FrameLayout;
.line 32
.line 33
invoke-direct {v7, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V
.line 34
.line 35
.line 36
:cond_1
invoke-interface {p0, v0, v8, v7}, Landroid/widget/Adapter;->getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
.line 37
.line 38
.line 39
move-result-object v8
.line 40
invoke-virtual {v8, v1, v2}, Landroid/view/View;->measure(II)V
.line 41
.line 42
.line 43
invoke-virtual {v8}, Landroid/view/View;->getMeasuredWidth()I
.line 44
.line 45
.line 46
move-result v9
.line 47
if-lt v9, p2, :cond_2
.line 48
.line 49
return p2
.line 50
:cond_2
if-le v9, v5, :cond_3
.line 51
.line 52
move v5, v9
.line 53
:cond_3
add-int/lit8 v0, v0, 0x1
.line 54
.line 55
goto :goto_0
.line 56
:cond_4
return v5
.end method
# virtual methods
.method public final g(Landroidx/appcompat/view/menu/MenuItemImpl;)Z
.locals 0
.line 1
const/4 p1, 0x0
.line 2
return p1
.end method
.method public final h(Landroid/content/Context;Landroidx/appcompat/view/menu/MenuBuilder;)V
.locals 0
.line 1
return-void
.end method
.method public final k(Landroidx/appcompat/view/menu/MenuItemImpl;)Z
.locals 0
.line 1
const/4 p1, 0x0
.line 2
return p1
.end method
.method public abstract l(Landroidx/appcompat/view/menu/MenuBuilder;)V
.end method
.method public abstract n(Landroid/view/View;)V
.end method
.method public abstract o(Z)V
.end method
.method public final onItemClick(Landroid/widget/AdapterView;Landroid/view/View;IJ)V
.locals 0
.line 1
invoke-virtual {p1}, Landroid/widget/AdapterView;->getAdapter()Landroid/widget/Adapter;
.line 2
.line 3
.line 4
move-result-object p1
.line 5
check-cast p1, Landroid/widget/ListAdapter;
.line 6
.line 7
instance-of p2, p1, Landroid/widget/HeaderViewListAdapter;
.line 8
.line 9
if-eqz p2, :cond_0
.line 10
.line 11
move-object p2, p1
.line 12
check-cast p2, Landroid/widget/HeaderViewListAdapter;
.line 13
.line 14
invoke-virtual {p2}, Landroid/widget/HeaderViewListAdapter;->getWrappedAdapter()Landroid/widget/ListAdapter;
.line 15
.line 16
.line 17
move-result-object p2
.line 18
check-cast p2, Landroidx/appcompat/view/menu/MenuAdapter;
.line 19
.line 20
goto :goto_0
.line 21
:cond_0
move-object p2, p1
.line 22
check-cast p2, Landroidx/appcompat/view/menu/MenuAdapter;
.line 23
.line 24
:goto_0
iget-object p2, p2, Landroidx/appcompat/view/menu/MenuAdapter;->c:Landroidx/appcompat/view/menu/MenuBuilder;
.line 25
.line 26
invoke-interface {p1, p3}, Landroid/widget/Adapter;->getItem(I)Ljava/lang/Object;
.line 27
.line 28
.line 29
move-result-object p1
.line 30
check-cast p1, Landroid/view/MenuItem;
.line 31
.line 32
instance-of p3, p0, Landroidx/appcompat/view/menu/CascadingMenuPopup;
.line 33
.line 34
if-nez p3, :cond_1
.line 35
.line 36
const/4 p3, 0x0
.line 37
goto :goto_1
.line 38
:cond_1
const/4 p3, 0x4
.line 39
:goto_1
invoke-virtual {p2, p1, p0, p3}, Landroidx/appcompat/view/menu/MenuBuilder;->q(Landroid/view/MenuItem;Landroidx/appcompat/view/menu/MenuPresenter;I)Z
.line 40
.line 41
.line 42
return-void
.end method
.method public abstract p(I)V
.end method
.method public abstract q(I)V
.end method
.method public abstract r(Landroid/widget/PopupWindow$OnDismissListener;)V
.end method
.method public abstract s(Z)V
.end method
.method public abstract t(I)V
.end method