CancellableDisposable.smali
2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
.class public final Lio/reactivex/internal/disposables/CancellableDisposable;
.super Ljava/util/concurrent/atomic/AtomicReference;
.source "CancellableDisposable.java"
# interfaces
.implements Lio/reactivex/disposables/Disposable;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/atomic/AtomicReference<",
"Lio/reactivex/functions/Cancellable;",
">;",
"Lio/reactivex/disposables/Disposable;"
}
.end annotation
# static fields
.field private static final serialVersionUID:J = 0x4f5c453163a88dc2L
# direct methods
.method public constructor <init>(Lio/reactivex/functions/Cancellable;)V
.locals 0
.line 35
invoke-direct {p0, p1}, Ljava/util/concurrent/atomic/AtomicReference;-><init>(Ljava/lang/Object;)V
return-void
.end method
# virtual methods
.method public dispose()V
.locals 1
.line 45
invoke-virtual {p0}, Lio/reactivex/internal/disposables/CancellableDisposable;->get()Ljava/lang/Object;
move-result-object v0
if-eqz v0, :cond_0
const/4 v0, 0x0
.line 46
invoke-virtual {p0, v0}, Lio/reactivex/internal/disposables/CancellableDisposable;->getAndSet(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lio/reactivex/functions/Cancellable;
if-eqz v0, :cond_0
.line 49
:try_start_0
invoke-interface {v0}, Lio/reactivex/functions/Cancellable;->cancel()V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception v0
.line 51
invoke-static {v0}, Lio/reactivex/exceptions/Exceptions;->throwIfFatal(Ljava/lang/Throwable;)V
.line 52
invoke-static {v0}, Lio/reactivex/plugins/RxJavaPlugins;->onError(Ljava/lang/Throwable;)V
:cond_0
:goto_0
return-void
.end method
.method public isDisposed()Z
.locals 1
.line 40
invoke-virtual {p0}, Lio/reactivex/internal/disposables/CancellableDisposable;->get()Ljava/lang/Object;
move-result-object v0
if-nez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method