Commit 3ebf05f
fix(replay): Allow STARTED -> RESUMED state transition in ReplayLifecycle
The ReplayLifecycle state machine did not allow transitioning from STARTED
to RESUMED. This caused a bug when the app returned to foreground after
being in background longer than sessionIntervalMillis:
1. Timer fires -> stop() -> state becomes STOPPED
2. App returns to foreground -> start() -> state becomes STARTED
3. resume() fails because STARTED -> RESUMED was not allowed
The fix adds RESUMED as a valid transition from the STARTED state.
Co-authored-by: Giancarlo Buenaflor <giancarlobuenaflor97@gmail.com>1 parent 80672fe commit 3ebf05f
File tree
3 files changed
+30
-2
lines changed- sentry-android-replay/src
- main/java/io/sentry/android/replay
- test/java/io/sentry/android/replay
3 files changed
+30
-2
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
423 | 450 | | |
424 | 451 | | |
425 | 452 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | | - | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
0 commit comments