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

691 lines
12 KiB
Smali

.class Landroidx/appcompat/widget/SuggestionsAdapter;
.super Landroidx/cursoradapter/widget/ResourceCursorAdapter;
.source "SourceFile"
# interfaces
.implements Landroid/view/View$OnClickListener;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/appcompat/widget/SuggestionsAdapter$ChildViewCache;
}
.end annotation
# instance fields
.field public i:I
.field public j:I
.field public k:I
.field public l:I
.field public m:I
.field public n:I
.field public o:I
# virtual methods
.method public final a(Landroid/database/Cursor;)V
.locals 2
.line 1
:try_start_0
invoke-super {p0, p1}, Landroidx/cursoradapter/widget/CursorAdapter;->a(Landroid/database/Cursor;)V
.line 2
.line 3
.line 4
if-eqz p1, :cond_0
.line 5
.line 6
const-string v0, "suggest_text_1"
.line 7
.line 8
invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
.line 9
.line 10
.line 11
move-result v0
.line 12
iput v0, p0, Landroidx/appcompat/widget/SuggestionsAdapter;->j:I
.line 13
.line 14
const-string v0, "suggest_text_2"
.line 15
.line 16
invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
.line 17
.line 18
.line 19
move-result v0
.line 20
iput v0, p0, Landroidx/appcompat/widget/SuggestionsAdapter;->k:I
.line 21
.line 22
const-string v0, "suggest_text_2_url"
.line 23
.line 24
invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
.line 25
.line 26
.line 27
move-result v0
.line 28
iput v0, p0, Landroidx/appcompat/widget/SuggestionsAdapter;->l:I
.line 29
.line 30
const-string v0, "suggest_icon_1"
.line 31
.line 32
invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
.line 33
.line 34
.line 35
move-result v0
.line 36
iput v0, p0, Landroidx/appcompat/widget/SuggestionsAdapter;->m:I
.line 37
.line 38
const-string v0, "suggest_icon_2"
.line 39
.line 40
invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
.line 41
.line 42
.line 43
move-result v0
.line 44
iput v0, p0, Landroidx/appcompat/widget/SuggestionsAdapter;->n:I
.line 45
.line 46
const-string v0, "suggest_flags"
.line 47
.line 48
invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
.line 49
.line 50
.line 51
move-result p1
.line 52
iput p1, p0, Landroidx/appcompat/widget/SuggestionsAdapter;->o:I
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.line 53
.line 54
return-void
.line 55
:catch_0
move-exception p1
.line 56
goto :goto_0
.line 57
:cond_0
return-void
.line 58
:goto_0
const-string v0, "SuggestionsAdapter"
.line 59
.line 60
const-string v1, "error changing cursor and caching columns"
.line 61
.line 62
invoke-static {v0, v1, p1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
.line 63
.line 64
.line 65
return-void
.end method
.method public final c(Landroid/database/Cursor;)Ljava/lang/String;
.locals 3
.line 1
if-nez p1, :cond_0
.line 2
.line 3
const/4 p1, 0x0
.line 4
return-object p1
.line 5
:cond_0
const-string v0, "suggest_intent_query"
.line 6
.line 7
invoke-interface {p1, v0}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I
.line 8
.line 9
.line 10
move-result v0
.line 11
const/4 v1, -0x1
.line 12
const/4 v2, 0x0
.line 13
if-ne v0, v1, :cond_1
.line 14
.line 15
goto :goto_0
.line 16
:cond_1
:try_start_0
invoke-interface {p1, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
.line 17
.line 18
.line 19
move-result-object v2
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.line 20
goto :goto_0
.line 21
:catch_0
move-exception p1
.line 22
const-string v0, "SuggestionsAdapter"
.line 23
.line 24
const-string v1, "unexpected error retrieving valid column from cursor, did the remote process die?"
.line 25
.line 26
invoke-static {v0, v1, p1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
.line 27
.line 28
.line 29
:goto_0
invoke-virtual {v2}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
.line 30
.line 31
.line 32
return-object v2
.end method
.method public final d(Ljava/lang/CharSequence;)Landroid/database/Cursor;
.locals 0
.line 1
if-nez p1, :cond_0
.line 2
.line 3
goto :goto_0
.line 4
:cond_0
invoke-interface {p1}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;
.line 5
.line 6
.line 7
:goto_0
const/4 p1, 0x0
.line 8
throw p1
.end method
.method public final e(Landroid/view/View;Landroid/database/Cursor;)V
.locals 2
.line 1
invoke-virtual {p1}, Landroid/view/View;->getTag()Ljava/lang/Object;
.line 2
.line 3
.line 4
move-result-object p1
.line 5
check-cast p1, Landroidx/appcompat/widget/SuggestionsAdapter$ChildViewCache;
.line 6
.line 7
iget v0, p0, Landroidx/appcompat/widget/SuggestionsAdapter;->o:I
.line 8
.line 9
const/4 v1, -0x1
.line 10
if-eq v0, v1, :cond_0
.line 11
.line 12
invoke-interface {p2, v0}, Landroid/database/Cursor;->getInt(I)I
.line 13
.line 14
.line 15
move-result p2
.line 16
goto :goto_0
.line 17
:cond_0
const/4 p2, 0x0
.line 18
:goto_0
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
.line 19
.line 20
.line 21
iget p1, p0, Landroidx/appcompat/widget/SuggestionsAdapter;->i:I
.line 22
.line 23
const/4 v0, 0x2
.line 24
if-eq p1, v0, :cond_2
.line 25
.line 26
const/4 v0, 0x1
.line 27
if-ne p1, v0, :cond_1
.line 28
.line 29
and-int/lit8 p1, p2, 0x1
.line 30
.line 31
if-eqz p1, :cond_1
.line 32
.line 33
goto :goto_1
.line 34
:cond_1
const/4 p1, 0x0
.line 35
throw p1
.line 36
:cond_2
:goto_1
const/4 p1, 0x0
.line 37
throw p1
.end method
.method public final g(Landroid/database/Cursor;Landroid/view/ViewGroup;)Landroid/view/View;
.locals 0
.line 1
const/4 p1, 0x0
.line 2
throw p1
.end method
.method public final getDropDownView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
.locals 0
.line 1
:try_start_0
invoke-super {p0, p1, p2, p3}, Landroidx/cursoradapter/widget/CursorAdapter;->getDropDownView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
.line 2
.line 3
.line 4
move-result-object p1
:try_end_0
.catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0
.line 5
return-object p1
.line 6
:catch_0
move-exception p1
.line 7
const-string p2, "SuggestionsAdapter"
.line 8
.line 9
const-string p3, "Search suggestions cursor threw exception."
.line 10
.line 11
invoke-static {p2, p3, p1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
.line 12
.line 13
.line 14
const/4 p1, 0x0
.line 15
throw p1
.end method
.method public final getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
.locals 0
.line 1
:try_start_0
invoke-super {p0, p1, p2, p3}, Landroidx/cursoradapter/widget/CursorAdapter;->getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
.line 2
.line 3
.line 4
move-result-object p1
:try_end_0
.catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0
.line 5
return-object p1
.line 6
:catch_0
move-exception p1
.line 7
const-string p2, "SuggestionsAdapter"
.line 8
.line 9
const-string p3, "Search suggestions cursor threw exception."
.line 10
.line 11
invoke-static {p2, p3, p1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
.line 12
.line 13
.line 14
const/4 p1, 0x0
.line 15
throw p1
.end method
.method public final hasStableIds()Z
.locals 1
const/4 v0, 0x0
return v0
.end method
.method public final i(Ljava/lang/String;)Landroid/graphics/drawable/Drawable;
.locals 2
.line 1
const/4 v0, 0x0
.line 2
if-eqz p1, :cond_1
.line 3
.line 4
invoke-virtual {p1}, Ljava/lang/String;->isEmpty()Z
.line 5
.line 6
.line 7
move-result v1
.line 8
if-nez v1, :cond_1
.line 9
.line 10
const-string v1, "0"
.line 11
.line 12
invoke-virtual {v1, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
.line 13
.line 14
.line 15
move-result v1
.line 16
if-eqz v1, :cond_0
.line 17
.line 18
goto :goto_0
.line 19
:cond_0
:try_start_0
invoke-static {p1}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
:try_end_0
.catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_1
.catch Landroid/content/res/Resources$NotFoundException; {:try_start_0 .. :try_end_0} :catch_0
.line 20
.line 21
.line 22
throw v0
.line 23
:catch_0
const-string v1, "Icon resource not found: "
.line 24
.line 25
invoke-virtual {v1, p1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
.line 26
.line 27
.line 28
move-result-object p1
.line 29
const-string v1, "SuggestionsAdapter"
.line 30
.line 31
invoke-static {v1, p1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
.line 32
.line 33
.line 34
return-object v0
.line 35
:catch_1
throw v0
.line 36
:cond_1
:goto_0
return-object v0
.end method
.method public final notifyDataSetChanged()V
.locals 2
.line 1
invoke-super {p0}, Landroid/widget/BaseAdapter;->notifyDataSetChanged()V
.line 2
.line 3
.line 4
iget-object v0, p0, Landroidx/cursoradapter/widget/CursorAdapter;->f:Landroid/database/Cursor;
.line 5
.line 6
if-eqz v0, :cond_0
.line 7
.line 8
invoke-interface {v0}, Landroid/database/Cursor;->getExtras()Landroid/os/Bundle;
.line 9
.line 10
.line 11
move-result-object v0
.line 12
goto :goto_0
.line 13
:cond_0
const/4 v0, 0x0
.line 14
:goto_0
if-eqz v0, :cond_1
.line 15
.line 16
const-string v1, "in_progress"
.line 17
.line 18
invoke-virtual {v0, v1}, Landroid/os/BaseBundle;->getBoolean(Ljava/lang/String;)Z
.line 19
.line 20
.line 21
:cond_1
return-void
.end method
.method public final notifyDataSetInvalidated()V
.locals 2
.line 1
invoke-super {p0}, Landroid/widget/BaseAdapter;->notifyDataSetInvalidated()V
.line 2
.line 3
.line 4
iget-object v0, p0, Landroidx/cursoradapter/widget/CursorAdapter;->f:Landroid/database/Cursor;
.line 5
.line 6
if-eqz v0, :cond_0
.line 7
.line 8
invoke-interface {v0}, Landroid/database/Cursor;->getExtras()Landroid/os/Bundle;
.line 9
.line 10
.line 11
move-result-object v0
.line 12
goto :goto_0
.line 13
:cond_0
const/4 v0, 0x0
.line 14
:goto_0
if-eqz v0, :cond_1
.line 15
.line 16
const-string v1, "in_progress"
.line 17
.line 18
invoke-virtual {v0, v1}, Landroid/os/BaseBundle;->getBoolean(Ljava/lang/String;)Z
.line 19
.line 20
.line 21
:cond_1
return-void
.end method
.method public final onClick(Landroid/view/View;)V
.locals 0
.line 1
invoke-virtual {p1}, Landroid/view/View;->getTag()Ljava/lang/Object;
.line 2
.line 3
.line 4
move-result-object p1
.line 5
instance-of p1, p1, Ljava/lang/CharSequence;
.line 6
.line 7
if-nez p1, :cond_0
.line 8
.line 9
return-void
.line 10
:cond_0
const/4 p1, 0x0
.line 11
throw p1
.end method