- 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
551 lines
12 KiB
Smali
551 lines
12 KiB
Smali
.class public final Lcom/tapjoy/TJDeviceUtils;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# static fields
|
|
.field public static final INSTANCE:Lcom/tapjoy/TJDeviceUtils;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
new-instance v0, Lcom/tapjoy/TJDeviceUtils;
|
|
|
|
invoke-direct {v0}, Lcom/tapjoy/TJDeviceUtils;-><init>()V
|
|
|
|
sput-object v0, Lcom/tapjoy/TJDeviceUtils;->INSTANCE:Lcom/tapjoy/TJDeviceUtils;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final getAvailableDiskSpace()J
|
|
.locals 4
|
|
|
|
.line 1
|
|
invoke-static {}, Landroid/os/Environment;->getDataDirectory()Ljava/io/File;
|
|
|
|
move-result-object v0
|
|
|
|
.line 2
|
|
new-instance v1, Landroid/os/StatFs;
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->getPath()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {v1, v0}, Landroid/os/StatFs;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 3
|
|
invoke-virtual {v1}, Landroid/os/StatFs;->getFreeBytes()J
|
|
|
|
move-result-wide v0
|
|
|
|
const v2, 0xf4240
|
|
|
|
int-to-long v2, v2
|
|
|
|
.line 4
|
|
div-long/2addr v0, v2
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public final getDensity(Landroid/content/Context;)F
|
|
.locals 0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 1
|
|
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iget p1, p1, Landroid/util/DisplayMetrics;->density:F
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/high16 p1, 0x3f800000 # 1.0f
|
|
|
|
:goto_0
|
|
return p1
|
|
.end method
|
|
|
|
.method public final getOrientationString(II)Ljava/lang/String;
|
|
.locals 0
|
|
|
|
if-le p1, p2, :cond_0
|
|
|
|
const-string p1, "landscape"
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string p1, "portrait"
|
|
|
|
:goto_0
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final getScreenHeight(Landroid/content/Context;)I
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
return v0
|
|
|
|
.line 1
|
|
:cond_0
|
|
invoke-static {p1}, Landroidx/core/hardware/display/DisplayManagerCompat;->getInstance(Landroid/content/Context;)Landroidx/core/hardware/display/DisplayManagerCompat;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1, v0}, Landroidx/core/hardware/display/DisplayManagerCompat;->getDisplay(I)Landroid/view/Display;
|
|
|
|
move-result-object v1
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
return v0
|
|
|
|
.line 2
|
|
:cond_1
|
|
invoke-virtual {p1, v1}, Landroid/content/Context;->createDisplayContext(Landroid/view/Display;)Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
.line 3
|
|
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
|
|
|
|
move-result-object p1
|
|
|
|
iget p1, p1, Landroid/util/DisplayMetrics;->heightPixels:I
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public final getScreenOrientation(Landroid/app/Activity;)I
|
|
.locals 4
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 1
|
|
invoke-virtual {p1}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
|
|
|
|
move-result-object v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v1, v0
|
|
|
|
:goto_0
|
|
const/4 v2, -0x1
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
return v2
|
|
|
|
.line 5
|
|
:cond_1
|
|
:try_start_0
|
|
invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 v3, 0x1
|
|
|
|
invoke-virtual {v1, p1, v3}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
|
|
|
|
move-result-object v0
|
|
:try_end_0
|
|
.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_1
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
.line 7
|
|
invoke-virtual {p1}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v1, "TJDeviceInfo"
|
|
|
|
invoke-static {v1, p1}, Lcom/tapjoy/TapjoyLog;->e(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
:goto_1
|
|
if-eqz v0, :cond_3
|
|
|
|
.line 9
|
|
iget-object p1, v0, Landroid/content/pm/PackageInfo;->activities:[Landroid/content/pm/ActivityInfo;
|
|
|
|
const-string v1, "activities"
|
|
|
|
invoke-static {p1, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
array-length p1, p1
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
goto :goto_2
|
|
|
|
.line 10
|
|
:cond_2
|
|
iget-object p1, v0, Landroid/content/pm/PackageInfo;->activities:[Landroid/content/pm/ActivityInfo;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
aget-object p1, p1, v0
|
|
|
|
.line 11
|
|
iget p1, p1, Landroid/content/pm/ActivityInfo;->screenOrientation:I
|
|
|
|
return p1
|
|
|
|
:cond_3
|
|
:goto_2
|
|
return v2
|
|
.end method
|
|
|
|
.method public final getScreenRotation(Landroid/content/Context;II)I
|
|
.locals 6
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_9
|
|
|
|
.line 1
|
|
invoke-static {p1}, Landroidx/core/hardware/display/DisplayManagerCompat;->getInstance(Landroid/content/Context;)Landroidx/core/hardware/display/DisplayManagerCompat;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, v0}, Landroidx/core/hardware/display/DisplayManagerCompat;->getDisplay(I)Landroid/view/Display;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 2
|
|
invoke-virtual {p1}, Landroid/view/Display;->getRotation()I
|
|
|
|
move-result p1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move p1, v0
|
|
|
|
:goto_0
|
|
const-string v1, "Unknown screen orientation. Defaulting to landscape."
|
|
|
|
const-string v2, "TJDeviceInfo"
|
|
|
|
const/4 v3, 0x3
|
|
|
|
const/4 v4, 0x1
|
|
|
|
const/4 v5, 0x2
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-ne p1, v5, :cond_2
|
|
|
|
:cond_1
|
|
if-gt p3, p2, :cond_5
|
|
|
|
:cond_2
|
|
if-eq p1, v4, :cond_3
|
|
|
|
if-ne p1, v3, :cond_4
|
|
|
|
:cond_3
|
|
if-le p2, p3, :cond_4
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
if-eqz p1, :cond_8
|
|
|
|
if-eq p1, v4, :cond_9
|
|
|
|
if-eq p1, v5, :cond_6
|
|
|
|
if-eq p1, v3, :cond_7
|
|
|
|
.line 23
|
|
invoke-static {v2, v1}, Lcom/tapjoy/TapjoyLog;->w(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
goto :goto_2
|
|
|
|
:cond_5
|
|
:goto_1
|
|
if-eq p1, v4, :cond_8
|
|
|
|
if-eq p1, v5, :cond_7
|
|
|
|
if-eq p1, v3, :cond_6
|
|
|
|
.line 24
|
|
invoke-static {v2, v1}, Lcom/tapjoy/TapjoyLog;->w(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
goto :goto_2
|
|
|
|
:cond_6
|
|
const/16 v0, 0x5a
|
|
|
|
goto :goto_2
|
|
|
|
:cond_7
|
|
const/16 v0, 0xb4
|
|
|
|
goto :goto_2
|
|
|
|
:cond_8
|
|
const/16 v0, 0x10e
|
|
|
|
:cond_9
|
|
:goto_2
|
|
return v0
|
|
.end method
|
|
|
|
.method public final getScreenWidth(Landroid/content/Context;)I
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
return v0
|
|
|
|
.line 1
|
|
:cond_0
|
|
invoke-static {p1}, Landroidx/core/hardware/display/DisplayManagerCompat;->getInstance(Landroid/content/Context;)Landroidx/core/hardware/display/DisplayManagerCompat;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1, v0}, Landroidx/core/hardware/display/DisplayManagerCompat;->getDisplay(I)Landroid/view/Display;
|
|
|
|
move-result-object v1
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
return v0
|
|
|
|
.line 2
|
|
:cond_1
|
|
invoke-virtual {p1, v1}, Landroid/content/Context;->createDisplayContext(Landroid/view/Display;)Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
.line 3
|
|
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
|
|
|
|
move-result-object p1
|
|
|
|
iget p1, p1, Landroid/util/DisplayMetrics;->widthPixels:I
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public final getStatusBarHeight(Landroid/content/Context;)I
|
|
.locals 7
|
|
|
|
const-string v0, "context"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/16 v2, 0x22
|
|
|
|
if-gt v0, v2, :cond_0
|
|
|
|
return v1
|
|
|
|
.line 2
|
|
:cond_0
|
|
invoke-virtual {p1}, Landroid/content/Context;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;
|
|
|
|
move-result-object v0
|
|
|
|
iget v0, v0, Landroid/content/pm/ApplicationInfo;->targetSdkVersion:I
|
|
|
|
if-gt v0, v2, :cond_1
|
|
|
|
return v1
|
|
|
|
:cond_1
|
|
const-string v0, "window"
|
|
|
|
.line 4
|
|
invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "null cannot be cast to non-null type android.view.WindowManager"
|
|
|
|
invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast v0, Landroid/view/WindowManager;
|
|
|
|
.line 5
|
|
invoke-static {v0}, Lcom/firemint/realracing/Platform$$ExternalSyntheticApiModelOutline0;->m(Landroid/view/WindowManager;)Landroid/view/WindowMetrics;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "getCurrentWindowMetrics(...)"
|
|
|
|
invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 6
|
|
invoke-static {v0}, Lcom/tapjoy/TJDeviceInfo$$ExternalSyntheticApiModelOutline0;->m(Landroid/view/WindowMetrics;)Landroid/view/WindowInsets;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {}, Landroidx/core/view/WindowInsetsCompat$TypeImpl30$$ExternalSyntheticApiModelOutline6;->m()I
|
|
|
|
move-result v1
|
|
|
|
invoke-static {v0, v1}, Landroidx/core/view/WindowInsetsCompat$Impl30$$ExternalSyntheticApiModelOutline2;->m(Landroid/view/WindowInsets;I)Landroid/graphics/Insets;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "getInsetsIgnoringVisibility(...)"
|
|
|
|
invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 7
|
|
invoke-static {v0}, Landroidx/appcompat/widget/DrawableUtils$$ExternalSyntheticApiModelOutline0;->m(Landroid/graphics/Insets;)I
|
|
|
|
move-result v1
|
|
|
|
int-to-double v1, v1
|
|
|
|
invoke-static {v0}, Landroidx/appcompat/widget/DrawableUtils$$ExternalSyntheticApiModelOutline1;->m(Landroid/graphics/Insets;)I
|
|
|
|
move-result v3
|
|
|
|
int-to-double v3, v3
|
|
|
|
invoke-static {v1, v2, v3, v4}, Ljava/lang/Math;->max(DD)D
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-static {v0}, Landroidx/appcompat/widget/DrawableUtils$$ExternalSyntheticApiModelOutline2;->m(Landroid/graphics/Insets;)I
|
|
|
|
move-result v3
|
|
|
|
int-to-double v3, v3
|
|
|
|
invoke-static {v0}, Landroidx/appcompat/widget/DrawableUtils$$ExternalSyntheticApiModelOutline3;->m(Landroid/graphics/Insets;)I
|
|
|
|
move-result v0
|
|
|
|
int-to-double v5, v0
|
|
|
|
invoke-static {v3, v4, v5, v6}, Ljava/lang/Math;->max(DD)D
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-static {v1, v2, v3, v4}, Ljava/lang/Math;->max(DD)D
|
|
|
|
move-result-wide v0
|
|
|
|
double-to-int v0, v0
|
|
|
|
.line 8
|
|
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
|
|
|
|
move-result-object p1
|
|
|
|
int-to-float v0, v0
|
|
|
|
.line 9
|
|
iget p1, p1, Landroid/util/DisplayMetrics;->densityDpi:I
|
|
|
|
int-to-float p1, p1
|
|
|
|
const/high16 v1, 0x43200000 # 160.0f
|
|
|
|
div-float/2addr p1, v1
|
|
|
|
div-float/2addr v0, p1
|
|
|
|
float-to-int p1, v0
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public final getTotalDiskSpace()J
|
|
.locals 4
|
|
|
|
.line 1
|
|
invoke-static {}, Landroid/os/Environment;->getDataDirectory()Ljava/io/File;
|
|
|
|
move-result-object v0
|
|
|
|
.line 2
|
|
new-instance v1, Landroid/os/StatFs;
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->getPath()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {v1, v0}, Landroid/os/StatFs;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 3
|
|
invoke-virtual {v1}, Landroid/os/StatFs;->getTotalBytes()J
|
|
|
|
move-result-wide v0
|
|
|
|
const v2, 0xf4240
|
|
|
|
int-to-long v2, v2
|
|
|
|
.line 4
|
|
div-long/2addr v0, v2
|
|
|
|
return-wide v0
|
|
.end method
|