Skip to content

Commit ad225ff

Browse files
authored
Merge 16b9fff into 740e4bf
2 parents 740e4bf + 16b9fff commit ad225ff

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
### Fixes
6+
7+
- Fix `NoSuchMethodError` for `LayoutCoordinates.localBoundingBoxOf$default` on Compose touch dispatch with AGP 8.13 and `minSdk < 24` ([#5302](https://github.com/getsentry/sentry-java/pull/5302))
8+
39
## 8.39.1
410

511
### Fixes

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)