- 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
263 lines
6.5 KiB
Smali
263 lines
6.5 KiB
Smali
.class public Lcom/mbridge/msdk/advanced/common/NetWorkStateReceiver;
|
|
.super Landroid/content/BroadcastReceiver;
|
|
.source "SourceFile"
|
|
|
|
|
|
# static fields
|
|
.field private static final a:Ljava/lang/String; = "NetWorkStateReceiver"
|
|
|
|
|
|
# instance fields
|
|
.field private b:Landroid/webkit/WebView;
|
|
|
|
.field private c:I
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/webkit/WebView;)V
|
|
.locals 0
|
|
|
|
.line 27
|
|
invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/mbridge/msdk/advanced/common/NetWorkStateReceiver;->b:Landroid/webkit/WebView;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private a(Landroid/webkit/WebView;I)V
|
|
.locals 3
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 76
|
|
:try_start_0
|
|
new-instance v0, Lorg/json/JSONObject;
|
|
|
|
invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V
|
|
|
|
const-string v1, "netstat"
|
|
|
|
.line 77
|
|
invoke-virtual {v0, v1, p2}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;
|
|
|
|
.line 78
|
|
invoke-static {}, Lcom/mbridge/msdk/mbsignalcommon/windvane/g;->a()Lcom/mbridge/msdk/mbsignalcommon/windvane/g;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v1, "onNetstatChanged"
|
|
|
|
invoke-virtual {v0}, Lorg/json/JSONObject;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/String;->getBytes()[B
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v2, 0x2
|
|
|
|
invoke-static {v0, v2}, Landroid/util/Base64;->encodeToString([BI)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p2, p1, v1, v0}, Lcom/mbridge/msdk/mbsignalcommon/windvane/g;->a(Landroid/webkit/WebView;Ljava/lang/String;Ljava/lang/String;)V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
sget-object p2, Lcom/mbridge/msdk/advanced/common/NetWorkStateReceiver;->a:Ljava/lang/String;
|
|
|
|
.line 81
|
|
invoke-virtual {p1}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p2, p1}, Lcom/mbridge/msdk/foundation/tools/af;->a(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
:cond_0
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a()V
|
|
.locals 1
|
|
|
|
.line 0
|
|
const/4 v0, 0x0
|
|
|
|
iput-object v0, p0, Lcom/mbridge/msdk/advanced/common/NetWorkStateReceiver;->b:Landroid/webkit/WebView;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
|
|
.locals 3
|
|
|
|
:try_start_0
|
|
const-string p2, "connectivity"
|
|
|
|
.line 34
|
|
invoke-virtual {p1, p2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object p2
|
|
|
|
check-cast p2, Landroid/net/ConnectivityManager;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p2, :cond_0
|
|
|
|
iget-object p1, p0, Lcom/mbridge/msdk/advanced/common/NetWorkStateReceiver;->b:Landroid/webkit/WebView;
|
|
|
|
.line 36
|
|
invoke-direct {p0, p1, v0}, Lcom/mbridge/msdk/advanced/common/NetWorkStateReceiver;->a(Landroid/webkit/WebView;I)V
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
goto :goto_1
|
|
|
|
.line 39
|
|
:cond_0
|
|
sget-boolean v1, Lcom/mbridge/msdk/foundation/same/a;->z:Z
|
|
|
|
if-eqz v1, :cond_6
|
|
|
|
.line 40
|
|
invoke-virtual {p2}, Landroid/net/ConnectivityManager;->getActiveNetworkInfo()Landroid/net/NetworkInfo;
|
|
|
|
move-result-object p2
|
|
|
|
if-nez p2, :cond_1
|
|
|
|
iget-object p1, p0, Lcom/mbridge/msdk/advanced/common/NetWorkStateReceiver;->b:Landroid/webkit/WebView;
|
|
|
|
.line 42
|
|
invoke-direct {p0, p1, v0}, Lcom/mbridge/msdk/advanced/common/NetWorkStateReceiver;->a(Landroid/webkit/WebView;I)V
|
|
|
|
return-void
|
|
|
|
.line 45
|
|
:cond_1
|
|
invoke-virtual {p2}, Landroid/net/NetworkInfo;->getState()Landroid/net/NetworkInfo$State;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v2, Landroid/net/NetworkInfo$State;->CONNECTING:Landroid/net/NetworkInfo$State;
|
|
|
|
if-eq v1, v2, :cond_5
|
|
|
|
invoke-virtual {p2}, Landroid/net/NetworkInfo;->getState()Landroid/net/NetworkInfo$State;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v2, Landroid/net/NetworkInfo$State;->DISCONNECTING:Landroid/net/NetworkInfo$State;
|
|
|
|
if-ne v1, v2, :cond_2
|
|
|
|
goto :goto_0
|
|
|
|
.line 48
|
|
:cond_2
|
|
invoke-virtual {p2}, Landroid/net/NetworkInfo;->getType()I
|
|
|
|
move-result p2
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-ne p2, v1, :cond_3
|
|
|
|
iget-object p1, p0, Lcom/mbridge/msdk/advanced/common/NetWorkStateReceiver;->b:Landroid/webkit/WebView;
|
|
|
|
const/16 p2, 0x9
|
|
|
|
.line 49
|
|
invoke-direct {p0, p1, p2}, Lcom/mbridge/msdk/advanced/common/NetWorkStateReceiver;->a(Landroid/webkit/WebView;I)V
|
|
|
|
return-void
|
|
|
|
:cond_3
|
|
const-string p2, "phone"
|
|
|
|
.line 52
|
|
invoke-virtual {p1, p2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/telephony/TelephonyManager;
|
|
|
|
if-nez p1, :cond_4
|
|
|
|
iget-object p1, p0, Lcom/mbridge/msdk/advanced/common/NetWorkStateReceiver;->b:Landroid/webkit/WebView;
|
|
|
|
.line 54
|
|
invoke-direct {p0, p1, v0}, Lcom/mbridge/msdk/advanced/common/NetWorkStateReceiver;->a(Landroid/webkit/WebView;I)V
|
|
|
|
return-void
|
|
|
|
.line 57
|
|
:cond_4
|
|
invoke-virtual {p1}, Landroid/telephony/TelephonyManager;->getNetworkType()I
|
|
|
|
move-result p1
|
|
|
|
iput p1, p0, Lcom/mbridge/msdk/advanced/common/NetWorkStateReceiver;->c:I
|
|
|
|
.line 58
|
|
invoke-static {p1}, Lcom/mbridge/msdk/foundation/tools/ab;->b(I)I
|
|
|
|
move-result p1
|
|
|
|
iput p1, p0, Lcom/mbridge/msdk/advanced/common/NetWorkStateReceiver;->c:I
|
|
|
|
iget-object p2, p0, Lcom/mbridge/msdk/advanced/common/NetWorkStateReceiver;->b:Landroid/webkit/WebView;
|
|
|
|
.line 59
|
|
invoke-direct {p0, p2, p1}, Lcom/mbridge/msdk/advanced/common/NetWorkStateReceiver;->a(Landroid/webkit/WebView;I)V
|
|
|
|
goto :goto_2
|
|
|
|
:cond_5
|
|
:goto_0
|
|
return-void
|
|
|
|
:cond_6
|
|
iget-object p1, p0, Lcom/mbridge/msdk/advanced/common/NetWorkStateReceiver;->b:Landroid/webkit/WebView;
|
|
|
|
.line 62
|
|
invoke-direct {p0, p1, v0}, Lcom/mbridge/msdk/advanced/common/NetWorkStateReceiver;->a(Landroid/webkit/WebView;I)V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
goto :goto_2
|
|
|
|
:goto_1
|
|
sget-object p2, Lcom/mbridge/msdk/advanced/common/NetWorkStateReceiver;->a:Ljava/lang/String;
|
|
|
|
.line 65
|
|
invoke-virtual {p1}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p2, p1}, Lcom/mbridge/msdk/foundation/tools/af;->a(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
:goto_2
|
|
return-void
|
|
.end method
|