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: integrations/dd-sdk-android-compose/src/main/kotlin/com/datadog/android/compose/internal/utils/LayoutNodeUtils.kt
+9-5Lines changed: 9 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,7 @@ internal class LayoutNodeUtils {
52
52
}
53
53
} else {
54
54
when (modifier::class.qualifiedName) {
55
+
CLASS_NAME_SELECTABLE_ELEMENT,
55
56
CLASS_NAME_CLICKABLE_ELEMENT,
56
57
CLASS_NAME_COMBINED_CLICKABLE_ELEMENT-> {
57
58
role = role ?: getRole(modifier)
@@ -87,11 +88,12 @@ internal class LayoutNodeUtils {
87
88
}
88
89
89
90
@Suppress("UnsafeThirdPartyFunctionCall")
90
-
// Function is wrapped with `runSafe` in the call site.
91
-
privatefungetRole(obj:Any): Role {
92
-
val roleField = obj::class.java.getDeclaredField("role")
93
-
roleField.isAccessible =true
94
-
return roleField.get(obj) asRole
91
+
privatefungetRole(obj:Any): Role? {
92
+
return runSafe {
93
+
val roleField = obj::class.java.getDeclaredField("role")
0 commit comments