BasicFuseableSubscriber.smali
7.9 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
.class public abstract Lio/reactivex/internal/subscribers/BasicFuseableSubscriber;
.super Ljava/lang/Object;
.source "BasicFuseableSubscriber.java"
# interfaces
.implements Lio/reactivex/FlowableSubscriber;
.implements Lio/reactivex/internal/fuseable/QueueSubscription;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
"R:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;",
"Lio/reactivex/FlowableSubscriber<",
"TT;>;",
"Lio/reactivex/internal/fuseable/QueueSubscription<",
"TR;>;"
}
.end annotation
# instance fields
.field protected final actual:Lorg/reactivestreams/Subscriber;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lorg/reactivestreams/Subscriber<",
"-TR;>;"
}
.end annotation
.end field
.field protected done:Z
.field protected qs:Lio/reactivex/internal/fuseable/QueueSubscription;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lio/reactivex/internal/fuseable/QueueSubscription<",
"TT;>;"
}
.end annotation
.end field
.field protected s:Lorg/reactivestreams/Subscription;
.field protected sourceMode:I
# direct methods
.method public constructor <init>(Lorg/reactivestreams/Subscriber;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lorg/reactivestreams/Subscriber<",
"-TR;>;)V"
}
.end annotation
.line 50
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 51
iput-object p1, p0, Lio/reactivex/internal/subscribers/BasicFuseableSubscriber;->actual:Lorg/reactivestreams/Subscriber;
return-void
.end method
# virtual methods
.method protected afterDownstream()V
.locals 0
return-void
.end method
.method protected beforeDownstream()Z
.locals 1
const/4 v0, 0x1
return v0
.end method
.method public cancel()V
.locals 1
.line 158
iget-object v0, p0, Lio/reactivex/internal/subscribers/BasicFuseableSubscriber;->s:Lorg/reactivestreams/Subscription;
invoke-interface {v0}, Lorg/reactivestreams/Subscription;->cancel()V
return-void
.end method
.method public clear()V
.locals 1
.line 168
iget-object v0, p0, Lio/reactivex/internal/subscribers/BasicFuseableSubscriber;->qs:Lio/reactivex/internal/fuseable/QueueSubscription;
invoke-interface {v0}, Lio/reactivex/internal/fuseable/QueueSubscription;->clear()V
return-void
.end method
.method protected final fail(Ljava/lang/Throwable;)V
.locals 1
.line 109
invoke-static {p1}, Lio/reactivex/exceptions/Exceptions;->throwIfFatal(Ljava/lang/Throwable;)V
.line 110
iget-object v0, p0, Lio/reactivex/internal/subscribers/BasicFuseableSubscriber;->s:Lorg/reactivestreams/Subscription;
invoke-interface {v0}, Lorg/reactivestreams/Subscription;->cancel()V
.line 111
invoke-virtual {p0, p1}, Lio/reactivex/internal/subscribers/BasicFuseableSubscriber;->onError(Ljava/lang/Throwable;)V
return-void
.end method
.method public isEmpty()Z
.locals 1
.line 163
iget-object v0, p0, Lio/reactivex/internal/subscribers/BasicFuseableSubscriber;->qs:Lio/reactivex/internal/fuseable/QueueSubscription;
invoke-interface {v0}, Lio/reactivex/internal/fuseable/QueueSubscription;->isEmpty()Z
move-result v0
return v0
.end method
.method public final offer(Ljava/lang/Object;)Z
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(TR;)Z"
}
.end annotation
.line 177
new-instance p1, Ljava/lang/UnsupportedOperationException;
const-string v0, "Should not be called!"
invoke-direct {p1, v0}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public final offer(Ljava/lang/Object;Ljava/lang/Object;)Z
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(TR;TR;)Z"
}
.end annotation
.line 182
new-instance p1, Ljava/lang/UnsupportedOperationException;
const-string p2, "Should not be called!"
invoke-direct {p1, p2}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public onComplete()V
.locals 1
.line 116
iget-boolean v0, p0, Lio/reactivex/internal/subscribers/BasicFuseableSubscriber;->done:Z
if-eqz v0, :cond_0
return-void
:cond_0
const/4 v0, 0x1
.line 119
iput-boolean v0, p0, Lio/reactivex/internal/subscribers/BasicFuseableSubscriber;->done:Z
.line 120
iget-object v0, p0, Lio/reactivex/internal/subscribers/BasicFuseableSubscriber;->actual:Lorg/reactivestreams/Subscriber;
invoke-interface {v0}, Lorg/reactivestreams/Subscriber;->onComplete()V
return-void
.end method
.method public onError(Ljava/lang/Throwable;)V
.locals 1
.line 96
iget-boolean v0, p0, Lio/reactivex/internal/subscribers/BasicFuseableSubscriber;->done:Z
if-eqz v0, :cond_0
.line 97
invoke-static {p1}, Lio/reactivex/plugins/RxJavaPlugins;->onError(Ljava/lang/Throwable;)V
return-void
:cond_0
const/4 v0, 0x1
.line 100
iput-boolean v0, p0, Lio/reactivex/internal/subscribers/BasicFuseableSubscriber;->done:Z
.line 101
iget-object v0, p0, Lio/reactivex/internal/subscribers/BasicFuseableSubscriber;->actual:Lorg/reactivestreams/Subscriber;
invoke-interface {v0, p1}, Lorg/reactivestreams/Subscriber;->onError(Ljava/lang/Throwable;)V
return-void
.end method
.method public final onSubscribe(Lorg/reactivestreams/Subscription;)V
.locals 1
.line 58
iget-object v0, p0, Lio/reactivex/internal/subscribers/BasicFuseableSubscriber;->s:Lorg/reactivestreams/Subscription;
invoke-static {v0, p1}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->validate(Lorg/reactivestreams/Subscription;Lorg/reactivestreams/Subscription;)Z
move-result v0
if-eqz v0, :cond_1
.line 60
iput-object p1, p0, Lio/reactivex/internal/subscribers/BasicFuseableSubscriber;->s:Lorg/reactivestreams/Subscription;
.line 61
instance-of v0, p1, Lio/reactivex/internal/fuseable/QueueSubscription;
if-eqz v0, :cond_0
.line 62
check-cast p1, Lio/reactivex/internal/fuseable/QueueSubscription;
iput-object p1, p0, Lio/reactivex/internal/subscribers/BasicFuseableSubscriber;->qs:Lio/reactivex/internal/fuseable/QueueSubscription;
.line 65
:cond_0
invoke-virtual {p0}, Lio/reactivex/internal/subscribers/BasicFuseableSubscriber;->beforeDownstream()Z
move-result p1
if-eqz p1, :cond_1
.line 67
iget-object p1, p0, Lio/reactivex/internal/subscribers/BasicFuseableSubscriber;->actual:Lorg/reactivestreams/Subscriber;
invoke-interface {p1, p0}, Lorg/reactivestreams/Subscriber;->onSubscribe(Lorg/reactivestreams/Subscription;)V
.line 69
invoke-virtual {p0}, Lio/reactivex/internal/subscribers/BasicFuseableSubscriber;->afterDownstream()V
:cond_1
return-void
.end method
.method public request(J)V
.locals 1
.line 153
iget-object v0, p0, Lio/reactivex/internal/subscribers/BasicFuseableSubscriber;->s:Lorg/reactivestreams/Subscription;
invoke-interface {v0, p1, p2}, Lorg/reactivestreams/Subscription;->request(J)V
return-void
.end method
.method protected final transitiveBoundaryFusion(I)I
.locals 2
.line 134
iget-object v0, p0, Lio/reactivex/internal/subscribers/BasicFuseableSubscriber;->qs:Lio/reactivex/internal/fuseable/QueueSubscription;
if-eqz v0, :cond_1
and-int/lit8 v1, p1, 0x4
if-nez v1, :cond_1
.line 137
invoke-interface {v0, p1}, Lio/reactivex/internal/fuseable/QueueSubscription;->requestFusion(I)I
move-result p1
if-eqz p1, :cond_0
.line 139
iput p1, p0, Lio/reactivex/internal/subscribers/BasicFuseableSubscriber;->sourceMode:I
:cond_0
return p1
:cond_1
const/4 p1, 0x0
return p1
.end method