c.smali
6.7 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
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
.class public Lc/c;
.super Lc/y;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lc/c$a;
}
.end annotation
# static fields
.field public static final e:J
.field public static final f:J
.field public static g:Lc/c;
# instance fields
.field public h:Z
.field public i:Lc/c;
.field public j:J
# direct methods
.method public static constructor <clinit>()V
.locals 3
sget-object v0, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
const-wide/16 v1, 0x3c
invoke-virtual {v0, v1, v2}, Ljava/util/concurrent/TimeUnit;->toMillis(J)J
move-result-wide v0
sput-wide v0, Lc/c;->e:J
sget-object v2, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invoke-virtual {v2, v0, v1}, Ljava/util/concurrent/TimeUnit;->toNanos(J)J
move-result-wide v0
sput-wide v0, Lc/c;->f:J
return-void
.end method
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Lc/y;-><init>()V
return-void
.end method
.method public static f()Lc/c;
.locals 8
sget-object v0, Lc/c;->g:Lc/c;
iget-object v0, v0, Lc/c;->i:Lc/c;
const/4 v1, 0x0
if-nez v0, :cond_1
invoke-static {}, Ljava/lang/System;->nanoTime()J
move-result-wide v2
sget-wide v4, Lc/c;->e:J
const-class v0, Lc/c;
invoke-virtual {v0, v4, v5}, Ljava/lang/Object;->wait(J)V
sget-object v0, Lc/c;->g:Lc/c;
iget-object v0, v0, Lc/c;->i:Lc/c;
if-nez v0, :cond_0
invoke-static {}, Ljava/lang/System;->nanoTime()J
move-result-wide v4
sub-long/2addr v4, v2
sget-wide v2, Lc/c;->f:J
cmp-long v0, v4, v2
if-ltz v0, :cond_0
sget-object v1, Lc/c;->g:Lc/c;
:cond_0
return-object v1
:cond_1
invoke-static {}, Ljava/lang/System;->nanoTime()J
move-result-wide v2
.line 1
iget-wide v4, v0, Lc/c;->j:J
sub-long/2addr v4, v2
const-wide/16 v2, 0x0
cmp-long v2, v4, v2
if-lez v2, :cond_2
const-wide/32 v2, 0xf4240
.line 2
div-long v6, v4, v2
mul-long/2addr v2, v6
sub-long/2addr v4, v2
long-to-int v0, v4
const-class v2, Lc/c;
invoke-virtual {v2, v6, v7, v0}, Ljava/lang/Object;->wait(JI)V
return-object v1
:cond_2
sget-object v2, Lc/c;->g:Lc/c;
iget-object v3, v0, Lc/c;->i:Lc/c;
iput-object v3, v2, Lc/c;->i:Lc/c;
iput-object v1, v0, Lc/c;->i:Lc/c;
return-object v0
.end method
# virtual methods
.method public a(Ljava/io/IOException;)Ljava/io/IOException;
.locals 2
new-instance v0, Ljava/io/InterruptedIOException;
const-string v1, "timeout"
invoke-direct {v0, v1}, Ljava/io/InterruptedIOException;-><init>(Ljava/lang/String;)V
if-eqz p1, :cond_0
invoke-virtual {v0, p1}, Ljava/io/InterruptedIOException;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;
:cond_0
return-object v0
.end method
.method public final a(Z)V
.locals 1
invoke-virtual {p0}, Lc/c;->h()Z
move-result v0
if-eqz v0, :cond_1
if-nez p1, :cond_0
goto :goto_0
:cond_0
const/4 p1, 0x0
invoke-virtual {p0, p1}, Lc/c;->a(Ljava/io/IOException;)Ljava/io/IOException;
move-result-object p1
throw p1
:cond_1
:goto_0
return-void
.end method
.method public final g()V
.locals 9
iget-boolean v0, p0, Lc/c;->h:Z
if-nez v0, :cond_8
.line 1
iget-wide v0, p0, Lc/y;->d:J
.line 2
iget-boolean v2, p0, Lc/y;->b:Z
const-wide/16 v3, 0x0
cmp-long v3, v0, v3
if-nez v3, :cond_0
if-nez v2, :cond_0
return-void
:cond_0
const/4 v4, 0x1
.line 3
iput-boolean v4, p0, Lc/c;->h:Z
const-class v4, Lc/c;
monitor-enter v4
.line 4
:try_start_0
sget-object v5, Lc/c;->g:Lc/c;
if-nez v5, :cond_1
new-instance v5, Lc/c;
invoke-direct {v5}, Lc/c;-><init>()V
sput-object v5, Lc/c;->g:Lc/c;
new-instance v5, Lc/c$a;
invoke-direct {v5}, Lc/c$a;-><init>()V
invoke-virtual {v5}, Ljava/lang/Thread;->start()V
:cond_1
invoke-static {}, Ljava/lang/System;->nanoTime()J
move-result-wide v5
if-eqz v3, :cond_2
if-eqz v2, :cond_2
invoke-virtual {p0}, Lc/y;->c()J
move-result-wide v2
sub-long/2addr v2, v5
invoke-static {v0, v1, v2, v3}, Ljava/lang/Math;->min(JJ)J
move-result-wide v0
goto :goto_0
:cond_2
if-eqz v3, :cond_3
:goto_0
add-long/2addr v0, v5
goto :goto_1
:cond_3
if-eqz v2, :cond_7
invoke-virtual {p0}, Lc/y;->c()J
move-result-wide v0
:goto_1
iput-wide v0, p0, Lc/c;->j:J
.line 5
iget-wide v0, p0, Lc/c;->j:J
sub-long/2addr v0, v5
.line 6
sget-object v2, Lc/c;->g:Lc/c;
:goto_2
iget-object v3, v2, Lc/c;->i:Lc/c;
if-eqz v3, :cond_5
.line 7
iget-wide v7, v3, Lc/c;->j:J
sub-long/2addr v7, v5
cmp-long v7, v0, v7
if-gez v7, :cond_4
goto :goto_3
:cond_4
move-object v2, v3
goto :goto_2
.line 8
:cond_5
:goto_3
iput-object v3, p0, Lc/c;->i:Lc/c;
iput-object p0, v2, Lc/c;->i:Lc/c;
sget-object v0, Lc/c;->g:Lc/c;
if-ne v2, v0, :cond_6
const-class v0, Lc/c;
invoke-virtual {v0}, Ljava/lang/Object;->notify()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
:cond_6
monitor-exit v4
return-void
:cond_7
:try_start_1
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0}, Ljava/lang/AssertionError;-><init>()V
throw v0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:catchall_0
move-exception v0
monitor-exit v4
throw v0
.line 9
:cond_8
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "Unbalanced enter/exit"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public final h()Z
.locals 4
iget-boolean v0, p0, Lc/c;->h:Z
const/4 v1, 0x0
if-nez v0, :cond_0
return v1
:cond_0
iput-boolean v1, p0, Lc/c;->h:Z
const-class v0, Lc/c;
monitor-enter v0
.line 1
:try_start_0
sget-object v2, Lc/c;->g:Lc/c;
:goto_0
if-eqz v2, :cond_2
iget-object v3, v2, Lc/c;->i:Lc/c;
if-ne v3, p0, :cond_1
iget-object v3, p0, Lc/c;->i:Lc/c;
iput-object v3, v2, Lc/c;->i:Lc/c;
const/4 v2, 0x0
iput-object v2, p0, Lc/c;->i:Lc/c;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto :goto_1
:cond_1
move-object v2, v3
goto :goto_0
:cond_2
const/4 v1, 0x1
:goto_1
monitor-exit v0
return v1
:catchall_0
move-exception v1
monitor-exit v0
throw v1
.end method
.method public i()V
.locals 0
return-void
.end method