TrampolineScheduler.smali
3.8 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
.class public final Lio/reactivex/internal/schedulers/TrampolineScheduler;
.super Lio/reactivex/Scheduler;
.source "TrampolineScheduler.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lio/reactivex/internal/schedulers/TrampolineScheduler$SleepingRunnable;,
Lio/reactivex/internal/schedulers/TrampolineScheduler$TimedRunnable;,
Lio/reactivex/internal/schedulers/TrampolineScheduler$TrampolineWorker;
}
.end annotation
# static fields
.field private static final INSTANCE:Lio/reactivex/internal/schedulers/TrampolineScheduler;
# direct methods
.method static constructor <clinit>()V
.locals 1
.line 34
new-instance v0, Lio/reactivex/internal/schedulers/TrampolineScheduler;
invoke-direct {v0}, Lio/reactivex/internal/schedulers/TrampolineScheduler;-><init>()V
sput-object v0, Lio/reactivex/internal/schedulers/TrampolineScheduler;->INSTANCE:Lio/reactivex/internal/schedulers/TrampolineScheduler;
return-void
.end method
.method constructor <init>()V
.locals 0
.line 46
invoke-direct {p0}, Lio/reactivex/Scheduler;-><init>()V
return-void
.end method
.method public static instance()Lio/reactivex/internal/schedulers/TrampolineScheduler;
.locals 1
.line 37
sget-object v0, Lio/reactivex/internal/schedulers/TrampolineScheduler;->INSTANCE:Lio/reactivex/internal/schedulers/TrampolineScheduler;
return-object v0
.end method
# virtual methods
.method public createWorker()Lio/reactivex/Scheduler$Worker;
.locals 1
.annotation build Lio/reactivex/annotations/NonNull;
.end annotation
.line 43
new-instance v0, Lio/reactivex/internal/schedulers/TrampolineScheduler$TrampolineWorker;
invoke-direct {v0}, Lio/reactivex/internal/schedulers/TrampolineScheduler$TrampolineWorker;-><init>()V
return-object v0
.end method
.method public scheduleDirect(Ljava/lang/Runnable;)Lio/reactivex/disposables/Disposable;
.locals 0
.param p1 # Ljava/lang/Runnable;
.annotation build Lio/reactivex/annotations/NonNull;
.end annotation
.end param
.annotation build Lio/reactivex/annotations/NonNull;
.end annotation
.line 52
invoke-static {p1}, Lio/reactivex/plugins/RxJavaPlugins;->onSchedule(Ljava/lang/Runnable;)Ljava/lang/Runnable;
move-result-object p1
invoke-interface {p1}, Ljava/lang/Runnable;->run()V
.line 53
sget-object p1, Lio/reactivex/internal/disposables/EmptyDisposable;->INSTANCE:Lio/reactivex/internal/disposables/EmptyDisposable;
return-object p1
.end method
.method public scheduleDirect(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)Lio/reactivex/disposables/Disposable;
.locals 0
.param p1 # Ljava/lang/Runnable;
.annotation build Lio/reactivex/annotations/NonNull;
.end annotation
.end param
.annotation build Lio/reactivex/annotations/NonNull;
.end annotation
.line 60
:try_start_0
invoke-virtual {p4, p2, p3}, Ljava/util/concurrent/TimeUnit;->sleep(J)V
.line 61
invoke-static {p1}, Lio/reactivex/plugins/RxJavaPlugins;->onSchedule(Ljava/lang/Runnable;)Ljava/lang/Runnable;
move-result-object p1
invoke-interface {p1}, Ljava/lang/Runnable;->run()V
:try_end_0
.catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception p1
.line 63
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object p2
invoke-virtual {p2}, Ljava/lang/Thread;->interrupt()V
.line 64
invoke-static {p1}, Lio/reactivex/plugins/RxJavaPlugins;->onError(Ljava/lang/Throwable;)V
.line 66
:goto_0
sget-object p1, Lio/reactivex/internal/disposables/EmptyDisposable;->INSTANCE:Lio/reactivex/internal/disposables/EmptyDisposable;
return-object p1
.end method