- 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
596 lines
12 KiB
Smali
596 lines
12 KiB
Smali
.class public final Lcom/mbridge/msdk/playercommon/exoplayer2/scheduler/Requirements;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/mbridge/msdk/playercommon/exoplayer2/scheduler/Requirements$NetworkType;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final DEVICE_CHARGING:I = 0x10
|
|
|
|
.field private static final DEVICE_IDLE:I = 0x8
|
|
|
|
.field public static final NETWORK_TYPE_ANY:I = 0x1
|
|
|
|
.field private static final NETWORK_TYPE_MASK:I = 0x7
|
|
|
|
.field public static final NETWORK_TYPE_METERED:I = 0x4
|
|
|
|
.field public static final NETWORK_TYPE_NONE:I = 0x0
|
|
|
|
.field public static final NETWORK_TYPE_NOT_ROAMING:I = 0x3
|
|
|
|
.field private static final NETWORK_TYPE_STRINGS:[Ljava/lang/String; = null
|
|
|
|
.field public static final NETWORK_TYPE_UNMETERED:I = 0x2
|
|
|
|
.field private static final TAG:Ljava/lang/String; = "Requirements"
|
|
|
|
|
|
# instance fields
|
|
.field private final requirements:I
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(I)V
|
|
.locals 0
|
|
|
|
.line 76
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput p1, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/scheduler/Requirements;->requirements:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(IZZ)V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
const/16 p2, 0x10
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move p2, v0
|
|
|
|
:goto_0
|
|
or-int/2addr p1, p2
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
const/16 v0, 0x8
|
|
|
|
:cond_1
|
|
or-int/2addr p1, v0
|
|
|
|
.line 72
|
|
invoke-direct {p0, p1}, Lcom/mbridge/msdk/playercommon/exoplayer2/scheduler/Requirements;-><init>(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private checkChargingRequirement(Landroid/content/Context;)Z
|
|
.locals 4
|
|
|
|
.line 142
|
|
invoke-virtual {p0}, Lcom/mbridge/msdk/playercommon/exoplayer2/scheduler/Requirements;->isChargingRequired()Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return v1
|
|
|
|
.line 145
|
|
:cond_0
|
|
new-instance v0, Landroid/content/IntentFilter;
|
|
|
|
const-string v2, "android.intent.action.BATTERY_CHANGED"
|
|
|
|
invoke-direct {v0, v2}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V
|
|
|
|
const/4 v2, 0x0
|
|
|
|
.line 146
|
|
invoke-virtual {p1, v2, v0}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
return v0
|
|
|
|
:cond_1
|
|
const-string v2, "status"
|
|
|
|
const/4 v3, -0x1
|
|
|
|
.line 150
|
|
invoke-virtual {p1, v2, v3}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
|
|
|
|
move-result p1
|
|
|
|
const/4 v2, 0x2
|
|
|
|
if-eq p1, v2, :cond_3
|
|
|
|
const/4 v2, 0x5
|
|
|
|
if-ne p1, v2, :cond_2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
move v1, v0
|
|
|
|
:cond_3
|
|
:goto_0
|
|
return v1
|
|
.end method
|
|
|
|
.method private checkIdleRequirement(Landroid/content/Context;)Z
|
|
.locals 4
|
|
|
|
.line 156
|
|
invoke-virtual {p0}, Lcom/mbridge/msdk/playercommon/exoplayer2/scheduler/Requirements;->isIdleRequired()Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return v1
|
|
|
|
:cond_0
|
|
const-string v0, "power"
|
|
|
|
.line 159
|
|
invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/os/PowerManager;
|
|
|
|
.line 160
|
|
sget v0, Lcom/mbridge/msdk/playercommon/exoplayer2/util/Util;->SDK_INT:I
|
|
|
|
const/16 v2, 0x17
|
|
|
|
const/4 v3, 0x0
|
|
|
|
if-lt v0, v2, :cond_2
|
|
|
|
.line 161
|
|
invoke-virtual {p1}, Landroid/os/PowerManager;->isDeviceIdleMode()Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
move v1, v3
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const/16 v2, 0x14
|
|
|
|
if-lt v0, v2, :cond_3
|
|
|
|
.line 162
|
|
invoke-virtual {p1}, Landroid/os/PowerManager;->isInteractive()Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
invoke-virtual {p1}, Landroid/os/PowerManager;->isScreenOn()Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
:goto_0
|
|
return v1
|
|
.end method
|
|
|
|
.method private static checkInternetConnectivity(Landroid/net/ConnectivityManager;)Z
|
|
.locals 3
|
|
|
|
.line 166
|
|
sget v0, Lcom/mbridge/msdk/playercommon/exoplayer2/util/Util;->SDK_INT:I
|
|
|
|
const/16 v1, 0x17
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-ge v0, v1, :cond_0
|
|
|
|
return v2
|
|
|
|
.line 171
|
|
:cond_0
|
|
invoke-virtual {p0}, Landroid/net/ConnectivityManager;->getActiveNetwork()Landroid/net/Network;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
const-string p0, "No active network."
|
|
|
|
.line 173
|
|
invoke-static {p0}, Lcom/mbridge/msdk/playercommon/exoplayer2/scheduler/Requirements;->logd(Ljava/lang/String;)V
|
|
|
|
return v1
|
|
|
|
.line 177
|
|
:cond_1
|
|
invoke-virtual {p0, v0}, Landroid/net/ConnectivityManager;->getNetworkCapabilities(Landroid/net/Network;)Landroid/net/NetworkCapabilities;
|
|
|
|
move-result-object p0
|
|
|
|
if-eqz p0, :cond_2
|
|
|
|
const/16 v0, 0x10
|
|
|
|
.line 180
|
|
invoke-virtual {p0, v0}, Landroid/net/NetworkCapabilities;->hasCapability(I)Z
|
|
|
|
move-result p0
|
|
|
|
if-nez p0, :cond_3
|
|
|
|
:cond_2
|
|
move v1, v2
|
|
|
|
.line 181
|
|
:cond_3
|
|
new-instance p0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v0, "Network capability validated: "
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p0, v1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {p0}, Lcom/mbridge/msdk/playercommon/exoplayer2/scheduler/Requirements;->logd(Ljava/lang/String;)V
|
|
|
|
xor-int/lit8 p0, v1, 0x1
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method private checkNetworkRequirements(Landroid/content/Context;)Z
|
|
.locals 5
|
|
|
|
.line 108
|
|
invoke-virtual {p0}, Lcom/mbridge/msdk/playercommon/exoplayer2/scheduler/Requirements;->getRequiredNetworkType()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return v1
|
|
|
|
:cond_0
|
|
const-string v2, "connectivity"
|
|
|
|
.line 113
|
|
invoke-virtual {p1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/net/ConnectivityManager;
|
|
|
|
.line 114
|
|
invoke-virtual {p1}, Landroid/net/ConnectivityManager;->getActiveNetworkInfo()Landroid/net/NetworkInfo;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
if-eqz v2, :cond_7
|
|
|
|
.line 115
|
|
invoke-virtual {v2}, Landroid/net/NetworkInfo;->isConnected()Z
|
|
|
|
move-result v4
|
|
|
|
if-nez v4, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
.line 119
|
|
:cond_1
|
|
invoke-static {p1}, Lcom/mbridge/msdk/playercommon/exoplayer2/scheduler/Requirements;->checkInternetConnectivity(Landroid/net/ConnectivityManager;)Z
|
|
|
|
move-result v4
|
|
|
|
if-nez v4, :cond_2
|
|
|
|
return v3
|
|
|
|
:cond_2
|
|
if-ne v0, v1, :cond_3
|
|
|
|
return v1
|
|
|
|
:cond_3
|
|
const/4 v3, 0x3
|
|
|
|
if-ne v0, v3, :cond_4
|
|
|
|
.line 126
|
|
invoke-virtual {v2}, Landroid/net/NetworkInfo;->isRoaming()Z
|
|
|
|
move-result p1
|
|
|
|
.line 127
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "Roaming: "
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lcom/mbridge/msdk/playercommon/exoplayer2/scheduler/Requirements;->logd(Ljava/lang/String;)V
|
|
|
|
xor-int/2addr p1, v1
|
|
|
|
return p1
|
|
|
|
.line 130
|
|
:cond_4
|
|
invoke-static {p1, v2}, Lcom/mbridge/msdk/playercommon/exoplayer2/scheduler/Requirements;->isActiveNetworkMetered(Landroid/net/ConnectivityManager;Landroid/net/NetworkInfo;)Z
|
|
|
|
move-result p1
|
|
|
|
.line 131
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v3, "Metered network: "
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v2}, Lcom/mbridge/msdk/playercommon/exoplayer2/scheduler/Requirements;->logd(Ljava/lang/String;)V
|
|
|
|
const/4 v2, 0x2
|
|
|
|
if-ne v0, v2, :cond_5
|
|
|
|
xor-int/2addr p1, v1
|
|
|
|
return p1
|
|
|
|
:cond_5
|
|
const/4 v1, 0x4
|
|
|
|
if-ne v0, v1, :cond_6
|
|
|
|
return p1
|
|
|
|
.line 138
|
|
:cond_6
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
invoke-direct {p1}, Ljava/lang/IllegalStateException;-><init>()V
|
|
|
|
throw p1
|
|
|
|
:cond_7
|
|
:goto_0
|
|
const-string p1, "No network info or no connection."
|
|
|
|
.line 116
|
|
invoke-static {p1}, Lcom/mbridge/msdk/playercommon/exoplayer2/scheduler/Requirements;->logd(Ljava/lang/String;)V
|
|
|
|
return v3
|
|
.end method
|
|
|
|
.method private static isActiveNetworkMetered(Landroid/net/ConnectivityManager;Landroid/net/NetworkInfo;)Z
|
|
.locals 2
|
|
|
|
.line 187
|
|
sget v0, Lcom/mbridge/msdk/playercommon/exoplayer2/util/Util;->SDK_INT:I
|
|
|
|
const/16 v1, 0x10
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
.line 188
|
|
invoke-virtual {p0}, Landroid/net/ConnectivityManager;->isActiveNetworkMetered()Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
|
|
.line 190
|
|
:cond_0
|
|
invoke-virtual {p1}, Landroid/net/NetworkInfo;->getType()I
|
|
|
|
move-result p0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
if-eq p0, p1, :cond_1
|
|
|
|
const/4 v0, 0x7
|
|
|
|
if-eq p0, v0, :cond_1
|
|
|
|
const/16 v0, 0x9
|
|
|
|
if-eq p0, v0, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 p1, 0x0
|
|
|
|
:goto_0
|
|
return p1
|
|
.end method
|
|
|
|
.method private static logd(Ljava/lang/String;)V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final checkRequirements(Landroid/content/Context;)Z
|
|
.locals 1
|
|
|
|
.line 97
|
|
invoke-direct {p0, p1}, Lcom/mbridge/msdk/playercommon/exoplayer2/scheduler/Requirements;->checkNetworkRequirements(Landroid/content/Context;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 98
|
|
invoke-direct {p0, p1}, Lcom/mbridge/msdk/playercommon/exoplayer2/scheduler/Requirements;->checkChargingRequirement(Landroid/content/Context;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 99
|
|
invoke-direct {p0, p1}, Lcom/mbridge/msdk/playercommon/exoplayer2/scheduler/Requirements;->checkIdleRequirement(Landroid/content/Context;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
:goto_0
|
|
return p1
|
|
.end method
|
|
|
|
.method public final getRequiredNetworkType()I
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/scheduler/Requirements;->requirements:I
|
|
|
|
and-int/lit8 v0, v0, 0x7
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final getRequirementsData()I
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/scheduler/Requirements;->requirements:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final isChargingRequired()Z
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/scheduler/Requirements;->requirements:I
|
|
|
|
and-int/lit8 v0, v0, 0x10
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public final isIdleRequired()Z
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/mbridge/msdk/playercommon/exoplayer2/scheduler/Requirements;->requirements:I
|
|
|
|
and-int/lit8 v0, v0, 0x8
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public final toString()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 205
|
|
invoke-super {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|