Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -211,22 +211,16 @@ internal class AccessibilityInfoModule(context: ReactApplicationContext) :
private fun updateAndSendTouchExplorationChangeEvent(enabled: Boolean) {
if (touchExplorationEnabled != enabled) {
touchExplorationEnabled = enabled
val reactApplicationContext = getReactApplicationContextIfActiveOrWarn()
if (reactApplicationContext != null) {
getReactApplicationContext()
.emitDeviceEvent(TOUCH_EXPLORATION_EVENT_NAME, touchExplorationEnabled)
}
getReactApplicationContextIfActiveOrWarn()
?.emitDeviceEvent(TOUCH_EXPLORATION_EVENT_NAME, touchExplorationEnabled)
}
}

private fun updateAndSendAccessibilityServiceChangeEvent(enabled: Boolean) {
if (accessibilityServiceEnabled != enabled) {
accessibilityServiceEnabled = enabled
val reactApplicationContext = getReactApplicationContextIfActiveOrWarn()
if (reactApplicationContext != null) {
getReactApplicationContext()
.emitDeviceEvent(ACCESSIBILITY_SERVICE_EVENT_NAME, accessibilityServiceEnabled)
}
getReactApplicationContextIfActiveOrWarn()
?.emitDeviceEvent(ACCESSIBILITY_SERVICE_EVENT_NAME, accessibilityServiceEnabled)
}
}

Expand Down