File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
sentry-android-replay/src/main/java/io/sentry/android/replay Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 1919- Avoid StrictMode warnings ([#4724](https://github.com/getsentry/sentry-java/pull/4724))
2020- Use logger from options for JVM profiler ([#4771](https://github.com/getsentry/sentry-java/pull/4771))
2121- Session Replay: Avoid deadlock when pausing replay if no connection ([#4788](https://github.com/getsentry/sentry-java/pull/4788))
22+ - Session Replay: Fix capturing roots with no windows ([#4805](https://github.com/getsentry/sentry-java/pull/4805))
23+ - Session Replay: Fix `java.lang.IllegalArgumentException: width and height must be > 0` ([#4805](https://github.com/getsentry/sentry-java/pull/4805))
2224
2325### Miscellaneous
2426
Original file line number Diff line number Diff line change @@ -289,7 +289,7 @@ public data class ScreenshotRecorderConfig(
289289 private fun Int.adjustToBlockSize (): Int {
290290 val remainder = this % 16
291291 return if (remainder <= 8 ) {
292- this - remainder
292+ maxOf( 16 , this - remainder)
293293 } else {
294294 this + (16 - remainder)
295295 }
Original file line number Diff line number Diff line change @@ -110,6 +110,11 @@ internal class WindowRecorder(
110110 override fun onRootViewsChanged (root : View , added : Boolean ) {
111111 rootViewsLock.acquire().use {
112112 if (added) {
113+ if (root.phoneWindow == null ) {
114+ options.logger.log(WARNING , " Root view does not have a phone window, skipping." )
115+ return
116+ }
117+
113118 rootViews.add(WeakReference (root))
114119 capturer?.recorder?.bind(root)
115120 determineWindowSize(root)
You can’t perform that action at this time.
0 commit comments