254 lines
5.1 KiB
Smali
254 lines
5.1 KiB
Smali
|
.class public final Lz/q/a;
|
||
|
.super Ljava/lang/Object;
|
||
|
.source "Schedulers.java"
|
||
|
|
||
|
|
||
|
# static fields
|
||
|
.field public static final d:Ljava/util/concurrent/atomic/AtomicReference;
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"Ljava/util/concurrent/atomic/AtomicReference<",
|
||
|
"Lz/q/a;",
|
||
|
">;"
|
||
|
}
|
||
|
.end annotation
|
||
|
.end field
|
||
|
|
||
|
|
||
|
# instance fields
|
||
|
.field public final a:Lrx/Scheduler;
|
||
|
|
||
|
.field public final b:Lrx/Scheduler;
|
||
|
|
||
|
.field public final c:Lrx/Scheduler;
|
||
|
|
||
|
|
||
|
# direct methods
|
||
|
.method public static constructor <clinit>()V
|
||
|
.locals 1
|
||
|
|
||
|
new-instance v0, Ljava/util/concurrent/atomic/AtomicReference;
|
||
|
|
||
|
invoke-direct {v0}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
|
||
|
|
||
|
sput-object v0, Lz/q/a;->d:Ljava/util/concurrent/atomic/AtomicReference;
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public constructor <init>()V
|
||
|
.locals 2
|
||
|
|
||
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||
|
|
||
|
sget-object v0, Lz/p/o;->f:Lz/p/o;
|
||
|
|
||
|
invoke-virtual {v0}, Lz/p/o;->d()Lz/p/p;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0}, Lz/p/p;->a()Lrx/Scheduler;
|
||
|
|
||
|
new-instance v0, Lz/m/e/i;
|
||
|
|
||
|
const-string v1, "RxComputationScheduler-"
|
||
|
|
||
|
invoke-direct {v0, v1}, Lz/m/e/i;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
new-instance v1, Lz/m/c/b;
|
||
|
|
||
|
invoke-direct {v1, v0}, Lz/m/c/b;-><init>(Ljava/util/concurrent/ThreadFactory;)V
|
||
|
|
||
|
iput-object v1, p0, Lz/q/a;->a:Lrx/Scheduler;
|
||
|
|
||
|
new-instance v0, Lz/m/e/i;
|
||
|
|
||
|
const-string v1, "RxIoScheduler-"
|
||
|
|
||
|
invoke-direct {v0, v1}, Lz/m/e/i;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
new-instance v1, Lz/m/c/a;
|
||
|
|
||
|
invoke-direct {v1, v0}, Lz/m/c/a;-><init>(Ljava/util/concurrent/ThreadFactory;)V
|
||
|
|
||
|
iput-object v1, p0, Lz/q/a;->b:Lrx/Scheduler;
|
||
|
|
||
|
new-instance v0, Lz/m/e/i;
|
||
|
|
||
|
const-string v1, "RxNewThreadScheduler-"
|
||
|
|
||
|
invoke-direct {v0, v1}, Lz/m/e/i;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
new-instance v1, Lz/m/c/g;
|
||
|
|
||
|
invoke-direct {v1, v0}, Lz/m/c/g;-><init>(Ljava/util/concurrent/ThreadFactory;)V
|
||
|
|
||
|
iput-object v1, p0, Lz/q/a;->c:Lrx/Scheduler;
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public static a(Ljava/util/concurrent/Executor;)Lrx/Scheduler;
|
||
|
.locals 1
|
||
|
|
||
|
new-instance v0, Lz/m/c/c;
|
||
|
|
||
|
invoke-direct {v0, p0}, Lz/m/c/c;-><init>(Ljava/util/concurrent/Executor;)V
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static b()Lrx/Scheduler;
|
||
|
.locals 2
|
||
|
|
||
|
invoke-static {}, Lz/q/a;->c()Lz/q/a;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
iget-object v0, v0, Lz/q/a;->a:Lrx/Scheduler;
|
||
|
|
||
|
sget-object v1, Lz/p/l;->f:Lz/l/i;
|
||
|
|
||
|
if-eqz v1, :cond_0
|
||
|
|
||
|
invoke-interface {v1, v0}, Lz/l/i;->call(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
check-cast v0, Lrx/Scheduler;
|
||
|
|
||
|
:cond_0
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static c()Lz/q/a;
|
||
|
.locals 3
|
||
|
|
||
|
:goto_0
|
||
|
sget-object v0, Lz/q/a;->d:Ljava/util/concurrent/atomic/AtomicReference;
|
||
|
|
||
|
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
check-cast v0, Lz/q/a;
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
return-object v0
|
||
|
|
||
|
:cond_0
|
||
|
new-instance v0, Lz/q/a;
|
||
|
|
||
|
invoke-direct {v0}, Lz/q/a;-><init>()V
|
||
|
|
||
|
sget-object v1, Lz/q/a;->d:Ljava/util/concurrent/atomic/AtomicReference;
|
||
|
|
||
|
const/4 v2, 0x0
|
||
|
|
||
|
invoke-virtual {v1, v2, v0}, Ljava/util/concurrent/atomic/AtomicReference;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;)Z
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
if-eqz v1, :cond_1
|
||
|
|
||
|
return-object v0
|
||
|
|
||
|
:cond_1
|
||
|
invoke-virtual {v0}, Lz/q/a;->a()V
|
||
|
|
||
|
goto :goto_0
|
||
|
.end method
|
||
|
|
||
|
.method public static d()Lrx/Scheduler;
|
||
|
.locals 2
|
||
|
|
||
|
invoke-static {}, Lz/q/a;->c()Lz/q/a;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
iget-object v0, v0, Lz/q/a;->b:Lrx/Scheduler;
|
||
|
|
||
|
sget-object v1, Lz/p/l;->g:Lz/l/i;
|
||
|
|
||
|
if-eqz v1, :cond_0
|
||
|
|
||
|
invoke-interface {v1, v0}, Lz/l/i;->call(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
check-cast v0, Lrx/Scheduler;
|
||
|
|
||
|
:cond_0
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static e()Lrx/Scheduler;
|
||
|
.locals 1
|
||
|
|
||
|
sget-object v0, Lz/m/c/n;->a:Lz/m/c/n;
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
|
||
|
# virtual methods
|
||
|
.method public declared-synchronized a()V
|
||
|
.locals 1
|
||
|
|
||
|
monitor-enter p0
|
||
|
|
||
|
:try_start_0
|
||
|
iget-object v0, p0, Lz/q/a;->a:Lrx/Scheduler;
|
||
|
|
||
|
instance-of v0, v0, Lz/m/c/l;
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
iget-object v0, p0, Lz/q/a;->a:Lrx/Scheduler;
|
||
|
|
||
|
check-cast v0, Lz/m/c/l;
|
||
|
|
||
|
invoke-interface {v0}, Lz/m/c/l;->shutdown()V
|
||
|
|
||
|
:cond_0
|
||
|
iget-object v0, p0, Lz/q/a;->b:Lrx/Scheduler;
|
||
|
|
||
|
instance-of v0, v0, Lz/m/c/l;
|
||
|
|
||
|
if-eqz v0, :cond_1
|
||
|
|
||
|
iget-object v0, p0, Lz/q/a;->b:Lrx/Scheduler;
|
||
|
|
||
|
check-cast v0, Lz/m/c/l;
|
||
|
|
||
|
invoke-interface {v0}, Lz/m/c/l;->shutdown()V
|
||
|
|
||
|
:cond_1
|
||
|
iget-object v0, p0, Lz/q/a;->c:Lrx/Scheduler;
|
||
|
|
||
|
instance-of v0, v0, Lz/m/c/l;
|
||
|
|
||
|
if-eqz v0, :cond_2
|
||
|
|
||
|
iget-object v0, p0, Lz/q/a;->c:Lrx/Scheduler;
|
||
|
|
||
|
check-cast v0, Lz/m/c/l;
|
||
|
|
||
|
invoke-interface {v0}, Lz/m/c/l;->shutdown()V
|
||
|
:try_end_0
|
||
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
||
|
|
||
|
:cond_2
|
||
|
monitor-exit p0
|
||
|
|
||
|
return-void
|
||
|
|
||
|
:catchall_0
|
||
|
move-exception v0
|
||
|
|
||
|
monitor-exit p0
|
||
|
|
||
|
throw v0
|
||
|
.end method
|