- 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
499 lines
12 KiB
Smali
499 lines
12 KiB
Smali
.class public final Lcom/facebook/internal/instrument/anrreport/ANRHandler;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# annotations
|
|
.annotation build Landroidx/annotation/RestrictTo;
|
|
value = {
|
|
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final INSTANCE:Lcom/facebook/internal/instrument/anrreport/ANRHandler;
|
|
|
|
.field private static final MAX_ANR_REPORT_NUM:I = 0x5
|
|
|
|
.field private static final enabled:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
|
|
# direct methods
|
|
.method public static synthetic $r8$lambda$QF8GfIkRwZkNHlwUbbToH5rDB3s(Ljava/util/List;Lcom/facebook/GraphResponse;)V
|
|
.locals 0
|
|
|
|
.line 0
|
|
invoke-static {p0, p1}, Lcom/facebook/internal/instrument/anrreport/ANRHandler;->sendANRReports$lambda-5(Ljava/util/List;Lcom/facebook/GraphResponse;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic $r8$lambda$t2tNUdeuNYmDvDsLpDitAM7FWEE(Lcom/facebook/internal/instrument/InstrumentData;Lcom/facebook/internal/instrument/InstrumentData;)I
|
|
.locals 0
|
|
|
|
.line 0
|
|
invoke-static {p0, p1}, Lcom/facebook/internal/instrument/anrreport/ANRHandler;->sendANRReports$lambda-2(Lcom/facebook/internal/instrument/InstrumentData;Lcom/facebook/internal/instrument/InstrumentData;)I
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
new-instance v0, Lcom/facebook/internal/instrument/anrreport/ANRHandler;
|
|
|
|
invoke-direct {v0}, Lcom/facebook/internal/instrument/anrreport/ANRHandler;-><init>()V
|
|
|
|
sput-object v0, Lcom/facebook/internal/instrument/anrreport/ANRHandler;->INSTANCE:Lcom/facebook/internal/instrument/anrreport/ANRHandler;
|
|
|
|
.line 30
|
|
new-instance v0, Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>(Z)V
|
|
|
|
sput-object v0, Lcom/facebook/internal/instrument/anrreport/ANRHandler;->enabled:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 26
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final declared-synchronized enable()V
|
|
.locals 3
|
|
|
|
const-class v0, Lcom/facebook/internal/instrument/anrreport/ANRHandler;
|
|
|
|
monitor-enter v0
|
|
|
|
:try_start_0
|
|
const-class v1, Lcom/facebook/internal/instrument/anrreport/ANRHandler;
|
|
|
|
invoke-static {v1}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->isObjectCrashing(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
monitor-exit v0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
:try_start_1
|
|
sget-object v1, Lcom/facebook/internal/instrument/anrreport/ANRHandler;->enabled:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
.line 35
|
|
invoke-virtual {v1, v2}, Ljava/util/concurrent/atomic/AtomicBoolean;->getAndSet(Z)Z
|
|
|
|
move-result v1
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
.line 36
|
|
monitor-exit v0
|
|
|
|
return-void
|
|
|
|
.line 38
|
|
:cond_1
|
|
:try_start_2
|
|
invoke-static {}, Lcom/facebook/FacebookSdk;->getAutoLogAppEventsEnabled()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
.line 39
|
|
invoke-static {}, Lcom/facebook/internal/instrument/anrreport/ANRHandler;->sendANRReports()V
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
goto :goto_1
|
|
|
|
.line 41
|
|
:cond_2
|
|
:goto_0
|
|
invoke-static {}, Lcom/facebook/internal/instrument/anrreport/ANRDetector;->start()V
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
.line 42
|
|
monitor-exit v0
|
|
|
|
return-void
|
|
|
|
:goto_1
|
|
:try_start_3
|
|
const-class v2, Lcom/facebook/internal/instrument/anrreport/ANRHandler;
|
|
|
|
invoke-static {v1, v2}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->handleThrowable(Ljava/lang/Throwable;Ljava/lang/Object;)V
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_1
|
|
|
|
monitor-exit v0
|
|
|
|
return-void
|
|
|
|
:catchall_1
|
|
move-exception v1
|
|
|
|
monitor-exit v0
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public static final sendANRReports()V
|
|
.locals 7
|
|
.annotation build Landroidx/annotation/VisibleForTesting;
|
|
.end annotation
|
|
|
|
const-class v0, Lcom/facebook/internal/instrument/anrreport/ANRHandler;
|
|
|
|
invoke-static {v0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->isObjectCrashing(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 52
|
|
:cond_0
|
|
:try_start_0
|
|
invoke-static {}, Lcom/facebook/internal/Utility;->isDataProcessingRestricted()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
return-void
|
|
|
|
.line 55
|
|
:cond_1
|
|
invoke-static {}, Lcom/facebook/internal/instrument/InstrumentUtility;->listAnrReportFiles()[Ljava/io/File;
|
|
|
|
move-result-object v1
|
|
|
|
.line 78
|
|
new-instance v2, Ljava/util/ArrayList;
|
|
|
|
array-length v3, v1
|
|
|
|
invoke-direct {v2, v3}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
.line 79
|
|
array-length v3, v1
|
|
|
|
const/4 v4, 0x0
|
|
|
|
move v5, v4
|
|
|
|
:goto_0
|
|
if-ge v5, v3, :cond_2
|
|
|
|
aget-object v6, v1, v5
|
|
|
|
.line 58
|
|
invoke-static {v6}, Lcom/facebook/internal/instrument/InstrumentData$Builder;->load(Ljava/io/File;)Lcom/facebook/internal/instrument/InstrumentData;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-interface {v2, v6}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
add-int/lit8 v5, v5, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
goto :goto_3
|
|
|
|
.line 82
|
|
:cond_2
|
|
new-instance v1, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
.line 83
|
|
invoke-interface {v2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v2
|
|
|
|
:cond_3
|
|
:goto_1
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_4
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
move-object v5, v3
|
|
|
|
check-cast v5, Lcom/facebook/internal/instrument/InstrumentData;
|
|
|
|
.line 59
|
|
invoke-virtual {v5}, Lcom/facebook/internal/instrument/InstrumentData;->isValid()Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_3
|
|
|
|
invoke-interface {v1, v3}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_1
|
|
|
|
.line 82
|
|
:cond_4
|
|
new-instance v2, Lcom/facebook/internal/instrument/anrreport/ANRHandler$$ExternalSyntheticLambda0;
|
|
|
|
invoke-direct {v2}, Lcom/facebook/internal/instrument/anrreport/ANRHandler$$ExternalSyntheticLambda0;-><init>()V
|
|
|
|
.line 60
|
|
invoke-static {v1, v2}, Lkotlin/collections/CollectionsKt;->sortedWith(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
.line 61
|
|
new-instance v2, Lorg/json/JSONArray;
|
|
|
|
invoke-direct {v2}, Lorg/json/JSONArray;-><init>()V
|
|
|
|
.line 63
|
|
invoke-interface {v1}, Ljava/util/List;->size()I
|
|
|
|
move-result v3
|
|
|
|
const/4 v5, 0x5
|
|
|
|
invoke-static {v3, v5}, Ljava/lang/Math;->min(II)I
|
|
|
|
move-result v3
|
|
|
|
invoke-static {v4, v3}, Lkotlin/ranges/RangesKt;->until(II)Lkotlin/ranges/IntRange;
|
|
|
|
move-result-object v3
|
|
|
|
.line 85
|
|
invoke-interface {v3}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v3
|
|
|
|
:goto_2
|
|
invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_5
|
|
|
|
move-object v4, v3
|
|
|
|
check-cast v4, Lkotlin/collections/IntIterator;
|
|
|
|
invoke-virtual {v4}, Lkotlin/collections/IntIterator;->nextInt()I
|
|
|
|
move-result v4
|
|
|
|
.line 64
|
|
invoke-interface {v1, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v2, v4}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;
|
|
|
|
goto :goto_2
|
|
|
|
.line 66
|
|
:cond_5
|
|
sget-object v3, Lcom/facebook/internal/instrument/InstrumentUtility;->INSTANCE:Lcom/facebook/internal/instrument/InstrumentUtility;
|
|
|
|
const-string v3, "anr_reports"
|
|
|
|
new-instance v4, Lcom/facebook/internal/instrument/anrreport/ANRHandler$$ExternalSyntheticLambda1;
|
|
|
|
invoke-direct {v4, v1}, Lcom/facebook/internal/instrument/anrreport/ANRHandler$$ExternalSyntheticLambda1;-><init>(Ljava/util/List;)V
|
|
|
|
invoke-static {v3, v2, v4}, Lcom/facebook/internal/instrument/InstrumentUtility;->sendReports(Ljava/lang/String;Lorg/json/JSONArray;Lcom/facebook/GraphRequest$Callback;)V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
return-void
|
|
|
|
.line 75
|
|
:goto_3
|
|
invoke-static {v1, v0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->handleThrowable(Ljava/lang/Throwable;Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private static final sendANRReports$lambda-2(Lcom/facebook/internal/instrument/InstrumentData;Lcom/facebook/internal/instrument/InstrumentData;)I
|
|
.locals 3
|
|
|
|
const-class v0, Lcom/facebook/internal/instrument/anrreport/ANRHandler;
|
|
|
|
invoke-static {v0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->isObjectCrashing(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
return v2
|
|
|
|
:cond_0
|
|
:try_start_0
|
|
const-string v1, "o2"
|
|
|
|
.line 60
|
|
invoke-static {p1, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0, p1}, Lcom/facebook/internal/instrument/InstrumentData;->compareTo(Lcom/facebook/internal/instrument/InstrumentData;)I
|
|
|
|
move-result p0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
return p0
|
|
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
invoke-static {p0, v0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->handleThrowable(Ljava/lang/Throwable;Ljava/lang/Object;)V
|
|
|
|
return v2
|
|
.end method
|
|
|
|
.method private static final sendANRReports$lambda-5(Ljava/util/List;Lcom/facebook/GraphResponse;)V
|
|
.locals 2
|
|
|
|
const-class v0, Lcom/facebook/internal/instrument/anrreport/ANRHandler;
|
|
|
|
invoke-static {v0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->isObjectCrashing(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
:try_start_0
|
|
const-string v1, "$validReports"
|
|
|
|
invoke-static {p0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v1, "response"
|
|
|
|
invoke-static {p1, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 68
|
|
:try_start_1
|
|
invoke-virtual {p1}, Lcom/facebook/GraphResponse;->getError()Lcom/facebook/FacebookRequestError;
|
|
|
|
move-result-object v1
|
|
|
|
if-nez v1, :cond_2
|
|
|
|
invoke-virtual {p1}, Lcom/facebook/GraphResponse;->getJsonObject()Lorg/json/JSONObject;
|
|
|
|
move-result-object p1
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
const/4 p1, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const-string v1, "success"
|
|
|
|
invoke-virtual {p1, v1}, Lorg/json/JSONObject;->getBoolean(Ljava/lang/String;)Z
|
|
|
|
move-result p1
|
|
|
|
invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_0
|
|
sget-object v1, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;
|
|
|
|
invoke-static {p1, v1}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
.line 69
|
|
check-cast p0, Ljava/lang/Iterable;
|
|
|
|
.line 87
|
|
invoke-interface {p0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p0
|
|
|
|
:goto_1
|
|
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/facebook/internal/instrument/InstrumentData;
|
|
|
|
.line 69
|
|
invoke-virtual {p1}, Lcom/facebook/internal/instrument/InstrumentData;->clear()V
|
|
:try_end_1
|
|
.catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
goto :goto_1
|
|
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
goto :goto_2
|
|
|
|
:catch_0
|
|
:cond_2
|
|
return-void
|
|
|
|
.line 74
|
|
:goto_2
|
|
invoke-static {p0, v0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->handleThrowable(Ljava/lang/Throwable;Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|