soul-browser/app/smali/com/google/android/gms/dynamic/IObjectWrapper$Stub.smali
KaKi87 e2c18960ec
Fix PDF translation stuck on "Updating the text module" (#22)
* Bundle on-device ML Kit OCR to fix PDF translation hang

Sideloaded builds never receive Play Services install-time OCR modules, so
image/PDF translation could sit forever on "Updating the text module".
Ship bundled text-recognition models/native code via the build script, and
cap DialogOcrLoad retries so the wait dialog cannot loop indefinitely.
Bump version to 2.0.0-testing.36.

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Add GMS dynamic API aliases for bundled OCR

Bundled text-recognition-common calls IObjectWrapper.Stub.asInterface and
ObjectWrapper.unwrap, but R8 renamed those to I1/f2 in this APK. Add public
aliases so OCR init no longer throws NoSuchMethodError. Bump to 2.0.0-testing.37.

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Restore ImageUtils APIs required by bundled OCR

text-recognition-bundled-common calls ImageUtils.getInstance and
getUprightRotationMatrix, which R8 had stripped from vision-common.
Restore those methods, add ImageConvertUtils buffer helpers and
ObjectWrapper.wrap for the same public API surface. Bump to 2.0.0-testing.38.

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Move restored ImageUtils helpers to smali_classes4

classes3 is at the DEX method-ref ceiling; relocating ImageUtils and
ImageConvertUtils keeps apktool builds reliable after restoring the
bundled-OCR public APIs.

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Download ML Kit OCR models at runtime from Maven

Stop packaging OCR assets and native libs into the APK. DialogOcrLoad now
fetches text-recognition AARs from Google Maven, extracts models + the
pipeline .so, and activates them via System.load / AssetManager.addAssetPath.
Keep only the small module dex in the APK (JVM jars cannot be loaded on-device).
Bump to 2.0.0-testing.39.

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Move OCR install helpers to smali_classes4

Avoid DEX method-ref overflow in classes3 when assembling DialogOcrLoad
install task/progress classes.

Co-authored-by: KaKi87 <KaKi87@pm.me>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-08-12 16:53:38 +02:00

86 lines
2 KiB
Smali

.class public abstract Lcom/google/android/gms/dynamic/IObjectWrapper$Stub;
.super Lcom/google/android/gms/internal/common/zzb;
.source "SourceFile"
# interfaces
.implements Lcom/google/android/gms/dynamic/IObjectWrapper;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/android/gms/dynamic/IObjectWrapper;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x409
name = "Stub"
.end annotation
# direct methods
.method public static I1(Landroid/os/IBinder;)Lcom/google/android/gms/dynamic/IObjectWrapper;
.locals 3
.line 1
if-nez p0, :cond_0
.line 2
.line 3
const/4 p0, 0x0
.line 4
return-object p0
.line 5
:cond_0
const-string v0, "com.google.android.gms.dynamic.IObjectWrapper"
.line 6
.line 7
invoke-interface {p0, v0}, Landroid/os/IBinder;->queryLocalInterface(Ljava/lang/String;)Landroid/os/IInterface;
.line 8
.line 9
.line 10
move-result-object v1
.line 11
instance-of v2, v1, Lcom/google/android/gms/dynamic/IObjectWrapper;
.line 12
.line 13
if-eqz v2, :cond_1
.line 14
.line 15
check-cast v1, Lcom/google/android/gms/dynamic/IObjectWrapper;
.line 16
.line 17
return-object v1
.line 18
:cond_1
new-instance v1, Lcom/google/android/gms/dynamic/zzb;
.line 19
.line 20
invoke-direct {v1, p0, v0}, Lcom/google/android/gms/internal/common/zza;-><init>(Landroid/os/IBinder;Ljava/lang/String;)V
.line 21
.line 22
.line 23
return-object v1
.end method
# Bundled ML Kit OCR (text-recognition-bundled-common) calls the public
# asInterface name; R8 renamed the implementation to I1 in this APK.
.method public static asInterface(Landroid/os/IBinder;)Lcom/google/android/gms/dynamic/IObjectWrapper;
.locals 0
invoke-static {p0}, Lcom/google/android/gms/dynamic/IObjectWrapper$Stub;->I1(Landroid/os/IBinder;)Lcom/google/android/gms/dynamic/IObjectWrapper;
move-result-object p0
return-object p0
.end method