Skip to content

Commit

Permalink
fix: get event props null
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed Dec 28, 2023
1 parent eba2edd commit bdca10c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ open class CompositionAbService(
onAccessibilityEventHooks.add(f)

override fun onAccessibilityEvent(event: AccessibilityEvent?) {
if (event != null && event.eventType.and(interestedEvents) != 0) {
if (event != null &&
event.packageName != null &&
event.className != null &&
event.eventType.and(interestedEvents) != 0
) {
onAccessibilityEventHooks.forEach { f -> f(event) }
}
}
Expand Down

0 comments on commit bdca10c

Please sign in to comment.