apkfuckery/com.discord/smali/androidx/work/Configuration.smali
2020-07-08 16:44:49 +00:00

305 lines
8.1 KiB
Smali

.class public final Landroidx/work/Configuration;
.super Ljava/lang/Object;
.source "Configuration.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/work/Configuration$Provider;,
Landroidx/work/Configuration$Builder;
}
.end annotation
# static fields
.field public static final MIN_SCHEDULER_LIMIT:I = 0x14
.annotation build Landroid/annotation/SuppressLint;
value = {
"MinMaxConstant"
}
.end annotation
.end field
# instance fields
.field public final mExecutor:Ljava/util/concurrent/Executor;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end field
.field public final mInputMergerFactory:Landroidx/work/InputMergerFactory;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end field
.field public final mIsUsingDefaultTaskExecutor:Z
.field public final mLoggingLevel:I
.field public final mMaxJobSchedulerId:I
.field public final mMaxSchedulerLimit:I
.field public final mMinJobSchedulerId:I
.field public final mTaskExecutor:Ljava/util/concurrent/Executor;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end field
.field public final mWorkerFactory:Landroidx/work/WorkerFactory;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end field
# direct methods
.method public constructor <init>(Landroidx/work/Configuration$Builder;)V
.locals 2
.param p1 # Landroidx/work/Configuration$Builder;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iget-object v0, p1, Landroidx/work/Configuration$Builder;->mExecutor:Ljava/util/concurrent/Executor;
if-nez v0, :cond_0
invoke-direct {p0}, Landroidx/work/Configuration;->createDefaultExecutor()Ljava/util/concurrent/Executor;
move-result-object v0
iput-object v0, p0, Landroidx/work/Configuration;->mExecutor:Ljava/util/concurrent/Executor;
goto :goto_0
:cond_0
iput-object v0, p0, Landroidx/work/Configuration;->mExecutor:Ljava/util/concurrent/Executor;
:goto_0
iget-object v0, p1, Landroidx/work/Configuration$Builder;->mTaskExecutor:Ljava/util/concurrent/Executor;
if-nez v0, :cond_1
const/4 v0, 0x1
iput-boolean v0, p0, Landroidx/work/Configuration;->mIsUsingDefaultTaskExecutor:Z
invoke-direct {p0}, Landroidx/work/Configuration;->createDefaultExecutor()Ljava/util/concurrent/Executor;
move-result-object v0
iput-object v0, p0, Landroidx/work/Configuration;->mTaskExecutor:Ljava/util/concurrent/Executor;
goto :goto_1
:cond_1
const/4 v1, 0x0
iput-boolean v1, p0, Landroidx/work/Configuration;->mIsUsingDefaultTaskExecutor:Z
iput-object v0, p0, Landroidx/work/Configuration;->mTaskExecutor:Ljava/util/concurrent/Executor;
:goto_1
iget-object v0, p1, Landroidx/work/Configuration$Builder;->mWorkerFactory:Landroidx/work/WorkerFactory;
if-nez v0, :cond_2
invoke-static {}, Landroidx/work/WorkerFactory;->getDefaultWorkerFactory()Landroidx/work/WorkerFactory;
move-result-object v0
iput-object v0, p0, Landroidx/work/Configuration;->mWorkerFactory:Landroidx/work/WorkerFactory;
goto :goto_2
:cond_2
iput-object v0, p0, Landroidx/work/Configuration;->mWorkerFactory:Landroidx/work/WorkerFactory;
:goto_2
iget-object v0, p1, Landroidx/work/Configuration$Builder;->mInputMergerFactory:Landroidx/work/InputMergerFactory;
if-nez v0, :cond_3
invoke-static {}, Landroidx/work/InputMergerFactory;->getDefaultInputMergerFactory()Landroidx/work/InputMergerFactory;
move-result-object v0
iput-object v0, p0, Landroidx/work/Configuration;->mInputMergerFactory:Landroidx/work/InputMergerFactory;
goto :goto_3
:cond_3
iput-object v0, p0, Landroidx/work/Configuration;->mInputMergerFactory:Landroidx/work/InputMergerFactory;
:goto_3
iget v0, p1, Landroidx/work/Configuration$Builder;->mLoggingLevel:I
iput v0, p0, Landroidx/work/Configuration;->mLoggingLevel:I
iget v0, p1, Landroidx/work/Configuration$Builder;->mMinJobSchedulerId:I
iput v0, p0, Landroidx/work/Configuration;->mMinJobSchedulerId:I
iget v0, p1, Landroidx/work/Configuration$Builder;->mMaxJobSchedulerId:I
iput v0, p0, Landroidx/work/Configuration;->mMaxJobSchedulerId:I
iget p1, p1, Landroidx/work/Configuration$Builder;->mMaxSchedulerLimit:I
iput p1, p0, Landroidx/work/Configuration;->mMaxSchedulerLimit:I
return-void
.end method
.method private createDefaultExecutor()Ljava/util/concurrent/Executor;
.locals 2
.annotation build Landroidx/annotation/NonNull;
.end annotation
invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/Runtime;->availableProcessors()I
move-result v0
add-int/lit8 v0, v0, -0x1
const/4 v1, 0x4
invoke-static {v0, v1}, Ljava/lang/Math;->min(II)I
move-result v0
const/4 v1, 0x2
invoke-static {v1, v0}, Ljava/lang/Math;->max(II)I
move-result v0
invoke-static {v0}, Ljava/util/concurrent/Executors;->newFixedThreadPool(I)Ljava/util/concurrent/ExecutorService;
move-result-object v0
return-object v0
.end method
# virtual methods
.method public getExecutor()Ljava/util/concurrent/Executor;
.locals 1
.annotation build Landroidx/annotation/NonNull;
.end annotation
iget-object v0, p0, Landroidx/work/Configuration;->mExecutor:Ljava/util/concurrent/Executor;
return-object v0
.end method
.method public getInputMergerFactory()Landroidx/work/InputMergerFactory;
.locals 1
.annotation build Landroidx/annotation/NonNull;
.end annotation
iget-object v0, p0, Landroidx/work/Configuration;->mInputMergerFactory:Landroidx/work/InputMergerFactory;
return-object v0
.end method
.method public getMaxJobSchedulerId()I
.locals 1
iget v0, p0, Landroidx/work/Configuration;->mMaxJobSchedulerId:I
return v0
.end method
.method public getMaxSchedulerLimit()I
.locals 2
.annotation build Landroidx/annotation/IntRange;
from = 0x14L
to = 0x32L
.end annotation
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x17
if-ne v0, v1, :cond_0
iget v0, p0, Landroidx/work/Configuration;->mMaxSchedulerLimit:I
div-int/lit8 v0, v0, 0x2
return v0
:cond_0
iget v0, p0, Landroidx/work/Configuration;->mMaxSchedulerLimit:I
return v0
.end method
.method public getMinJobSchedulerId()I
.locals 1
iget v0, p0, Landroidx/work/Configuration;->mMinJobSchedulerId:I
return v0
.end method
.method public getMinimumLoggingLevel()I
.locals 1
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
iget v0, p0, Landroidx/work/Configuration;->mLoggingLevel:I
return v0
.end method
.method public getTaskExecutor()Ljava/util/concurrent/Executor;
.locals 1
.annotation build Landroidx/annotation/NonNull;
.end annotation
iget-object v0, p0, Landroidx/work/Configuration;->mTaskExecutor:Ljava/util/concurrent/Executor;
return-object v0
.end method
.method public getWorkerFactory()Landroidx/work/WorkerFactory;
.locals 1
.annotation build Landroidx/annotation/NonNull;
.end annotation
iget-object v0, p0, Landroidx/work/Configuration;->mWorkerFactory:Landroidx/work/WorkerFactory;
return-object v0
.end method
.method public isUsingDefaultTaskExecutor()Z
.locals 1
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
iget-boolean v0, p0, Landroidx/work/Configuration;->mIsUsingDefaultTaskExecutor:Z
return v0
.end method