Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

- Use logger from options for JVM profiler ([#4771](https://github.com/getsentry/sentry-java/pull/4771))
- Session Replay: Avoid deadlock when pausing replay if no connection ([#4788](https://github.com/getsentry/sentry-java/pull/4788))
- Session Replay: Fix capturing roots with no windows ([#4805](https://github.com/getsentry/sentry-java/pull/4805))
- Session Replay: Fix `java.lang.IllegalArgumentException: width and height must be > 0` ([#4805](https://github.com/getsentry/sentry-java/pull/4805))

### Miscellaneous

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ public data class ScreenshotRecorderConfig(
private fun Int.adjustToBlockSize(): Int {
val remainder = this % 16
return if (remainder <= 8) {
this - remainder
maxOf(16, this - remainder)
} else {
this + (16 - remainder)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ internal class WindowRecorder(
override fun onRootViewsChanged(root: View, added: Boolean) {
rootViewsLock.acquire().use {
if (added) {
if (root.phoneWindow == null) {
Comment thread
romtsn marked this conversation as resolved.
options.logger.log(WARNING, "Root view does not have a phone window, skipping.")
return
}

rootViews.add(WeakReference(root))
capturer?.recorder?.bind(root)
determineWindowSize(root)
Expand Down
Loading