ScheduledAction$FutureCompleter.smali
.class final Lrx/internal/schedulers/ScheduledAction$FutureCompleter;
.super Ljava/lang/Object;
.source "ScheduledAction.java"
# interfaces
.implements Lrx/Subscription;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lrx/internal/schedulers/ScheduledAction;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x10
name = "FutureCompleter"
.end annotation
# instance fields
.field private final f:Ljava/util/concurrent/Future;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/Future<",
"*>;"
}
.end annotation
.end field
.field final synthetic this$0:Lrx/internal/schedulers/ScheduledAction;
# direct methods
.method constructor <init>(Lrx/internal/schedulers/ScheduledAction;Ljava/util/concurrent/Future;)V
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/concurrent/Future<",
"*>;)V"
}
.end annotation
.line 1
iput-object p1, p0, Lrx/internal/schedulers/ScheduledAction$FutureCompleter;->this$0:Lrx/internal/schedulers/ScheduledAction;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
iput-object p2, p0, Lrx/internal/schedulers/ScheduledAction$FutureCompleter;->f:Ljava/util/concurrent/Future;
return-void
.end method
# virtual methods
.method public isUnsubscribed()Z
.registers 2
.line 1
iget-object v0, p0, Lrx/internal/schedulers/ScheduledAction$FutureCompleter;->f:Ljava/util/concurrent/Future;
invoke-interface {v0}, Ljava/util/concurrent/Future;->isCancelled()Z
move-result v0
return v0
.end method
.method public unsubscribe()V
.registers 3
.line 1
iget-object v0, p0, Lrx/internal/schedulers/ScheduledAction$FutureCompleter;->this$0:Lrx/internal/schedulers/ScheduledAction;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v0
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v1
if-eq v0, v1, :cond_13
.line 2
iget-object v0, p0, Lrx/internal/schedulers/ScheduledAction$FutureCompleter;->f:Ljava/util/concurrent/Future;
const/4 v1, 0x1
invoke-interface {v0, v1}, Ljava/util/concurrent/Future;->cancel(Z)Z
goto :goto_19
.line 3
:cond_13
iget-object v0, p0, Lrx/internal/schedulers/ScheduledAction$FutureCompleter;->f:Ljava/util/concurrent/Future;
const/4 v1, 0x0
invoke-interface {v0, v1}, Ljava/util/concurrent/Future;->cancel(Z)Z
:goto_19
return-void
.end method