Files
rr3-apk/smali/androidx/activity/ImmLeaksCleaner.smali
Daniel Elliott f3960ee359 Add Discord APKTool decompilation (Smali source for modding)
- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3
- APKTool decompilation (Smali bytecode) for modding and rebuilding APK
- Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures
- Includes full Smali source, resources, and native libraries
- Ready to rebuild APK after modifications with apktool b command
- Added comprehensive README-apktool.md with modding guide

This branch complements the JADX branches:
- Use JADX (main/discord-community) to UNDERSTAND code (readable Java)
- Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali)

Total: 44,417 files, 538.51 MB Smali source code
2026-02-18 16:13:44 -08:00

278 lines
6.6 KiB
Smali

.class final Landroidx/activity/ImmLeaksCleaner;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Landroidx/lifecycle/LifecycleEventObserver;
# annotations
.annotation build Landroidx/annotation/RequiresApi;
value = 0x13
.end annotation
# static fields
.field private static final INIT_FAILED:I = 0x2
.field private static final INIT_SUCCESS:I = 0x1
.field private static final NOT_INITIALIAZED:I
.field private static sHField:Ljava/lang/reflect/Field;
.field private static sNextServedViewField:Ljava/lang/reflect/Field;
.field private static sReflectedFieldsInitialized:I
.field private static sServedViewField:Ljava/lang/reflect/Field;
# instance fields
.field private mActivity:Landroid/app/Activity;
# direct methods
.method static constructor <clinit>()V
.locals 0
return-void
.end method
.method public constructor <init>(Landroid/app/Activity;)V
.locals 0
.line 46
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Landroidx/activity/ImmLeaksCleaner;->mActivity:Landroid/app/Activity;
return-void
.end method
.method private static initializeReflectiveFields()V
.locals 3
.annotation build Landroid/annotation/SuppressLint;
value = {
"SoonBlockedPrivateApi"
}
.end annotation
.annotation build Landroidx/annotation/MainThread;
.end annotation
const-class v0, Landroid/view/inputmethod/InputMethodManager;
const/4 v1, 0x2
:try_start_0
sput v1, Landroidx/activity/ImmLeaksCleaner;->sReflectedFieldsInitialized:I
const-string v1, "mServedView"
.line 104
invoke-virtual {v0, v1}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;
move-result-object v1
sput-object v1, Landroidx/activity/ImmLeaksCleaner;->sServedViewField:Ljava/lang/reflect/Field;
const/4 v2, 0x1
.line 105
invoke-virtual {v1, v2}, Ljava/lang/reflect/AccessibleObject;->setAccessible(Z)V
const-string v1, "mNextServedView"
.line 106
invoke-virtual {v0, v1}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;
move-result-object v1
sput-object v1, Landroidx/activity/ImmLeaksCleaner;->sNextServedViewField:Ljava/lang/reflect/Field;
.line 107
invoke-virtual {v1, v2}, Ljava/lang/reflect/AccessibleObject;->setAccessible(Z)V
const-string v1, "mH"
.line 108
invoke-virtual {v0, v1}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;
move-result-object v0
sput-object v0, Landroidx/activity/ImmLeaksCleaner;->sHField:Ljava/lang/reflect/Field;
.line 109
invoke-virtual {v0, v2}, Ljava/lang/reflect/AccessibleObject;->setAccessible(Z)V
sput v2, Landroidx/activity/ImmLeaksCleaner;->sReflectedFieldsInitialized:I
:try_end_0
.catch Ljava/lang/NoSuchFieldException; {:try_start_0 .. :try_end_0} :catch_0
:catch_0
return-void
.end method
# virtual methods
.method public onStateChanged(Landroidx/lifecycle/LifecycleOwner;Landroidx/lifecycle/Lifecycle$Event;)V
.locals 2
.param p1 # Landroidx/lifecycle/LifecycleOwner;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Landroidx/lifecycle/Lifecycle$Event;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.line 52
sget-object p1, Landroidx/lifecycle/Lifecycle$Event;->ON_DESTROY:Landroidx/lifecycle/Lifecycle$Event;
if-eq p2, p1, :cond_0
return-void
:cond_0
sget p1, Landroidx/activity/ImmLeaksCleaner;->sReflectedFieldsInitialized:I
if-nez p1, :cond_1
.line 56
invoke-static {}, Landroidx/activity/ImmLeaksCleaner;->initializeReflectiveFields()V
:cond_1
sget p1, Landroidx/activity/ImmLeaksCleaner;->sReflectedFieldsInitialized:I
const/4 p2, 0x1
if-ne p1, p2, :cond_5
iget-object p1, p0, Landroidx/activity/ImmLeaksCleaner;->mActivity:Landroid/app/Activity;
const-string p2, "input_method"
.line 60
invoke-virtual {p1, p2}, Landroid/app/Activity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Landroid/view/inputmethod/InputMethodManager;
:try_start_0
sget-object p2, Landroidx/activity/ImmLeaksCleaner;->sHField:Ljava/lang/reflect/Field;
.line 63
invoke-virtual {p2, p1}, Ljava/lang/reflect/Field;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p2
:try_end_0
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_3
if-nez p2, :cond_2
return-void
.line 70
:cond_2
monitor-enter p2
:try_start_1
sget-object v0, Landroidx/activity/ImmLeaksCleaner;->sServedViewField:Ljava/lang/reflect/Field;
.line 73
invoke-virtual {v0, p1}, Ljava/lang/reflect/Field;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/view/View;
:try_end_1
.catch Ljava/lang/IllegalAccessException; {:try_start_1 .. :try_end_1} :catch_2
.catch Ljava/lang/ClassCastException; {:try_start_1 .. :try_end_1} :catch_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
if-nez v0, :cond_3
.line 80
:try_start_2
monitor-exit p2
return-void
:catchall_0
move-exception p1
goto :goto_0
.line 82
:cond_3
invoke-virtual {v0}, Landroid/view/View;->isAttachedToWindow()Z
move-result v0
if-eqz v0, :cond_4
.line 83
monitor-exit p2
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
return-void
:cond_4
:try_start_3
sget-object v0, Landroidx/activity/ImmLeaksCleaner;->sNextServedViewField:Ljava/lang/reflect/Field;
const/4 v1, 0x0
.line 88
invoke-virtual {v0, p1, v1}, Ljava/lang/reflect/Field;->set(Ljava/lang/Object;Ljava/lang/Object;)V
:try_end_3
.catch Ljava/lang/IllegalAccessException; {:try_start_3 .. :try_end_3} :catch_0
.catchall {:try_start_3 .. :try_end_3} :catchall_0
.line 92
:try_start_4
monitor-exit p2
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_0
.line 95
invoke-virtual {p1}, Landroid/view/inputmethod/InputMethodManager;->isActive()Z
goto :goto_1
.line 90
:catch_0
:try_start_5
monitor-exit p2
return-void
.line 77
:catch_1
monitor-exit p2
return-void
.line 75
:catch_2
monitor-exit p2
return-void
.line 92
:goto_0
monitor-exit p2
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_0
throw p1
:catch_3
:cond_5
:goto_1
return-void
.end method