Skip to content

Commit 31f8702

Browse files
committed
fix(compose): pass clipBounds explicitly to avoid D8 desugaring mismatch
1 parent 740e4bf commit 31f8702

File tree

2 files changed

+6
-2
lines changed
  • sentry-android-replay/src/main/java/io/sentry/android/replay/util
  • sentry-compose/src/androidMain/kotlin/io/sentry/compose

2 files changed

+6
-2
lines changed

sentry-android-replay/src/main/java/io/sentry/android/replay/util/Nodes.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ internal fun LayoutCoordinates.boundsInWindow(rootCoordinates: LayoutCoordinates
167167
val rootWidth = root.size.width.toFloat()
168168
val rootHeight = root.size.height.toFloat()
169169

170-
val bounds = root.localBoundingBoxOf(this)
170+
// pass clipBounds explicitly to avoid the `localBoundingBoxOf$default` bridge that AGP 8.13's D8
171+
// desugars inconsistently on minSdk < 24
172+
val bounds = root.localBoundingBoxOf(this, true)
171173
val boundsLeft = bounds.left.fastCoerceIn(0f, rootWidth)
172174
val boundsTop = bounds.top.fastCoerceIn(0f, rootHeight)
173175
val boundsRight = bounds.right.fastCoerceIn(0f, rootWidth)

sentry-compose/src/androidMain/kotlin/io/sentry/compose/SentryComposeHelper.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ public fun LayoutCoordinates.boundsInWindow(rootCoordinates: LayoutCoordinates?)
8686
val rootWidth = root.size.width.toFloat()
8787
val rootHeight = root.size.height.toFloat()
8888

89-
val bounds = root.localBoundingBoxOf(this)
89+
// pass clipBounds explicitly to avoid the `localBoundingBoxOf$default` bridge that AGP 8.13's D8
90+
// desugars inconsistently on minSdk < 24
91+
val bounds = root.localBoundingBoxOf(this, true)
9092
val boundsLeft = bounds.left.fastCoerceIn(0f, rootWidth)
9193
val boundsTop = bounds.top.fastCoerceIn(0f, rootHeight)
9294
val boundsRight = bounds.right.fastCoerceIn(0f, rootWidth)

0 commit comments

Comments
 (0)