Commit 3dd1e84
chore: [SDK-4213] remove background-threading FF, make async init default
The sdk_background_threading remote flag is fully rolled out, so the
background/async path is now the unconditional default and all FF gating
is removed:
- Drop SDK_BACKGROUND_THREADING from FeatureFlag and its FeatureManager
side-effect; delete ThreadingMode.
- Collapse all ThreadUtils branches to the OneSignalDispatchers path and
rename runOnSerialIOIfBackgroundThreading -> runOnSerialIO.
- OneSignalImp: remove isBackgroundThreadingEnabled, the featureManager
field, the injectable ioDispatcher param, and the now-dead
requireInitForOperation / warnIfBlockingOnMainThread. initWithContext
always dispatches init asynchronously, eliminating the FF/cached-config
read from the init decision path.
- StartupService / OneSignalCrashUploaderWrapper: always run async.
- Update tests to the default async behavior; rename
ThreadUtilsFeatureFlagTests -> ThreadUtilsDispatchTests.
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 6d73438 commit 3dd1e84
26 files changed
Lines changed: 274 additions & 1004 deletions
File tree
- OneSignalSDK/onesignal
- core/src
- main/java/com/onesignal
- common/threading
- core/internal
- background/impl
- config/impl
- features
- startup
- debug/internal/crash
- internal
- session/internal/session/impl
- test/java/com/onesignal
- common/threading
- core/internal
- application
- background/impl
- config/impl
- features
- startup
- debug/internal/crash
- internal
- session/internal/session
- notifications/src
- main/java/com/onesignal/notifications/internal
- permissions/impl
- test/java/com/onesignal/notifications/internal
- permission
- testhelpers/src/main/java/com/onesignal/mocks
Lines changed: 26 additions & 116 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | 2 | | |
5 | 3 | | |
6 | 4 | | |
7 | | - | |
8 | 5 | | |
9 | | - | |
10 | | - | |
11 | 6 | | |
12 | | - | |
13 | 7 | | |
14 | 8 | | |
15 | 9 | | |
| |||
30 | 24 | | |
31 | 25 | | |
32 | 26 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 27 | + | |
45 | 28 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 29 | + | |
51 | 30 | | |
52 | | - | |
| 31 | + | |
53 | 32 | | |
54 | 33 | | |
55 | 34 | | |
| |||
101 | 80 | | |
102 | 81 | | |
103 | 82 | | |
104 | | - | |
| 83 | + | |
105 | 84 | | |
106 | 85 | | |
107 | 86 | | |
| |||
117 | 96 | | |
118 | 97 | | |
119 | 98 | | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
124 | 102 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
| 103 | + | |
| 104 | + | |
131 | 105 | | |
132 | 106 | | |
133 | 107 | | |
| |||
143 | 117 | | |
144 | 118 | | |
145 | 119 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
170 | 123 | | |
171 | 124 | | |
172 | 125 | | |
| |||
191 | 144 | | |
192 | 145 | | |
193 | 146 | | |
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 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
220 | 150 | | |
221 | 151 | | |
222 | 152 | | |
| |||
235 | 165 | | |
236 | 166 | | |
237 | 167 | | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
253 | 173 | | |
254 | 174 | | |
255 | 175 | | |
| |||
261 | 181 | | |
262 | 182 | | |
263 | 183 | | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
280 | 190 | | |
281 | 191 | | |
282 | 192 | | |
Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
Lines changed: 0 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 27 | | |
35 | 28 | | |
36 | 29 | | |
| |||
Lines changed: 3 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
153 | 152 | | |
154 | 153 | | |
155 | 154 | | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | 161 | | |
168 | 162 | | |
169 | 163 | | |
| |||
174 | 168 | | |
175 | 169 | | |
176 | 170 | | |
177 | | - | |
| 171 | + | |
178 | 172 | | |
179 | 173 | | |
180 | 174 | | |
181 | | - | |
| 175 | + | |
182 | 176 | | |
183 | 177 | | |
Lines changed: 6 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
| |||
16 | 14 | | |
17 | 15 | | |
18 | 16 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
36 | 23 | | |
37 | 24 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | 25 | | |
49 | 26 | | |
50 | 27 | | |
0 commit comments