Commit c67fa20
authored
(fix): Listener on task (#321)
* add a async task around download
* load the cached file in the datafile loader to avoid doing it on the postExecute since file io can take some time.
* remove unused import
* refactor to load from cache if download fails on thread. but, load resource on main thread if all else fails.1 parent 49cd2c9 commit c67fa20
File tree
2 files changed
+27
-13
lines changed- android-sdk/src/main/java/com/optimizely/ab/android/sdk
- datafile-handler/src/main/java/com/optimizely/ab/android/datafile_handler
2 files changed
+27
-13
lines changedLines changed: 20 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
| 295 | + | |
304 | 296 | | |
305 | 297 | | |
306 | 298 | | |
307 | 299 | | |
308 | 300 | | |
309 | 301 | | |
| 302 | + | |
310 | 303 | | |
311 | 304 | | |
312 | 305 | | |
| |||
342 | 335 | | |
343 | 336 | | |
344 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
345 | 354 | | |
346 | 355 | | |
347 | 356 | | |
348 | 357 | | |
349 | 358 | | |
350 | | - | |
351 | 359 | | |
352 | 360 | | |
353 | 361 | | |
354 | | - | |
355 | | - | |
356 | | - | |
| 362 | + | |
| 363 | + | |
357 | 364 | | |
358 | 365 | | |
359 | 366 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
133 | 140 | | |
134 | 141 | | |
135 | 142 | | |
| |||
0 commit comments