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
Copy file name to clipboardExpand all lines: features/dd-sdk-android-rum/src/main/kotlin/com/datadog/android/rum/internal/instrumentation/gestures/GesturesListener.kt
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -270,12 +270,12 @@ internal class GesturesListener(
270
270
addViewAttributes(view, attributes)
271
271
272
272
if (view.isAttachedToWindow) {
273
-
vallocationOnScreen=IntArray(2)
274
-
@Suppress("UnsafeThirdPartyFunctionCall") //locationOnScreen is non-null with exactly 2 elements
275
-
view.getLocationOnScreen(locationOnScreen)
273
+
vallocationInWindow=IntArray(2)
274
+
@Suppress("UnsafeThirdPartyFunctionCall") //locationInWindow is non-null with exactly 2 elements
275
+
view.getLocationInWindow(locationInWindow)
276
276
277
-
val relativeX = (touchX -locationOnScreen[0]).toLong()
278
-
val relativeY = (touchY -locationOnScreen[1]).toLong()
277
+
val relativeX = (touchX -locationInWindow[0]).toLong()
278
+
val relativeY = (touchY -locationInWindow[1]).toLong()
Copy file name to clipboardExpand all lines: features/dd-sdk-android-rum/src/test/kotlin/com/datadog/android/rum/internal/instrumentation/gestures/GesturesListenerTapTest.kt
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -837,13 +837,16 @@ internal class GesturesListenerTapTest : AbstractGesturesListenerTest() {
837
837
forge = forge,
838
838
clickable =true
839
839
)
840
-
// Mock getLocationOnScreen to return a specific position
0 commit comments