206 lines
5.4 KiB
Smali
206 lines
5.4 KiB
Smali
.class public Lm1/d;
|
|
.super Ljava/lang/Object;
|
|
.source "RequestExecutor.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lm1/d$a;,
|
|
Lm1/d$c;,
|
|
Lm1/d$b;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Ljava/lang/String;II)Ljava/util/concurrent/ThreadPoolExecutor;
|
|
.locals 8
|
|
.param p0 # Ljava/lang/String;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # I
|
|
.annotation build Landroidx/annotation/IntRange;
|
|
from = 0x0L
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 1
|
|
new-instance v7, Lm1/d$a;
|
|
|
|
invoke-direct {v7, p0, p1}, Lm1/d$a;-><init>(Ljava/lang/String;I)V
|
|
|
|
.line 2
|
|
new-instance p0, Ljava/util/concurrent/ThreadPoolExecutor;
|
|
|
|
int-to-long v3, p2
|
|
|
|
sget-object v5, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
new-instance v6, Ljava/util/concurrent/LinkedBlockingDeque;
|
|
|
|
invoke-direct {v6}, Ljava/util/concurrent/LinkedBlockingDeque;-><init>()V
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
move-object v0, p0
|
|
|
|
invoke-direct/range {v0 .. v7}, Ljava/util/concurrent/ThreadPoolExecutor;-><init>(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;)V
|
|
|
|
const/4 p1, 0x1
|
|
|
|
.line 3
|
|
invoke-virtual {p0, p1}, Ljava/util/concurrent/ThreadPoolExecutor;->allowCoreThreadTimeOut(Z)V
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static b(Landroid/os/Handler;)Ljava/util/concurrent/Executor;
|
|
.locals 1
|
|
.param p0 # Landroid/os/Handler;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 1
|
|
new-instance v0, Lm1/d$b;
|
|
|
|
invoke-direct {v0, p0}, Lm1/d$b;-><init>(Landroid/os/Handler;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static c(Ljava/util/concurrent/Executor;Ljava/util/concurrent/Callable;Lr1/c;)V
|
|
.locals 2
|
|
.param p0 # Ljava/util/concurrent/Executor;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p1 # Ljava/util/concurrent/Callable;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Lr1/c;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">(",
|
|
"Ljava/util/concurrent/Executor;",
|
|
"Ljava/util/concurrent/Callable<",
|
|
"TT;>;",
|
|
"Lr1/c<",
|
|
"TT;>;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-static {}, Lm1/a;->a()Landroid/os/Handler;
|
|
|
|
move-result-object v0
|
|
|
|
.line 2
|
|
new-instance v1, Lm1/d$c;
|
|
|
|
invoke-direct {v1, v0, p1, p2}, Lm1/d$c;-><init>(Landroid/os/Handler;Ljava/util/concurrent/Callable;Lr1/c;)V
|
|
|
|
invoke-interface {p0, v1}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static d(Ljava/util/concurrent/ExecutorService;Ljava/util/concurrent/Callable;I)Ljava/lang/Object;
|
|
.locals 1
|
|
.param p0 # Ljava/util/concurrent/ExecutorService;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p1 # Ljava/util/concurrent/Callable;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # I
|
|
.annotation build Landroidx/annotation/IntRange;
|
|
from = 0x0L
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">(",
|
|
"Ljava/util/concurrent/ExecutorService;",
|
|
"Ljava/util/concurrent/Callable<",
|
|
"TT;>;I)TT;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/lang/InterruptedException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-interface {p0, p1}, Ljava/util/concurrent/ExecutorService;->submit(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future;
|
|
|
|
move-result-object p0
|
|
|
|
int-to-long p1, p2
|
|
|
|
.line 2
|
|
:try_start_0
|
|
sget-object v0, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
invoke-interface {p0, p1, p2, v0}, Ljava/util/concurrent/Future;->get(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
:try_end_0
|
|
.catch Ljava/util/concurrent/ExecutionException; {:try_start_0 .. :try_end_0} :catch_2
|
|
.catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_1
|
|
.catch Ljava/util/concurrent/TimeoutException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object p0
|
|
|
|
.line 3
|
|
:catch_0
|
|
new-instance p0, Ljava/lang/InterruptedException;
|
|
|
|
const-string p1, "timeout"
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/InterruptedException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
|
|
:catch_1
|
|
move-exception p0
|
|
|
|
.line 4
|
|
throw p0
|
|
|
|
:catch_2
|
|
move-exception p0
|
|
|
|
.line 5
|
|
new-instance p1, Ljava/lang/RuntimeException;
|
|
|
|
invoke-direct {p1, p0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
|
|
|
|
throw p1
|
|
.end method
|