You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7d64c27
Browse filesBrowse the repository at this point in the historyBrowse files
ref(android): Confine replay lifecycle to main thread (#5965)
* ref(android): Confine replay lifecycle to main thread
Serialize replay lifecycle mutations on Android's main thread and keep replay cache cleanup ordered on the replay executor. Remove locks that could block lifecycle callbacks while preserving shutdown ordering.
Refs JAVA-665
Co-Authored-By: OpenAI Codex <noreply@openai.com>
* changelog
* ref(android): Simplify replay main-thread state management
Keep replay lifecycle state in one atomic value and serialize lifecycle transitions through the main looper. Return the replay ID synchronously so triggering events remain correlated while capture is deferred.
Refs JAVA-665
Refs JAVA-656
Co-Authored-By: Codex <noreply@openai.com>
* fix(android): Mark replay terminating synchronously
Ensure terminating capture reaches the active replay strategy before a main-thread crash blocks the looper while flushing.
Co-Authored-By: Codex <noreply@openai.com>
* ref(android): Use thread checker for replay close
Use the configured thread checker for replay shutdown decisions so tests can control main-thread behavior through the existing abstraction.
Co-Authored-By: Codex <noreply@openai.com>
* fix(android): Preserve replay cleanup after close timeout
Keep executor cleanup queued behind main-thread replay teardown when a background close reaches its timeout. This prevents delayed teardown from submitting work to an executor that has already been shut down.
Co-Authored-By: Codex <noreply@openai.com>
* test(android): Await queued replay initialization
Drain the main looper before asserting replay startup state now that lifecycle commands are always queued.
Co-Authored-By: Codex <noreply@openai.com>
* fix(replay): Clear stale replay ID after stopped capture
Clear the scope replay ID when a queued capture discovers its replay was stopped or
restarted. Preserve any newer replay ID by checking the expected ID before clearing.
Refs JAVA-665
Co-Authored-By: Codex <noreply@openai.com>
---------
Co-authored-by: OpenAI Codex <noreply@openai.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,13 @@
2
2
3
3
## Unreleased
4
4
5
+
### Fixes
6
+
7
+
- Prevent a class of Session Replay deadlocks by confining lifecycle state changes to Android's main thread ([#5965](https://github.com/getsentry/sentry-java/pull/5965))
8
+
5
9
### Performance
6
10
11
+
- Defer starting Session Replay off the SDK initialization critical path ([#5965](https://github.com/getsentry/sentry-java/pull/5965))
7
12
- Use manifest metadata resolved at build time to reduce Android SDK initialization overhead ([#5976](https://github.com/getsentry/sentry-java/pull/5976))
Copy file name to clipboardExpand all lines: sentry-android-replay/api/sentry-android-replay.api
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ public final class io/sentry/android/replay/ReplayIntegration : io/sentry/IConne
58
58
public fun <init> (Landroid/content/Context;Lio/sentry/transport/ICurrentDateProvider;)V
59
59
public fun <init> (Landroid/content/Context;Lio/sentry/transport/ICurrentDateProvider;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;)V
60
60
public synthetic fun <init> (Landroid/content/Context;Lio/sentry/transport/ICurrentDateProvider;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
61
-
public fun captureReplay (Ljava/lang/Boolean;)V
61
+
public fun captureReplay (Ljava/lang/Boolean;)Lio/sentry/protocol/SentryId;
0 commit comments