apkfuckery/com.discord/smali/androidx/work/Configuration.smali

218 lines
5.6 KiB
Smali
Raw Normal View History

2019-07-24 11:27:29 +00:00
.class public final Landroidx/work/Configuration;
.super Ljava/lang/Object;
.source "Configuration.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/work/Configuration$Builder;
}
.end annotation
# static fields
.field public static final MIN_SCHEDULER_LIMIT:I = 0x14
# instance fields
.field private final mExecutor:Ljava/util/concurrent/Executor;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end field
.field private final mLoggingLevel:I
.field private final mMaxJobSchedulerId:I
.field private final mMaxSchedulerLimit:I
.field private final mMinJobSchedulerId:I
.field private final mWorkerFactory:Landroidx/work/WorkerFactory;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end field
# direct methods
.method constructor <init>(Landroidx/work/Configuration$Builder;)V
.locals 1
.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
iget-object v0, p1, Landroidx/work/Configuration$Builder;->mExecutor:Ljava/util/concurrent/Executor;
iput-object v0, p0, Landroidx/work/Configuration;->mExecutor:Ljava/util/concurrent/Executor;
:goto_0
iget-object v0, p1, Landroidx/work/Configuration$Builder;->mWorkerFactory:Landroidx/work/WorkerFactory;
if-nez v0, :cond_1
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_1
:cond_1
iget-object v0, p1, Landroidx/work/Configuration$Builder;->mWorkerFactory:Landroidx/work/WorkerFactory;
iput-object v0, p0, Landroidx/work/Configuration;->mWorkerFactory:Landroidx/work/WorkerFactory;
:goto_1
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 final 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 final getMaxJobSchedulerId()I
.locals 1
iget v0, p0, Landroidx/work/Configuration;->mMaxJobSchedulerId:I
return v0
.end method
.method public final 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 final getMinJobSchedulerId()I
.locals 1
iget v0, p0, Landroidx/work/Configuration;->mMinJobSchedulerId:I
return v0
.end method
.method public final getMinimumLoggingLevel()I
.locals 1
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
iget v0, p0, Landroidx/work/Configuration;->mLoggingLevel:I
return v0
.end method
.method public final 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