Add Discord APKTool decompilation (Smali source for modding)

- 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
This commit is contained in:
2026-02-18 16:13:44 -08:00
parent c080f0d97f
commit f3960ee359
44288 changed files with 10998761 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
.class interface abstract Lcom/mbridge/msdk/foundation/download/resource/IResourceStrategy;
.super Ljava/lang/Object;
.source "SourceFile"
# virtual methods
.method public abstract getResourceStrategyName()Ljava/lang/String;
.end method
.method public abstract processResource(Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;Lcom/mbridge/msdk/foundation/download/database/IDatabaseHelper;Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;)V
.end method

View File

@@ -0,0 +1,120 @@
.class Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager$1;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Ljava/lang/Runnable;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;->executeResourceStrategy(Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;)V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;
.field final synthetic val$config:Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;
.field final synthetic val$queue:Ljava/util/Queue;
# direct methods
.method public constructor <init>(Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;Ljava/util/Queue;Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;)V
.locals 0
iput-object p1, p0, Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager$1;->this$0:Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;
iput-object p2, p0, Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager$1;->val$queue:Ljava/util/Queue;
iput-object p3, p0, Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager$1;->val$config:Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;
.line 64
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public run()V
.locals 4
:goto_0
iget-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager$1;->val$queue:Ljava/util/Queue;
.line 68
invoke-interface {v0}, Ljava/util/Queue;->poll()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/mbridge/msdk/foundation/download/resource/ResourceStrategy;
if-eqz v0, :cond_0
.line 69
new-instance v1, Lcom/mbridge/msdk/foundation/download/resource/ResourceStrategyExecutor;
invoke-direct {v1, v0}, Lcom/mbridge/msdk/foundation/download/resource/ResourceStrategyExecutor;-><init>(Lcom/mbridge/msdk/foundation/download/resource/ResourceStrategy;)V
.line 70
invoke-static {}, Lcom/mbridge/msdk/foundation/download/core/GlobalComponent;->getInstance()Lcom/mbridge/msdk/foundation/download/core/GlobalComponent;
move-result-object v0
invoke-virtual {v0}, Lcom/mbridge/msdk/foundation/download/core/GlobalComponent;->getLogger()Lcom/mbridge/msdk/foundation/download/utils/ILogger;
move-result-object v0
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "\u6267\u884c\u7b56\u7565\uff1a "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Lcom/mbridge/msdk/foundation/download/resource/ResourceStrategyExecutor;->getResourceStrategyName()Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
const-string v3, "ResourceStrategy"
invoke-interface {v0, v3, v2}, Lcom/mbridge/msdk/foundation/download/utils/ILogger;->log(Ljava/lang/String;Ljava/lang/String;)V
.line 71
invoke-static {}, Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;->access$000()Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;
invoke-static {}, Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;->getInstance()Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;
move-result-object v0
invoke-static {}, Lcom/mbridge/msdk/foundation/download/core/GlobalComponent;->getInstance()Lcom/mbridge/msdk/foundation/download/core/GlobalComponent;
move-result-object v2
invoke-virtual {v2}, Lcom/mbridge/msdk/foundation/download/core/GlobalComponent;->getDatabaseHelper()Lcom/mbridge/msdk/foundation/download/database/IDatabaseHelper;
move-result-object v2
iget-object v3, p0, Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager$1;->val$config:Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;
invoke-virtual {v1, v0, v2, v3}, Lcom/mbridge/msdk/foundation/download/resource/ResourceStrategyExecutor;->processResource(Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;Lcom/mbridge/msdk/foundation/download/database/IDatabaseHelper;Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;)V
goto :goto_0
:cond_0
return-void
.end method

View File

@@ -0,0 +1,479 @@
.class public Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;
.super Ljava/lang/Object;
.source "SourceFile"
# static fields
.field private static volatile MBResourceManager:Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;
# direct methods
.method private constructor <init>()V
.locals 0
.line 27
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static synthetic access$000()Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;
.locals 1
sget-object v0, Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;->MBResourceManager:Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;
return-object v0
.end method
.method public static getInstance()Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;
.locals 2
sget-object v0, Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;->MBResourceManager:Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;
if-nez v0, :cond_1
const-class v0, Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;
.line 81
monitor-enter v0
:try_start_0
sget-object v1, Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;->MBResourceManager:Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;
if-nez v1, :cond_0
.line 83
new-instance v1, Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;
invoke-direct {v1}, Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;-><init>()V
sput-object v1, Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;->MBResourceManager:Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;
goto :goto_0
:catchall_0
move-exception v1
goto :goto_1
.line 85
:cond_0
:goto_0
monitor-exit v0
goto :goto_2
:goto_1
monitor-exit v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v1
:cond_1
:goto_2
sget-object v0, Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;->MBResourceManager:Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;
return-object v0
.end method
# virtual methods
.method public deleteFile(Ljava/io/File;)V
.locals 5
if-eqz p1, :cond_3
.line 32
invoke-virtual {p1}, Ljava/io/File;->exists()Z
move-result v0
if-nez v0, :cond_0
goto :goto_1
.line 35
:cond_0
invoke-virtual {p1}, Ljava/io/File;->isFile()Z
move-result v0
if-eqz v0, :cond_1
.line 37
invoke-virtual {p1}, Ljava/io/File;->delete()Z
goto :goto_1
.line 39
:cond_1
invoke-virtual {p1}, Ljava/io/File;->listFiles()[Ljava/io/File;
move-result-object v0
if-eqz v0, :cond_2
.line 41
array-length v1, v0
const/4 v2, 0x0
:goto_0
if-ge v2, v1, :cond_2
aget-object v3, v0, v2
.line 43
new-instance v4, Ljava/io/File;
invoke-virtual {v3}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v3
invoke-direct {v4, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V
invoke-virtual {p0, v4}, Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;->deleteFile(Ljava/io/File;)V
add-int/lit8 v2, v2, 0x1
goto :goto_0
.line 47
:cond_2
invoke-virtual {p1}, Ljava/io/File;->delete()Z
:cond_3
:goto_1
return-void
.end method
.method public deleteFile(Ljava/lang/String;)V
.locals 1
.line 53
new-instance v0, Ljava/io/File;
invoke-direct {v0, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V
invoke-virtual {p0, v0}, Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;->deleteFile(Ljava/io/File;)V
return-void
.end method
.method public executeResourceStrategy(Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;)V
.locals 4
if-eqz p1, :cond_1
.line 58
invoke-virtual {p1}, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;->getResourceStrategyQueue()Ljava/util/Queue;
move-result-object v0
if-eqz v0, :cond_1
invoke-virtual {p1}, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;->getResourceStrategyQueue()Ljava/util/Queue;
move-result-object v0
invoke-interface {v0}, Ljava/util/Collection;->isEmpty()Z
move-result v0
if-nez v0, :cond_1
.line 59
invoke-virtual {p1}, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;->getResourceStrategyQueue()Ljava/util/Queue;
move-result-object v0
if-eqz v0, :cond_1
.line 60
invoke-interface {v0}, Ljava/util/Collection;->isEmpty()Z
move-result v1
if-eqz v1, :cond_0
goto :goto_0
.line 63
:cond_0
invoke-static {}, Lcom/mbridge/msdk/foundation/download/core/GlobalComponent;->getInstance()Lcom/mbridge/msdk/foundation/download/core/GlobalComponent;
move-result-object v1
invoke-virtual {v1}, Lcom/mbridge/msdk/foundation/download/core/GlobalComponent;->getLogger()Lcom/mbridge/msdk/foundation/download/utils/ILogger;
move-result-object v1
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "\u914d\u7f6e\u7684\u8d44\u6e90\u7ba1\u7406\u7b56\u7565\u6570\u91cf\uff1a "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-interface {v0}, Ljava/util/Collection;->size()I
move-result v3
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
const-string v3, "ResourceStrategy"
invoke-interface {v1, v3, v2}, Lcom/mbridge/msdk/foundation/download/utils/ILogger;->log(Ljava/lang/String;Ljava/lang/String;)V
.line 64
new-instance v1, Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager$1;
invoke-direct {v1, p0, v0, p1}, Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager$1;-><init>(Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;Ljava/util/Queue;Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;)V
.line 75
invoke-static {}, Lcom/mbridge/msdk/foundation/download/core/ExecutorManager;->getInstance()Lcom/mbridge/msdk/foundation/download/core/ExecutorManager;
move-result-object p1
invoke-virtual {p1}, Lcom/mbridge/msdk/foundation/download/core/ExecutorManager;->getExecutorSupplier()Lcom/mbridge/msdk/foundation/download/core/ExecutorSupplier;
move-result-object p1
invoke-interface {p1}, Lcom/mbridge/msdk/foundation/download/core/ExecutorSupplier;->getLruCacheThreadTasks()Ljava/util/concurrent/ExecutorService;
move-result-object p1
invoke-interface {p1, v1}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
nop
:cond_1
:goto_0
return-void
.end method
.method public getDownloadFileOutputStream(Ljava/io/File;)Lcom/mbridge/msdk/foundation/download/resource/stream/DownloadFileOutputStream;
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
if-eqz p1, :cond_1
.line 95
invoke-virtual {p1}, Ljava/io/File;->getParentFile()Ljava/io/File;
move-result-object v0
invoke-virtual {v0}, Ljava/io/File;->exists()Z
move-result v0
if-nez v0, :cond_0
.line 96
invoke-virtual {p1}, Ljava/io/File;->getParentFile()Ljava/io/File;
move-result-object v0
invoke-virtual {v0}, Ljava/io/File;->mkdirs()Z
.line 99
:cond_0
invoke-virtual {p1}, Ljava/io/File;->createNewFile()Z
.line 100
new-instance v0, Lcom/mbridge/msdk/foundation/download/resource/stream/FileDownloadRandomAccessDownloadFile;
invoke-direct {v0, p1}, Lcom/mbridge/msdk/foundation/download/resource/stream/FileDownloadRandomAccessDownloadFile;-><init>(Ljava/io/File;)V
return-object v0
.line 92
:cond_1
new-instance p1, Ljava/io/IOException;
const-string v0, "file is null"
invoke-direct {p1, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public getDownloadId(Ljava/lang/String;)Ljava/lang/String;
.locals 3
.line 106
:try_start_0
new-instance v0, Ljava/net/URL;
invoke-direct {v0, p1}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
.line 107
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v0}, Ljava/net/URL;->getProtocol()Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v2, "://"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/net/URL;->getHost()Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/net/URL;->getPath()Ljava/lang/String;
move-result-object v0
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
const-string v1, "MD5"
.line 108
invoke-static {v1}, Ljava/security/MessageDigest;->getInstance(Ljava/lang/String;)Ljava/security/MessageDigest;
move-result-object v1
const-string v2, "UTF-8"
.line 109
invoke-virtual {v0, v2}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B
move-result-object v0
invoke-virtual {v1, v0}, Ljava/security/MessageDigest;->update([B)V
.line 110
new-instance v0, Ljava/math/BigInteger;
invoke-virtual {v1}, Ljava/security/MessageDigest;->digest()[B
move-result-object v1
const/4 v2, 0x1
invoke-direct {v0, v2, v1}, Ljava/math/BigInteger;-><init>(I[B)V
const/16 v1, 0x10
invoke-virtual {v0, v1}, Ljava/math/BigInteger;->toString(I)Ljava/lang/String;
move-result-object p1
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
:catch_0
return-object p1
.end method
.method public getFileSize(Ljava/io/File;Ljava/lang/String;Ljava/lang/String;)J
.locals 2
.line 117
invoke-static {p1, p2, p3}, Lcom/mbridge/msdk/foundation/download/utils/Objects;->exists(Ljava/io/File;Ljava/lang/String;Ljava/lang/String;)Z
move-result p2
const-wide/16 v0, 0x0
if-eqz p2, :cond_0
.line 119
:try_start_0
invoke-virtual {p1}, Ljava/io/File;->length()J
move-result-wide p1
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
return-wide p1
:catch_0
:cond_0
return-wide v0
.end method
.method public unZip(Ljava/lang/String;Ljava/lang/String;)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 128
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_1
invoke-static {p2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_1
.line 132
:try_start_0
new-instance v0, Lcom/mbridge/msdk/foundation/download/utils/UnzipUtility;
invoke-direct {v0}, Lcom/mbridge/msdk/foundation/download/utils/UnzipUtility;-><init>()V
.line 133
invoke-virtual {v0, p1, p2}, Lcom/mbridge/msdk/foundation/download/utils/UnzipUtility;->unzip(Ljava/lang/String;Ljava/lang/String;)I
move-result v0
if-eqz v0, :cond_0
.line 135
invoke-static {p1, p2}, Lcom/mbridge/msdk/foundation/tools/ad;->b(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
.line 139
:catch_0
:try_start_1
invoke-static {p1, p2}, Lcom/mbridge/msdk/foundation/tools/ad;->b(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
:try_end_1
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1
:catch_1
:cond_0
:goto_0
return-void
.line 129
:cond_1
new-instance p1, Ljava/io/IOException;
const-string p2, "zipFilePath or destDirectory is null"
invoke-direct {p1, p2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw p1
.end method

View File

@@ -0,0 +1,14 @@
.class synthetic Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$1;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1009
name = null
.end annotation

View File

@@ -0,0 +1,223 @@
.class public Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "Builder"
.end annotation
# instance fields
.field private maxStorageSpace:J
.field private maxStorageSpacePerResourceType:Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/Long;",
">;"
}
.end annotation
.end field
.field private maxStorageTime:J
.field private maxStorageTimePerResourceType:Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/Long;",
">;"
}
.end annotation
.end field
.field private resourceStrategyQueue:Ljava/util/Queue;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Queue<",
"Lcom/mbridge/msdk/foundation/download/resource/ResourceStrategy;",
">;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static synthetic access$000(Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;)J
.locals 2
.line 69
iget-wide v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;->maxStorageSpace:J
return-wide v0
.end method
.method public static synthetic access$100(Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;)J
.locals 2
.line 69
iget-wide v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;->maxStorageTime:J
return-wide v0
.end method
.method public static synthetic access$200(Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;)Ljava/util/Map;
.locals 0
.line 69
iget-object p0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;->maxStorageSpacePerResourceType:Ljava/util/Map;
return-object p0
.end method
.method public static synthetic access$300(Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;)Ljava/util/Map;
.locals 0
.line 69
iget-object p0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;->maxStorageTimePerResourceType:Ljava/util/Map;
return-object p0
.end method
.method public static synthetic access$400(Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;)Ljava/util/Queue;
.locals 0
.line 69
iget-object p0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;->resourceStrategyQueue:Ljava/util/Queue;
return-object p0
.end method
# virtual methods
.method public addMaxStorageSpace(Lcom/mbridge/msdk/foundation/download/DownloadResourceType;J)Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;
.locals 1
iget-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;->maxStorageSpacePerResourceType:Ljava/util/Map;
if-nez v0, :cond_0
.line 78
new-instance v0, Ljava/util/HashMap;
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
iput-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;->maxStorageSpacePerResourceType:Ljava/util/Map;
:cond_0
iget-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;->maxStorageSpacePerResourceType:Ljava/util/Map;
.line 80
invoke-virtual {p1}, Ljava/lang/Enum;->name()Ljava/lang/String;
move-result-object p1
invoke-static {p2, p3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object p2
invoke-interface {v0, p1, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
return-object p0
.end method
.method public addMaxStorageTime(Lcom/mbridge/msdk/foundation/download/DownloadResourceType;J)Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;
.locals 1
iget-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;->maxStorageTimePerResourceType:Ljava/util/Map;
if-nez v0, :cond_0
.line 86
new-instance v0, Ljava/util/HashMap;
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
iput-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;->maxStorageTimePerResourceType:Ljava/util/Map;
:cond_0
iget-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;->maxStorageTimePerResourceType:Ljava/util/Map;
.line 88
invoke-virtual {p1}, Ljava/lang/Enum;->name()Ljava/lang/String;
move-result-object p1
invoke-static {p2, p3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object p2
invoke-interface {v0, p1, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
return-object p0
.end method
.method public addResourceStrategy(Lcom/mbridge/msdk/foundation/download/resource/ResourceStrategy;)Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;
.locals 1
iget-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;->resourceStrategyQueue:Ljava/util/Queue;
if-nez v0, :cond_0
.line 94
new-instance v0, Ljava/util/ArrayDeque;
invoke-direct {v0}, Ljava/util/ArrayDeque;-><init>()V
iput-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;->resourceStrategyQueue:Ljava/util/Queue;
:cond_0
iget-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;->resourceStrategyQueue:Ljava/util/Queue;
.line 96
invoke-interface {v0, p1}, Ljava/util/Queue;->add(Ljava/lang/Object;)Z
return-object p0
.end method
.method public build()Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;
.locals 2
.line 101
new-instance v0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;
const/4 v1, 0x0
invoke-direct {v0, p0, v1}, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;-><init>(Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$1;)V
return-object v0
.end method
.method public setMaxStorageSpace(J)Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;
.locals 0
iput-wide p1, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;->maxStorageSpace:J
return-object p0
.end method
.method public setMaxStorageTime(J)Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;
.locals 0
iput-wide p1, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;->maxStorageTime:J
return-object p0
.end method

View File

@@ -0,0 +1,260 @@
.class public Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;
}
.end annotation
# instance fields
.field private maxStorageSpace:J
.field private maxStorageSpacePerResourceType:Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/Long;",
">;"
}
.end annotation
.end field
.field private maxStorageTime:J
.field private maxStorageTimePerResourceType:Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/Long;",
">;"
}
.end annotation
.end field
.field private resourceStrategyQueue:Ljava/util/Queue;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Queue<",
"Lcom/mbridge/msdk/foundation/download/resource/ResourceStrategy;",
">;"
}
.end annotation
.end field
# direct methods
.method private constructor <init>(Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;)V
.locals 2
.line 27
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 28
invoke-static {p1}, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;->access$000(Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;)J
move-result-wide v0
iput-wide v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;->maxStorageSpace:J
.line 29
invoke-static {p1}, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;->access$100(Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;)J
move-result-wide v0
iput-wide v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;->maxStorageTime:J
.line 30
invoke-static {p1}, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;->access$200(Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;)Ljava/util/Map;
move-result-object v0
iput-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;->maxStorageSpacePerResourceType:Ljava/util/Map;
.line 31
invoke-static {p1}, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;->access$300(Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;)Ljava/util/Map;
move-result-object v0
iput-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;->maxStorageTimePerResourceType:Ljava/util/Map;
.line 32
invoke-static {p1}, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;->access$400(Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;)Ljava/util/Queue;
move-result-object p1
iput-object p1, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;->resourceStrategyQueue:Ljava/util/Queue;
return-void
.end method
.method public synthetic constructor <init>(Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$1;)V
.locals 0
.line 11
invoke-direct {p0, p1}, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;-><init>(Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig$Builder;)V
return-void
.end method
# virtual methods
.method public getMaxStorageSpace()J
.locals 2
.line 0
iget-wide v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;->maxStorageSpace:J
return-wide v0
.end method
.method public getMaxStorageSpace(Lcom/mbridge/msdk/foundation/download/DownloadResourceType;)J
.locals 2
iget-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;->maxStorageSpacePerResourceType:Ljava/util/Map;
if-eqz v0, :cond_0
.line 40
invoke-virtual {p1}, Ljava/lang/Enum;->name()Ljava/lang/String;
move-result-object v1
invoke-interface {v0, v1}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;->maxStorageSpacePerResourceType:Ljava/util/Map;
.line 41
invoke-virtual {p1}, Ljava/lang/Enum;->name()Ljava/lang/String;
move-result-object p1
invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/lang/Long;
invoke-virtual {p1}, Ljava/lang/Long;->longValue()J
move-result-wide v0
return-wide v0
:cond_0
const-wide/16 v0, 0x0
return-wide v0
.end method
.method public getMaxStorageSpacePerResourceType()Ljava/util/Map;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/Long;",
">;"
}
.end annotation
iget-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;->maxStorageSpacePerResourceType:Ljava/util/Map;
return-object v0
.end method
.method public getMaxStorageTime()J
.locals 2
.line 0
iget-wide v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;->maxStorageTime:J
return-wide v0
.end method
.method public getMaxStorageTime(Lcom/mbridge/msdk/foundation/download/DownloadResourceType;)J
.locals 2
iget-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;->maxStorageTimePerResourceType:Ljava/util/Map;
if-eqz v0, :cond_0
.line 55
invoke-virtual {p1}, Ljava/lang/Enum;->name()Ljava/lang/String;
move-result-object v1
invoke-interface {v0, v1}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;->maxStorageTimePerResourceType:Ljava/util/Map;
.line 56
invoke-virtual {p1}, Ljava/lang/Enum;->name()Ljava/lang/String;
move-result-object p1
invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/lang/Long;
invoke-virtual {p1}, Ljava/lang/Long;->longValue()J
move-result-wide v0
return-wide v0
:cond_0
const-wide/16 v0, 0x0
return-wide v0
.end method
.method public getMaxStorageTimePerResourceType()Ljava/util/Map;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/Long;",
">;"
}
.end annotation
iget-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;->maxStorageTimePerResourceType:Ljava/util/Map;
return-object v0
.end method
.method public getResourceStrategyQueue()Ljava/util/Queue;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/Queue<",
"Lcom/mbridge/msdk/foundation/download/resource/ResourceStrategy;",
">;"
}
.end annotation
iget-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;->resourceStrategyQueue:Ljava/util/Queue;
return-object v0
.end method

View File

@@ -0,0 +1,20 @@
.class public abstract Lcom/mbridge/msdk/foundation/download/resource/ResourceStrategy;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lcom/mbridge/msdk/foundation/download/resource/IResourceStrategy;
# static fields
.field protected static final TAG:Ljava/lang/String; = "ResourceStrategy"
# direct methods
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method

View File

@@ -0,0 +1,64 @@
.class Lcom/mbridge/msdk/foundation/download/resource/ResourceStrategyExecutor;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lcom/mbridge/msdk/foundation/download/resource/IResourceStrategy;
# instance fields
.field private resourceStrategy:Lcom/mbridge/msdk/foundation/download/resource/ResourceStrategy;
# direct methods
.method public constructor <init>(Lcom/mbridge/msdk/foundation/download/resource/ResourceStrategy;)V
.locals 0
.line 9
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceStrategyExecutor;->resourceStrategy:Lcom/mbridge/msdk/foundation/download/resource/ResourceStrategy;
return-void
.end method
# virtual methods
.method public getResourceStrategyName()Ljava/lang/String;
.locals 1
iget-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceStrategyExecutor;->resourceStrategy:Lcom/mbridge/msdk/foundation/download/resource/ResourceStrategy;
.line 15
invoke-interface {v0}, Lcom/mbridge/msdk/foundation/download/resource/IResourceStrategy;->getResourceStrategyName()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public processResource(Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;Lcom/mbridge/msdk/foundation/download/database/IDatabaseHelper;Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;)V
.locals 1
iget-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/ResourceStrategyExecutor;->resourceStrategy:Lcom/mbridge/msdk/foundation/download/resource/ResourceStrategy;
if-eqz v0, :cond_0
.line 22
:try_start_0
invoke-interface {v0, p1, p2, p3}, Lcom/mbridge/msdk/foundation/download/resource/IResourceStrategy;->processResource(Lcom/mbridge/msdk/foundation/download/resource/MBResourceManager;Lcom/mbridge/msdk/foundation/download/database/IDatabaseHelper;Lcom/mbridge/msdk/foundation/download/resource/ResourceConfig;)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception p1
.line 24
invoke-virtual {p1}, Ljava/lang/Throwable;->printStackTrace()V
:cond_0
:goto_0
return-void
.end method

View File

@@ -0,0 +1,47 @@
.class public interface abstract Lcom/mbridge/msdk/foundation/download/resource/stream/DownloadFileOutputStream;
.super Ljava/lang/Object;
.source "SourceFile"
# virtual methods
.method public abstract close()V
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.end method
.method public abstract flushAndSync()V
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.end method
.method public abstract seek(J)V
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;,
Ljava/lang/IllegalAccessException;
}
.end annotation
.end method
.method public abstract setLength(J)V
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;,
Ljava/lang/IllegalAccessException;
}
.end annotation
.end method
.method public abstract write([BII)V
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.end method

View File

@@ -0,0 +1,169 @@
.class public Lcom/mbridge/msdk/foundation/download/resource/stream/FileDownloadRandomAccessDownloadFile;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lcom/mbridge/msdk/foundation/download/resource/stream/DownloadFileOutputStream;
# instance fields
.field private final bufferedOutputStream:Ljava/io/BufferedOutputStream;
.field private final fileDescriptor:Ljava/io/FileDescriptor;
.field private final randomAccess:Ljava/io/RandomAccessFile;
# direct methods
.method public constructor <init>(Ljava/io/File;)V
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 11
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 12
new-instance v0, Ljava/io/RandomAccessFile;
const-string v1, "rw"
invoke-direct {v0, p1, v1}, Ljava/io/RandomAccessFile;-><init>(Ljava/io/File;Ljava/lang/String;)V
iput-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/stream/FileDownloadRandomAccessDownloadFile;->randomAccess:Ljava/io/RandomAccessFile;
.line 13
invoke-virtual {v0}, Ljava/io/RandomAccessFile;->getFD()Ljava/io/FileDescriptor;
move-result-object p1
iput-object p1, p0, Lcom/mbridge/msdk/foundation/download/resource/stream/FileDownloadRandomAccessDownloadFile;->fileDescriptor:Ljava/io/FileDescriptor;
.line 14
new-instance p1, Ljava/io/BufferedOutputStream;
new-instance v1, Ljava/io/FileOutputStream;
invoke-virtual {v0}, Ljava/io/RandomAccessFile;->getFD()Ljava/io/FileDescriptor;
move-result-object v0
invoke-direct {v1, v0}, Ljava/io/FileOutputStream;-><init>(Ljava/io/FileDescriptor;)V
invoke-direct {p1, v1}, Ljava/io/BufferedOutputStream;-><init>(Ljava/io/OutputStream;)V
iput-object p1, p0, Lcom/mbridge/msdk/foundation/download/resource/stream/FileDownloadRandomAccessDownloadFile;->bufferedOutputStream:Ljava/io/BufferedOutputStream;
return-void
.end method
.method public static create(Ljava/io/File;)Lcom/mbridge/msdk/foundation/download/resource/stream/DownloadFileOutputStream;
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 18
new-instance v0, Lcom/mbridge/msdk/foundation/download/resource/stream/FileDownloadRandomAccessDownloadFile;
invoke-direct {v0, p0}, Lcom/mbridge/msdk/foundation/download/resource/stream/FileDownloadRandomAccessDownloadFile;-><init>(Ljava/io/File;)V
return-object v0
.end method
# virtual methods
.method public close()V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
iget-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/stream/FileDownloadRandomAccessDownloadFile;->bufferedOutputStream:Ljava/io/BufferedOutputStream;
.line 23
invoke-virtual {v0}, Ljava/io/OutputStream;->close()V
iget-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/stream/FileDownloadRandomAccessDownloadFile;->randomAccess:Ljava/io/RandomAccessFile;
.line 24
invoke-virtual {v0}, Ljava/io/RandomAccessFile;->close()V
return-void
.end method
.method public flushAndSync()V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
iget-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/stream/FileDownloadRandomAccessDownloadFile;->bufferedOutputStream:Ljava/io/BufferedOutputStream;
.line 29
invoke-virtual {v0}, Ljava/io/BufferedOutputStream;->flush()V
iget-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/stream/FileDownloadRandomAccessDownloadFile;->fileDescriptor:Ljava/io/FileDescriptor;
.line 30
invoke-virtual {v0}, Ljava/io/FileDescriptor;->sync()V
return-void
.end method
.method public seek(J)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
iget-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/stream/FileDownloadRandomAccessDownloadFile;->randomAccess:Ljava/io/RandomAccessFile;
.line 35
invoke-virtual {v0, p1, p2}, Ljava/io/RandomAccessFile;->seek(J)V
return-void
.end method
.method public setLength(J)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
iget-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/stream/FileDownloadRandomAccessDownloadFile;->randomAccess:Ljava/io/RandomAccessFile;
.line 40
invoke-virtual {v0, p1, p2}, Ljava/io/RandomAccessFile;->setLength(J)V
return-void
.end method
.method public write([BII)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
iget-object v0, p0, Lcom/mbridge/msdk/foundation/download/resource/stream/FileDownloadRandomAccessDownloadFile;->bufferedOutputStream:Ljava/io/BufferedOutputStream;
.line 45
invoke-virtual {v0, p1, p2, p3}, Ljava/io/BufferedOutputStream;->write([BII)V
return-void
.end method