- 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
267 lines
6.4 KiB
Smali
267 lines
6.4 KiB
Smali
.class public final Lcom/vungle/ads/internal/util/ViewUtility;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# static fields
|
|
.field public static final INSTANCE:Lcom/vungle/ads/internal/util/ViewUtility;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
new-instance v0, Lcom/vungle/ads/internal/util/ViewUtility;
|
|
|
|
invoke-direct {v0}, Lcom/vungle/ads/internal/util/ViewUtility;-><init>()V
|
|
|
|
sput-object v0, Lcom/vungle/ads/internal/util/ViewUtility;->INSTANCE:Lcom/vungle/ads/internal/util/ViewUtility;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 8
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final dpToPixels(Landroid/content/Context;I)I
|
|
.locals 1
|
|
|
|
const-string v0, "context"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 10
|
|
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;->density:F
|
|
|
|
int-to-float p2, p2
|
|
|
|
mul-float/2addr p2, p1
|
|
|
|
const/high16 p1, 0x3f000000 # 0.5f
|
|
|
|
add-float/2addr p2, p1
|
|
|
|
float-to-int p1, p2
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public final getDeviceWidthAndHeightWithOrientation(Landroid/content/Context;I)Lkotlin/Pair;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/content/Context;",
|
|
"I)",
|
|
"Lkotlin/Pair;"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "context"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 33
|
|
invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object p1
|
|
|
|
.line 34
|
|
invoke-virtual {p1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
|
|
|
|
move-result-object v0
|
|
|
|
.line 35
|
|
invoke-virtual {p1}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
|
|
|
|
move-result-object p1
|
|
|
|
.line 36
|
|
iget p1, p1, Landroid/content/res/Configuration;->orientation:I
|
|
|
|
if-nez p2, :cond_0
|
|
|
|
move p2, p1
|
|
|
|
:cond_0
|
|
if-ne p2, p1, :cond_1
|
|
|
|
.line 44
|
|
new-instance p1, Lkotlin/Pair;
|
|
|
|
.line 45
|
|
iget p2, v0, Landroid/util/DisplayMetrics;->widthPixels:I
|
|
|
|
int-to-float p2, p2
|
|
|
|
iget v1, v0, Landroid/util/DisplayMetrics;->density:F
|
|
|
|
div-float/2addr p2, v1
|
|
|
|
invoke-static {p2}, Ljava/lang/Math;->round(F)I
|
|
|
|
move-result p2
|
|
|
|
invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p2
|
|
|
|
.line 46
|
|
iget v1, v0, Landroid/util/DisplayMetrics;->heightPixels:I
|
|
|
|
int-to-float v1, v1
|
|
|
|
iget v0, v0, Landroid/util/DisplayMetrics;->density:F
|
|
|
|
div-float/2addr v1, v0
|
|
|
|
invoke-static {v1}, Ljava/lang/Math;->round(F)I
|
|
|
|
move-result v0
|
|
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
.line 44
|
|
invoke-direct {p1, p2, v0}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 48
|
|
:cond_1
|
|
new-instance p1, Lkotlin/Pair;
|
|
|
|
.line 49
|
|
iget p2, v0, Landroid/util/DisplayMetrics;->heightPixels:I
|
|
|
|
int-to-float p2, p2
|
|
|
|
iget v1, v0, Landroid/util/DisplayMetrics;->density:F
|
|
|
|
div-float/2addr p2, v1
|
|
|
|
invoke-static {p2}, Ljava/lang/Math;->round(F)I
|
|
|
|
move-result p2
|
|
|
|
invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p2
|
|
|
|
.line 50
|
|
iget v1, v0, Landroid/util/DisplayMetrics;->widthPixels:I
|
|
|
|
int-to-float v1, v1
|
|
|
|
iget v0, v0, Landroid/util/DisplayMetrics;->density:F
|
|
|
|
div-float/2addr v1, v0
|
|
|
|
invoke-static {v1}, Ljava/lang/Math;->round(F)I
|
|
|
|
move-result v0
|
|
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
.line 48
|
|
invoke-direct {p1, p2, v0}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
:goto_0
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final getWebView(Landroid/content/Context;)Landroid/webkit/WebView;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/lang/InstantiationException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "context"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 17
|
|
:try_start_0
|
|
new-instance v0, Landroid/webkit/WebView;
|
|
|
|
invoke-direct {v0, p1}, Landroid/webkit/WebView;-><init>(Landroid/content/Context;)V
|
|
:try_end_0
|
|
.catch Landroid/content/res/Resources$NotFoundException; {:try_start_0 .. :try_end_0} :catch_1
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object v0
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
goto :goto_0
|
|
|
|
:catch_1
|
|
move-exception p1
|
|
|
|
goto :goto_1
|
|
|
|
.line 22
|
|
:goto_0
|
|
new-instance v0, Ljava/lang/InstantiationException;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, p1}, Ljava/lang/InstantiationException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
.line 19
|
|
:goto_1
|
|
new-instance v0, Ljava/lang/InstantiationException;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "Cannot instantiate WebView due to Resources.NotFoundException: "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, ".message"
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, p1}, Ljava/lang/InstantiationException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|