237 lines
6.4 KiB
Smali
237 lines
6.4 KiB
Smali
.class public final Lrx/internal/c/j;
|
|
.super Ljava/util/concurrent/atomic/AtomicReference;
|
|
.source "ScheduledAction.java"
|
|
|
|
# interfaces
|
|
.implements Ljava/lang/Runnable;
|
|
.implements Lrx/Subscription;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lrx/internal/c/j$c;,
|
|
Lrx/internal/c/j$b;,
|
|
Lrx/internal/c/j$a;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/concurrent/atomic/AtomicReference<",
|
|
"Ljava/lang/Thread;",
|
|
">;",
|
|
"Ljava/lang/Runnable;",
|
|
"Lrx/Subscription;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final serialVersionUID:J = -0x36fd4556f787c9b1L
|
|
|
|
|
|
# instance fields
|
|
.field final action:Lrx/functions/Action0;
|
|
|
|
.field final cancel:Lrx/internal/util/SubscriptionList;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lrx/functions/Action0;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
|
|
|
|
iput-object p1, p0, Lrx/internal/c/j;->action:Lrx/functions/Action0;
|
|
|
|
new-instance p1, Lrx/internal/util/SubscriptionList;
|
|
|
|
invoke-direct {p1}, Lrx/internal/util/SubscriptionList;-><init>()V
|
|
|
|
iput-object p1, p0, Lrx/internal/c/j;->cancel:Lrx/internal/util/SubscriptionList;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lrx/functions/Action0;Lrx/internal/util/SubscriptionList;)V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
|
|
|
|
iput-object p1, p0, Lrx/internal/c/j;->action:Lrx/functions/Action0;
|
|
|
|
new-instance p1, Lrx/internal/util/SubscriptionList;
|
|
|
|
new-instance v0, Lrx/internal/c/j$c;
|
|
|
|
invoke-direct {v0, p0, p2}, Lrx/internal/c/j$c;-><init>(Lrx/internal/c/j;Lrx/internal/util/SubscriptionList;)V
|
|
|
|
invoke-direct {p1, v0}, Lrx/internal/util/SubscriptionList;-><init>(Lrx/Subscription;)V
|
|
|
|
iput-object p1, p0, Lrx/internal/c/j;->cancel:Lrx/internal/util/SubscriptionList;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lrx/functions/Action0;Lrx/subscriptions/CompositeSubscription;)V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
|
|
|
|
iput-object p1, p0, Lrx/internal/c/j;->action:Lrx/functions/Action0;
|
|
|
|
new-instance p1, Lrx/internal/util/SubscriptionList;
|
|
|
|
new-instance v0, Lrx/internal/c/j$b;
|
|
|
|
invoke-direct {v0, p0, p2}, Lrx/internal/c/j$b;-><init>(Lrx/internal/c/j;Lrx/subscriptions/CompositeSubscription;)V
|
|
|
|
invoke-direct {p1, v0}, Lrx/internal/util/SubscriptionList;-><init>(Lrx/Subscription;)V
|
|
|
|
iput-object p1, p0, Lrx/internal/c/j;->cancel:Lrx/internal/util/SubscriptionList;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private static Q(Ljava/lang/Throwable;)V
|
|
.locals 2
|
|
|
|
invoke-static {p0}, Lrx/c/c;->onError(Ljava/lang/Throwable;)V
|
|
|
|
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Thread;->getUncaughtExceptionHandler()Ljava/lang/Thread$UncaughtExceptionHandler;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v1, v0, p0}, Ljava/lang/Thread$UncaughtExceptionHandler;->uncaughtException(Ljava/lang/Thread;Ljava/lang/Throwable;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a(Ljava/util/concurrent/Future;)V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/concurrent/Future<",
|
|
"*>;)V"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lrx/internal/c/j;->cancel:Lrx/internal/util/SubscriptionList;
|
|
|
|
new-instance v1, Lrx/internal/c/j$a;
|
|
|
|
invoke-direct {v1, p0, p1}, Lrx/internal/c/j$a;-><init>(Lrx/internal/c/j;Ljava/util/concurrent/Future;)V
|
|
|
|
invoke-virtual {v0, v1}, Lrx/internal/util/SubscriptionList;->add(Lrx/Subscription;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final isUnsubscribed()Z
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lrx/internal/c/j;->cancel:Lrx/internal/util/SubscriptionList;
|
|
|
|
invoke-virtual {v0}, Lrx/internal/util/SubscriptionList;->isUnsubscribed()Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final run()V
|
|
.locals 3
|
|
|
|
:try_start_0
|
|
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0, v0}, Lrx/internal/c/j;->lazySet(Ljava/lang/Object;)V
|
|
|
|
iget-object v0, p0, Lrx/internal/c/j;->action:Lrx/functions/Action0;
|
|
|
|
invoke-interface {v0}, Lrx/functions/Action0;->call()V
|
|
:try_end_0
|
|
.catch Lrx/a/f; {:try_start_0 .. :try_end_0} :catch_1
|
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
invoke-virtual {p0}, Lrx/internal/c/j;->unsubscribe()V
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
:try_start_1
|
|
new-instance v1, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v2, "Fatal Exception thrown on Scheduler.Worker thread."
|
|
|
|
invoke-direct {v1, v2, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
invoke-static {v1}, Lrx/internal/c/j;->Q(Ljava/lang/Throwable;)V
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
invoke-virtual {p0}, Lrx/internal/c/j;->unsubscribe()V
|
|
|
|
return-void
|
|
|
|
:catch_1
|
|
move-exception v0
|
|
|
|
:try_start_2
|
|
new-instance v1, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v2, "Exception thrown on Scheduler.Worker thread. Add `onError` handling."
|
|
|
|
invoke-direct {v1, v2, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
invoke-static {v1}, Lrx/internal/c/j;->Q(Ljava/lang/Throwable;)V
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
invoke-virtual {p0}, Lrx/internal/c/j;->unsubscribe()V
|
|
|
|
return-void
|
|
|
|
:goto_0
|
|
invoke-virtual {p0}, Lrx/internal/c/j;->unsubscribe()V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final unsubscribe()V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lrx/internal/c/j;->cancel:Lrx/internal/util/SubscriptionList;
|
|
|
|
invoke-virtual {v0}, Lrx/internal/util/SubscriptionList;->isUnsubscribed()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
iget-object v0, p0, Lrx/internal/c/j;->cancel:Lrx/internal/util/SubscriptionList;
|
|
|
|
invoke-virtual {v0}, Lrx/internal/util/SubscriptionList;->unsubscribe()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|