117 lines
2.4 KiB
Smali
117 lines
2.4 KiB
Smali
.class final Lio/reactivex/rxjava3/disposables/FutureDisposable;
|
|
.super Ljava/util/concurrent/atomic/AtomicReference;
|
|
.source "FutureDisposable.java"
|
|
|
|
# interfaces
|
|
.implements Lio/reactivex/rxjava3/disposables/c;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/concurrent/atomic/AtomicReference<",
|
|
"Ljava/util/concurrent/Future<",
|
|
"*>;>;",
|
|
"Lio/reactivex/rxjava3/disposables/c;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final serialVersionUID:J = 0x5ad55fad22d3c507L
|
|
|
|
|
|
# instance fields
|
|
.field private final allowInterrupt:Z
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/util/concurrent/Future;Z)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/MethodParameters;
|
|
accessFlags = {
|
|
0x0,
|
|
0x0
|
|
}
|
|
names = {
|
|
"run",
|
|
"allowInterrupt"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/concurrent/Future<",
|
|
"*>;Z)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-direct {p0, p1}, Ljava/util/concurrent/atomic/AtomicReference;-><init>(Ljava/lang/Object;)V
|
|
|
|
.line 2
|
|
iput-boolean p2, p0, Lio/reactivex/rxjava3/disposables/FutureDisposable;->allowInterrupt:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public dispose()V
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 1
|
|
invoke-virtual {p0, v0}, Ljava/util/concurrent/atomic/AtomicReference;->getAndSet(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/util/concurrent/Future;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
iget-boolean v1, p0, Lio/reactivex/rxjava3/disposables/FutureDisposable;->allowInterrupt:Z
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/concurrent/Future;->cancel(Z)Z
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public isDisposed()Z
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/util/concurrent/Future;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 2
|
|
invoke-interface {v0}, Ljava/util/concurrent/Future;->isDone()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/4 v0, 0x1
|
|
|
|
:goto_1
|
|
return v0
|
|
.end method
|