Files
rr3-apk/smali_classes4/com/mbridge/msdk/thrid/okhttp/Dispatcher.smali
Daniel Elliott f3960ee359 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
2026-02-18 16:13:44 -08:00

1055 lines
24 KiB
Smali

.class public final Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;
.super Ljava/lang/Object;
.source "SourceFile"
# static fields
.field static final synthetic $assertionsDisabled:Z
# instance fields
.field private executorService:Ljava/util/concurrent/ExecutorService;
.field private idleCallback:Ljava/lang/Runnable;
.field private maxRequests:I
.field private maxRequestsPerHost:I
.field private final readyAsyncCalls:Ljava/util/Deque;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Deque<",
"Lcom/mbridge/msdk/thrid/okhttp/RealCall$AsyncCall;",
">;"
}
.end annotation
.end field
.field private final runningAsyncCalls:Ljava/util/Deque;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Deque<",
"Lcom/mbridge/msdk/thrid/okhttp/RealCall$AsyncCall;",
">;"
}
.end annotation
.end field
.field private final runningSyncCalls:Ljava/util/Deque;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Deque<",
"Lcom/mbridge/msdk/thrid/okhttp/RealCall;",
">;"
}
.end annotation
.end field
# direct methods
.method static constructor <clinit>()V
.locals 0
return-void
.end method
.method public constructor <init>()V
.locals 1
.line 60
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/16 v0, 0x40
iput v0, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->maxRequests:I
const/4 v0, 0x5
iput v0, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->maxRequestsPerHost:I
.line 48
new-instance v0, Ljava/util/ArrayDeque;
invoke-direct {v0}, Ljava/util/ArrayDeque;-><init>()V
iput-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->readyAsyncCalls:Ljava/util/Deque;
.line 51
new-instance v0, Ljava/util/ArrayDeque;
invoke-direct {v0}, Ljava/util/ArrayDeque;-><init>()V
iput-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->runningAsyncCalls:Ljava/util/Deque;
.line 54
new-instance v0, Ljava/util/ArrayDeque;
invoke-direct {v0}, Ljava/util/ArrayDeque;-><init>()V
iput-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->runningSyncCalls:Ljava/util/Deque;
return-void
.end method
.method public constructor <init>(Ljava/util/concurrent/ExecutorService;)V
.locals 1
.line 56
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/16 v0, 0x40
iput v0, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->maxRequests:I
const/4 v0, 0x5
iput v0, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->maxRequestsPerHost:I
.line 48
new-instance v0, Ljava/util/ArrayDeque;
invoke-direct {v0}, Ljava/util/ArrayDeque;-><init>()V
iput-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->readyAsyncCalls:Ljava/util/Deque;
.line 51
new-instance v0, Ljava/util/ArrayDeque;
invoke-direct {v0}, Ljava/util/ArrayDeque;-><init>()V
iput-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->runningAsyncCalls:Ljava/util/Deque;
.line 54
new-instance v0, Ljava/util/ArrayDeque;
invoke-direct {v0}, Ljava/util/ArrayDeque;-><init>()V
iput-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->runningSyncCalls:Ljava/util/Deque;
iput-object p1, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->executorService:Ljava/util/concurrent/ExecutorService;
return-void
.end method
.method private finished(Ljava/util/Deque;Ljava/lang/Object;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Ljava/util/Deque<",
"TT;>;TT;)V"
}
.end annotation
.line 219
monitor-enter p0
.line 220
:try_start_0
invoke-interface {p1, p2}, Ljava/util/Deque;->remove(Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_1
iget-object p1, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->idleCallback:Ljava/lang/Runnable;
.line 222
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 224
invoke-direct {p0}, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->promoteAndExecute()Z
move-result p2
if-nez p2, :cond_0
if-eqz p1, :cond_0
.line 227
invoke-interface {p1}, Ljava/lang/Runnable;->run()V
:cond_0
return-void
:catchall_0
move-exception p1
goto :goto_0
.line 220
:cond_1
:try_start_1
new-instance p1, Ljava/lang/AssertionError;
const-string p2, "Call wasn\'t in-flight!"
invoke-direct {p1, p2}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw p1
.line 222
:goto_0
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw p1
.end method
.method private promoteAndExecute()Z
.locals 6
.line 168
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
.line 170
monitor-enter p0
:try_start_0
iget-object v1, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->readyAsyncCalls:Ljava/util/Deque;
.line 171
invoke-interface {v1}, Ljava/util/Deque;->iterator()Ljava/util/Iterator;
move-result-object v1
:goto_0
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_2
.line 172
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/mbridge/msdk/thrid/okhttp/RealCall$AsyncCall;
iget-object v3, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->runningAsyncCalls:Ljava/util/Deque;
.line 174
invoke-interface {v3}, Ljava/util/Deque;->size()I
move-result v3
iget v4, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->maxRequests:I
if-lt v3, v4, :cond_0
goto :goto_1
.line 175
:cond_0
invoke-direct {p0, v2}, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->runningCallsForHost(Lcom/mbridge/msdk/thrid/okhttp/RealCall$AsyncCall;)I
move-result v3
iget v4, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->maxRequestsPerHost:I
if-lt v3, v4, :cond_1
goto :goto_0
.line 177
:cond_1
invoke-interface {v1}, Ljava/util/Iterator;->remove()V
.line 178
invoke-interface {v0, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
iget-object v3, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->runningAsyncCalls:Ljava/util/Deque;
.line 179
invoke-interface {v3, v2}, Ljava/util/Deque;->add(Ljava/lang/Object;)Z
goto :goto_0
:catchall_0
move-exception v0
goto :goto_4
.line 181
:cond_2
:goto_1
invoke-virtual {p0}, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->runningCallsCount()I
move-result v1
const/4 v2, 0x0
if-lez v1, :cond_3
const/4 v1, 0x1
goto :goto_2
:cond_3
move v1, v2
.line 182
:goto_2
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 184
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v3
:goto_3
if-ge v2, v3, :cond_4
.line 185
invoke-interface {v0, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v4
check-cast v4, Lcom/mbridge/msdk/thrid/okhttp/RealCall$AsyncCall;
.line 186
invoke-virtual {p0}, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->executorService()Ljava/util/concurrent/ExecutorService;
move-result-object v5
invoke-virtual {v4, v5}, Lcom/mbridge/msdk/thrid/okhttp/RealCall$AsyncCall;->executeOn(Ljava/util/concurrent/ExecutorService;)V
add-int/lit8 v2, v2, 0x1
goto :goto_3
:cond_4
return v1
.line 182
:goto_4
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v0
.end method
.method private runningCallsForHost(Lcom/mbridge/msdk/thrid/okhttp/RealCall$AsyncCall;)I
.locals 4
iget-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->runningAsyncCalls:Ljava/util/Deque;
.line 195
invoke-interface {v0}, Ljava/util/Deque;->iterator()Ljava/util/Iterator;
move-result-object v0
const/4 v1, 0x0
:cond_0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_2
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/mbridge/msdk/thrid/okhttp/RealCall$AsyncCall;
.line 196
invoke-virtual {v2}, Lcom/mbridge/msdk/thrid/okhttp/RealCall$AsyncCall;->get()Lcom/mbridge/msdk/thrid/okhttp/RealCall;
move-result-object v3
iget-boolean v3, v3, Lcom/mbridge/msdk/thrid/okhttp/RealCall;->forWebSocket:Z
if-eqz v3, :cond_1
goto :goto_0
.line 197
:cond_1
invoke-virtual {v2}, Lcom/mbridge/msdk/thrid/okhttp/RealCall$AsyncCall;->host()Ljava/lang/String;
move-result-object v2
invoke-virtual {p1}, Lcom/mbridge/msdk/thrid/okhttp/RealCall$AsyncCall;->host()Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_0
add-int/lit8 v1, v1, 0x1
goto :goto_0
:cond_2
return v1
.end method
# virtual methods
.method public declared-synchronized cancelAll()V
.locals 2
monitor-enter p0
:try_start_0
iget-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->readyAsyncCalls:Ljava/util/Deque;
.line 145
invoke-interface {v0}, Ljava/util/Deque;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_0
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/mbridge/msdk/thrid/okhttp/RealCall$AsyncCall;
.line 146
invoke-virtual {v1}, Lcom/mbridge/msdk/thrid/okhttp/RealCall$AsyncCall;->get()Lcom/mbridge/msdk/thrid/okhttp/RealCall;
move-result-object v1
invoke-virtual {v1}, Lcom/mbridge/msdk/thrid/okhttp/RealCall;->cancel()V
goto :goto_0
:catchall_0
move-exception v0
goto :goto_3
:cond_0
iget-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->runningAsyncCalls:Ljava/util/Deque;
.line 149
invoke-interface {v0}, Ljava/util/Deque;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_1
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_1
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/mbridge/msdk/thrid/okhttp/RealCall$AsyncCall;
.line 150
invoke-virtual {v1}, Lcom/mbridge/msdk/thrid/okhttp/RealCall$AsyncCall;->get()Lcom/mbridge/msdk/thrid/okhttp/RealCall;
move-result-object v1
invoke-virtual {v1}, Lcom/mbridge/msdk/thrid/okhttp/RealCall;->cancel()V
goto :goto_1
:cond_1
iget-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->runningSyncCalls:Ljava/util/Deque;
.line 153
invoke-interface {v0}, Ljava/util/Deque;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_2
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_2
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/mbridge/msdk/thrid/okhttp/RealCall;
.line 154
invoke-virtual {v1}, Lcom/mbridge/msdk/thrid/okhttp/RealCall;->cancel()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto :goto_2
.line 156
:cond_2
monitor-exit p0
return-void
:goto_3
monitor-exit p0
throw v0
.end method
.method public enqueue(Lcom/mbridge/msdk/thrid/okhttp/RealCall$AsyncCall;)V
.locals 1
.line 134
monitor-enter p0
:try_start_0
iget-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->readyAsyncCalls:Ljava/util/Deque;
.line 135
invoke-interface {v0, p1}, Ljava/util/Deque;->add(Ljava/lang/Object;)Z
.line 136
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 137
invoke-direct {p0}, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->promoteAndExecute()Z
return-void
:catchall_0
move-exception p1
.line 136
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw p1
.end method
.method public declared-synchronized executed(Lcom/mbridge/msdk/thrid/okhttp/RealCall;)V
.locals 1
monitor-enter p0
:try_start_0
iget-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->runningSyncCalls:Ljava/util/Deque;
.line 204
invoke-interface {v0, p1}, Ljava/util/Deque;->add(Ljava/lang/Object;)Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 205
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public declared-synchronized executorService()Ljava/util/concurrent/ExecutorService;
.locals 9
monitor-enter p0
:try_start_0
iget-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->executorService:Ljava/util/concurrent/ExecutorService;
if-nez v0, :cond_0
.line 65
new-instance v0, Ljava/util/concurrent/ThreadPoolExecutor;
const/4 v2, 0x0
const v3, 0x7fffffff
const-wide/16 v4, 0x3c
sget-object v6, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
new-instance v7, Ljava/util/concurrent/SynchronousQueue;
invoke-direct {v7}, Ljava/util/concurrent/SynchronousQueue;-><init>()V
const-string v1, "OkHttp Dispatcher"
const/4 v8, 0x0
.line 66
invoke-static {v1, v8}, Lcom/mbridge/msdk/thrid/okhttp/internal/Util;->threadFactory(Ljava/lang/String;Z)Ljava/util/concurrent/ThreadFactory;
move-result-object v8
move-object v1, v0
invoke-direct/range {v1 .. v8}, Ljava/util/concurrent/ThreadPoolExecutor;-><init>(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;)V
iput-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->executorService:Ljava/util/concurrent/ExecutorService;
goto :goto_0
:catchall_0
move-exception v0
goto :goto_1
:cond_0
:goto_0
iget-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->executorService:Ljava/util/concurrent/ExecutorService;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 68
monitor-exit p0
return-object v0
:goto_1
monitor-exit p0
throw v0
.end method
.method public finished(Lcom/mbridge/msdk/thrid/okhttp/RealCall$AsyncCall;)V
.locals 1
iget-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->runningAsyncCalls:Ljava/util/Deque;
.line 209
invoke-direct {p0, v0, p1}, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->finished(Ljava/util/Deque;Ljava/lang/Object;)V
return-void
.end method
.method public finished(Lcom/mbridge/msdk/thrid/okhttp/RealCall;)V
.locals 1
iget-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->runningSyncCalls:Ljava/util/Deque;
.line 214
invoke-direct {p0, v0, p1}, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->finished(Ljava/util/Deque;Ljava/lang/Object;)V
return-void
.end method
.method public declared-synchronized getMaxRequests()I
.locals 1
monitor-enter p0
:try_start_0
iget v0, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->maxRequests:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 89
monitor-exit p0
return v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized getMaxRequestsPerHost()I
.locals 1
monitor-enter p0
:try_start_0
iget v0, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->maxRequestsPerHost:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 114
monitor-exit p0
return v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized queuedCalls()Ljava/util/List;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/List<",
"Lcom/mbridge/msdk/thrid/okhttp/Call;",
">;"
}
.end annotation
monitor-enter p0
.line 233
:try_start_0
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iget-object v1, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->readyAsyncCalls:Ljava/util/Deque;
.line 234
invoke-interface {v1}, Ljava/util/Deque;->iterator()Ljava/util/Iterator;
move-result-object v1
:goto_0
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_0
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/mbridge/msdk/thrid/okhttp/RealCall$AsyncCall;
.line 235
invoke-virtual {v2}, Lcom/mbridge/msdk/thrid/okhttp/RealCall$AsyncCall;->get()Lcom/mbridge/msdk/thrid/okhttp/RealCall;
move-result-object v2
invoke-interface {v0, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
goto :goto_0
:catchall_0
move-exception v0
goto :goto_1
.line 237
:cond_0
invoke-static {v0}, Ljava/util/Collections;->unmodifiableList(Ljava/util/List;)Ljava/util/List;
move-result-object v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-object v0
:goto_1
monitor-exit p0
throw v0
.end method
.method public declared-synchronized queuedCallsCount()I
.locals 1
monitor-enter p0
:try_start_0
iget-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->readyAsyncCalls:Ljava/util/Deque;
.line 251
invoke-interface {v0}, Ljava/util/Deque;->size()I
move-result v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized runningCalls()Ljava/util/List;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/List<",
"Lcom/mbridge/msdk/thrid/okhttp/Call;",
">;"
}
.end annotation
monitor-enter p0
.line 242
:try_start_0
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iget-object v1, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->runningSyncCalls:Ljava/util/Deque;
.line 243
invoke-interface {v0, v1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
iget-object v1, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->runningAsyncCalls:Ljava/util/Deque;
.line 244
invoke-interface {v1}, Ljava/util/Deque;->iterator()Ljava/util/Iterator;
move-result-object v1
:goto_0
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_0
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/mbridge/msdk/thrid/okhttp/RealCall$AsyncCall;
.line 245
invoke-virtual {v2}, Lcom/mbridge/msdk/thrid/okhttp/RealCall$AsyncCall;->get()Lcom/mbridge/msdk/thrid/okhttp/RealCall;
move-result-object v2
invoke-interface {v0, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
goto :goto_0
:catchall_0
move-exception v0
goto :goto_1
.line 247
:cond_0
invoke-static {v0}, Ljava/util/Collections;->unmodifiableList(Ljava/util/List;)Ljava/util/List;
move-result-object v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-object v0
:goto_1
monitor-exit p0
throw v0
.end method
.method public declared-synchronized runningCallsCount()I
.locals 2
monitor-enter p0
:try_start_0
iget-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->runningAsyncCalls:Ljava/util/Deque;
.line 255
invoke-interface {v0}, Ljava/util/Deque;->size()I
move-result v0
iget-object v1, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->runningSyncCalls:Ljava/util/Deque;
invoke-interface {v1}, Ljava/util/Deque;->size()I
move-result v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
add-int/2addr v0, v1
monitor-exit p0
return v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized setIdleCallback(Ljava/lang/Runnable;)V
.locals 0
monitor-enter p0
:try_start_0
iput-object p1, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->idleCallback:Ljava/lang/Runnable;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 131
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public setMaxRequests(I)V
.locals 3
const/4 v0, 0x1
if-lt p1, v0, :cond_0
.line 82
monitor-enter p0
:try_start_0
iput p1, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->maxRequests:I
.line 84
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 85
invoke-direct {p0}, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->promoteAndExecute()Z
return-void
:catchall_0
move-exception p1
.line 84
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw p1
.line 80
:cond_0
new-instance v0, Ljava/lang/IllegalArgumentException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "max < 1: "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public setMaxRequestsPerHost(I)V
.locals 3
const/4 v0, 0x1
if-lt p1, v0, :cond_0
.line 107
monitor-enter p0
:try_start_0
iput p1, p0, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->maxRequestsPerHost:I
.line 109
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 110
invoke-direct {p0}, Lcom/mbridge/msdk/thrid/okhttp/Dispatcher;->promoteAndExecute()Z
return-void
:catchall_0
move-exception p1
.line 109
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw p1
.line 105
:cond_0
new-instance v0, Ljava/lang/IllegalArgumentException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "max < 1: "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.end method