391 lines
11 KiB
Smali
391 lines
11 KiB
Smali
.class public Lio/reactivex/internal/schedulers/g;
|
|
.super Lkh/h0$c;
|
|
.source "NewThreadWorker.java"
|
|
|
|
# interfaces
|
|
.implements Lio/reactivex/disposables/b;
|
|
|
|
|
|
# instance fields
|
|
.field public final a:Ljava/util/concurrent/ScheduledExecutorService;
|
|
|
|
.field public volatile b:Z
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/util/concurrent/ThreadFactory;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lkh/h0$c;-><init>()V
|
|
|
|
.line 2
|
|
invoke-static {p1}, Lio/reactivex/internal/schedulers/j;->a(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ScheduledExecutorService;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lio/reactivex/internal/schedulers/g;->a:Ljava/util/concurrent/ScheduledExecutorService;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public b(Ljava/lang/Runnable;)Lio/reactivex/disposables/b;
|
|
.locals 3
|
|
.param p1 # Ljava/lang/Runnable;
|
|
.annotation build Lio/reactivex/annotations/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Lio/reactivex/annotations/NonNull;
|
|
.end annotation
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
.line 1
|
|
invoke-virtual {p0, p1, v0, v1, v2}, Lio/reactivex/internal/schedulers/g;->c(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)Lio/reactivex/disposables/b;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public c(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)Lio/reactivex/disposables/b;
|
|
.locals 6
|
|
.param p1 # Ljava/lang/Runnable;
|
|
.annotation build Lio/reactivex/annotations/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p4 # Ljava/util/concurrent/TimeUnit;
|
|
.annotation build Lio/reactivex/annotations/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Lio/reactivex/annotations/NonNull;
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-boolean v0, p0, Lio/reactivex/internal/schedulers/g;->b:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
sget-object p1, Lio/reactivex/internal/disposables/EmptyDisposable;->INSTANCE:Lio/reactivex/internal/disposables/EmptyDisposable;
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
const/4 v5, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move-wide v2, p2
|
|
|
|
move-object v4, p4
|
|
|
|
.line 3
|
|
invoke-virtual/range {v0 .. v5}, Lio/reactivex/internal/schedulers/g;->e(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;Lqh/a;)Lio/reactivex/internal/schedulers/ScheduledRunnable;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public dispose()V
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-boolean v0, p0, Lio/reactivex/internal/schedulers/g;->b:Z
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 2
|
|
iput-boolean v0, p0, Lio/reactivex/internal/schedulers/g;->b:Z
|
|
|
|
.line 3
|
|
iget-object v0, p0, Lio/reactivex/internal/schedulers/g;->a:Ljava/util/concurrent/ScheduledExecutorService;
|
|
|
|
invoke-interface {v0}, Ljava/util/concurrent/ScheduledExecutorService;->shutdownNow()Ljava/util/List;
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public e(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;Lqh/a;)Lio/reactivex/internal/schedulers/ScheduledRunnable;
|
|
.locals 3
|
|
.param p4 # Ljava/util/concurrent/TimeUnit;
|
|
.annotation build Lio/reactivex/annotations/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p5 # Lqh/a;
|
|
.annotation build Lio/reactivex/annotations/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Lio/reactivex/annotations/NonNull;
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-static {p1}, Lwh/a;->b0(Ljava/lang/Runnable;)Ljava/lang/Runnable;
|
|
|
|
move-result-object p1
|
|
|
|
.line 2
|
|
new-instance v0, Lio/reactivex/internal/schedulers/ScheduledRunnable;
|
|
|
|
invoke-direct {v0, p1, p5}, Lio/reactivex/internal/schedulers/ScheduledRunnable;-><init>(Ljava/lang/Runnable;Lqh/a;)V
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
.line 3
|
|
invoke-interface {p5, v0}, Lqh/a;->b(Lio/reactivex/disposables/b;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
const-wide/16 v1, 0x0
|
|
|
|
cmp-long p1, p2, v1
|
|
|
|
if-gtz p1, :cond_1
|
|
|
|
.line 4
|
|
:try_start_0
|
|
iget-object p1, p0, Lio/reactivex/internal/schedulers/g;->a:Ljava/util/concurrent/ScheduledExecutorService;
|
|
|
|
invoke-interface {p1, v0}, Ljava/util/concurrent/ScheduledExecutorService;->submit(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_0
|
|
|
|
.line 5
|
|
:cond_1
|
|
iget-object p1, p0, Lio/reactivex/internal/schedulers/g;->a:Ljava/util/concurrent/ScheduledExecutorService;
|
|
|
|
invoke-interface {p1, v0, p2, p3, p4}, Ljava/util/concurrent/ScheduledExecutorService;->schedule(Ljava/util/concurrent/Callable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;
|
|
|
|
move-result-object p1
|
|
|
|
.line 6
|
|
:goto_0
|
|
invoke-virtual {v0, p1}, Lio/reactivex/internal/schedulers/ScheduledRunnable;->setFuture(Ljava/util/concurrent/Future;)V
|
|
:try_end_0
|
|
.catch Ljava/util/concurrent/RejectedExecutionException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_1
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
if-eqz p5, :cond_2
|
|
|
|
.line 7
|
|
invoke-interface {p5, v0}, Lqh/a;->a(Lio/reactivex/disposables/b;)Z
|
|
|
|
.line 8
|
|
:cond_2
|
|
invoke-static {p1}, Lwh/a;->Y(Ljava/lang/Throwable;)V
|
|
|
|
:goto_1
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public f(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)Lio/reactivex/disposables/b;
|
|
.locals 3
|
|
|
|
.line 1
|
|
new-instance v0, Lio/reactivex/internal/schedulers/ScheduledDirectTask;
|
|
|
|
invoke-static {p1}, Lwh/a;->b0(Ljava/lang/Runnable;)Ljava/lang/Runnable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, p1}, Lio/reactivex/internal/schedulers/ScheduledDirectTask;-><init>(Ljava/lang/Runnable;)V
|
|
|
|
const-wide/16 v1, 0x0
|
|
|
|
cmp-long p1, p2, v1
|
|
|
|
if-gtz p1, :cond_0
|
|
|
|
.line 2
|
|
:try_start_0
|
|
iget-object p1, p0, Lio/reactivex/internal/schedulers/g;->a:Ljava/util/concurrent/ScheduledExecutorService;
|
|
|
|
invoke-interface {p1, v0}, Ljava/util/concurrent/ScheduledExecutorService;->submit(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_0
|
|
|
|
.line 3
|
|
:cond_0
|
|
iget-object p1, p0, Lio/reactivex/internal/schedulers/g;->a:Ljava/util/concurrent/ScheduledExecutorService;
|
|
|
|
invoke-interface {p1, v0, p2, p3, p4}, Ljava/util/concurrent/ScheduledExecutorService;->schedule(Ljava/util/concurrent/Callable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;
|
|
|
|
move-result-object p1
|
|
|
|
.line 4
|
|
:goto_0
|
|
invoke-virtual {v0, p1}, Lio/reactivex/internal/schedulers/AbstractDirectTask;->setFuture(Ljava/util/concurrent/Future;)V
|
|
:try_end_0
|
|
.catch Ljava/util/concurrent/RejectedExecutionException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object v0
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
.line 5
|
|
invoke-static {p1}, Lwh/a;->Y(Ljava/lang/Throwable;)V
|
|
|
|
.line 6
|
|
sget-object p1, Lio/reactivex/internal/disposables/EmptyDisposable;->INSTANCE:Lio/reactivex/internal/disposables/EmptyDisposable;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public g(Ljava/lang/Runnable;JJLjava/util/concurrent/TimeUnit;)Lio/reactivex/disposables/b;
|
|
.locals 8
|
|
|
|
.line 1
|
|
invoke-static {p1}, Lwh/a;->b0(Ljava/lang/Runnable;)Ljava/lang/Runnable;
|
|
|
|
move-result-object p1
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
cmp-long v2, p4, v0
|
|
|
|
if-gtz v2, :cond_1
|
|
|
|
.line 2
|
|
new-instance p4, Lio/reactivex/internal/schedulers/d;
|
|
|
|
iget-object p5, p0, Lio/reactivex/internal/schedulers/g;->a:Ljava/util/concurrent/ScheduledExecutorService;
|
|
|
|
invoke-direct {p4, p1, p5}, Lio/reactivex/internal/schedulers/d;-><init>(Ljava/lang/Runnable;Ljava/util/concurrent/ExecutorService;)V
|
|
|
|
cmp-long p1, p2, v0
|
|
|
|
if-gtz p1, :cond_0
|
|
|
|
.line 3
|
|
:try_start_0
|
|
iget-object p1, p0, Lio/reactivex/internal/schedulers/g;->a:Ljava/util/concurrent/ScheduledExecutorService;
|
|
|
|
invoke-interface {p1, p4}, Ljava/util/concurrent/ScheduledExecutorService;->submit(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_0
|
|
|
|
.line 4
|
|
:cond_0
|
|
iget-object p1, p0, Lio/reactivex/internal/schedulers/g;->a:Ljava/util/concurrent/ScheduledExecutorService;
|
|
|
|
invoke-interface {p1, p4, p2, p3, p6}, Ljava/util/concurrent/ScheduledExecutorService;->schedule(Ljava/util/concurrent/Callable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;
|
|
|
|
move-result-object p1
|
|
|
|
.line 5
|
|
:goto_0
|
|
invoke-virtual {p4, p1}, Lio/reactivex/internal/schedulers/d;->b(Ljava/util/concurrent/Future;)V
|
|
:try_end_0
|
|
.catch Ljava/util/concurrent/RejectedExecutionException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object p4
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
.line 6
|
|
invoke-static {p1}, Lwh/a;->Y(Ljava/lang/Throwable;)V
|
|
|
|
.line 7
|
|
sget-object p1, Lio/reactivex/internal/disposables/EmptyDisposable;->INSTANCE:Lio/reactivex/internal/disposables/EmptyDisposable;
|
|
|
|
return-object p1
|
|
|
|
.line 8
|
|
:cond_1
|
|
new-instance v7, Lio/reactivex/internal/schedulers/ScheduledDirectPeriodicTask;
|
|
|
|
invoke-direct {v7, p1}, Lio/reactivex/internal/schedulers/ScheduledDirectPeriodicTask;-><init>(Ljava/lang/Runnable;)V
|
|
|
|
.line 9
|
|
:try_start_1
|
|
iget-object v0, p0, Lio/reactivex/internal/schedulers/g;->a:Ljava/util/concurrent/ScheduledExecutorService;
|
|
|
|
move-object v1, v7
|
|
|
|
move-wide v2, p2
|
|
|
|
move-wide v4, p4
|
|
|
|
move-object v6, p6
|
|
|
|
invoke-interface/range {v0 .. v6}, Ljava/util/concurrent/ScheduledExecutorService;->scheduleAtFixedRate(Ljava/lang/Runnable;JJLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;
|
|
|
|
move-result-object p1
|
|
|
|
.line 10
|
|
invoke-virtual {v7, p1}, Lio/reactivex/internal/schedulers/AbstractDirectTask;->setFuture(Ljava/util/concurrent/Future;)V
|
|
:try_end_1
|
|
.catch Ljava/util/concurrent/RejectedExecutionException; {:try_start_1 .. :try_end_1} :catch_1
|
|
|
|
return-object v7
|
|
|
|
:catch_1
|
|
move-exception p1
|
|
|
|
.line 11
|
|
invoke-static {p1}, Lwh/a;->Y(Ljava/lang/Throwable;)V
|
|
|
|
.line 12
|
|
sget-object p1, Lio/reactivex/internal/disposables/EmptyDisposable;->INSTANCE:Lio/reactivex/internal/disposables/EmptyDisposable;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public h()V
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-boolean v0, p0, Lio/reactivex/internal/schedulers/g;->b:Z
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 2
|
|
iput-boolean v0, p0, Lio/reactivex/internal/schedulers/g;->b:Z
|
|
|
|
.line 3
|
|
iget-object v0, p0, Lio/reactivex/internal/schedulers/g;->a:Ljava/util/concurrent/ScheduledExecutorService;
|
|
|
|
invoke-interface {v0}, Ljava/util/concurrent/ScheduledExecutorService;->shutdown()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public isDisposed()Z
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-boolean v0, p0, Lio/reactivex/internal/schedulers/g;->b:Z
|
|
|
|
return v0
|
|
.end method
|