2019-07-24 11:27:29 +00:00
|
|
|
.class final La/a;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "AndroidExecutors.java"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
La/a$a;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field static final CORE_POOL_SIZE:I
|
|
|
|
|
2019-07-31 00:08:31 +00:00
|
|
|
.field private static final bc:La/a;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-07-31 00:08:31 +00:00
|
|
|
.field private static final be:I
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-07-31 00:08:31 +00:00
|
|
|
.field static final bf:I
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
2019-07-31 00:08:31 +00:00
|
|
|
.field private final bd:Ljava/util/concurrent/Executor;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method static constructor <clinit>()V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
new-instance v0, La/a;
|
|
|
|
|
|
|
|
invoke-direct {v0}, La/a;-><init>()V
|
|
|
|
|
2019-07-31 00:08:31 +00:00
|
|
|
sput-object v0, La/a;->bc:La/a;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Runtime;->availableProcessors()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
2019-07-31 00:08:31 +00:00
|
|
|
sput v0, La/a;->be:I
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
|
|
|
|
sput v0, La/a;->CORE_POOL_SIZE:I
|
|
|
|
|
2019-07-31 00:08:31 +00:00
|
|
|
sget v0, La/a;->be:I
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
mul-int/lit8 v0, v0, 0x2
|
|
|
|
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
|
2019-07-31 00:08:31 +00:00
|
|
|
sput v0, La/a;->bf:I
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private constructor <init>()V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
new-instance v0, La/a$a;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, La/a$a;-><init>(B)V
|
|
|
|
|
2019-07-31 00:08:31 +00:00
|
|
|
iput-object v0, p0, La/a;->bd:Ljava/util/concurrent/Executor;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static newCachedThreadPool()Ljava/util/concurrent/ExecutorService;
|
|
|
|
.locals 8
|
|
|
|
|
|
|
|
new-instance v7, Ljava/util/concurrent/ThreadPoolExecutor;
|
|
|
|
|
|
|
|
sget v1, La/a;->CORE_POOL_SIZE:I
|
|
|
|
|
2019-07-31 00:08:31 +00:00
|
|
|
sget v2, La/a;->bf:I
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
sget-object v5, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
|
|
|
|
new-instance v6, Ljava/util/concurrent/LinkedBlockingQueue;
|
|
|
|
|
|
|
|
invoke-direct {v6}, Ljava/util/concurrent/LinkedBlockingQueue;-><init>()V
|
|
|
|
|
|
|
|
const-wide/16 v3, 0x1
|
|
|
|
|
|
|
|
move-object v0, v7
|
|
|
|
|
|
|
|
invoke-direct/range {v0 .. v6}, Ljava/util/concurrent/ThreadPoolExecutor;-><init>(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;)V
|
|
|
|
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
|
|
|
|
const/16 v1, 0x9
|
|
|
|
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
invoke-virtual {v7, v0}, Ljava/util/concurrent/ThreadPoolExecutor;->allowCoreThreadTimeOut(Z)V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-object v7
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static p()Ljava/util/concurrent/Executor;
|
|
|
|
.locals 1
|
|
|
|
|
2019-07-31 00:08:31 +00:00
|
|
|
sget-object v0, La/a;->bc:La/a;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-07-31 00:08:31 +00:00
|
|
|
iget-object v0, v0, La/a;->bd:Ljava/util/concurrent/Executor;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|