Add emitting view to onChildStartedNativeGesture callback

Summary:
Changelog:
[Android][Changed] RootView's onChildStartedNativeGesture now takes the child view as its first argument

Reviewed By: philIip

Differential Revision: D31399515

fbshipit-source-id: b9438f6118e604a04799ef67d0b46303a06d6434
This commit is contained in:
Pieter De Baets
2021-10-21 03:42:03 -07:00
committed by Facebook GitHub Bot
parent e007c8a9de
commit 03e513de41
4 changed files with 20 additions and 6 deletions
@@ -184,7 +184,7 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
}
@Override
public void onChildStartedNativeGesture(MotionEvent androidEvent) {
public void onChildStartedNativeGesture(MotionEvent ev) {
if (mReactInstanceManager == null
|| !mIsAttachedToInstance
|| mReactInstanceManager.getCurrentReactContext() == null) {
@@ -200,10 +200,15 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
if (uiManager != null) {
EventDispatcher eventDispatcher = uiManager.getEventDispatcher();
mJSTouchDispatcher.onChildStartedNativeGesture(androidEvent, eventDispatcher);
mJSTouchDispatcher.onChildStartedNativeGesture(ev, eventDispatcher);
}
}
@Override
public void onChildStartedNativeGesture(View childView, MotionEvent ev) {
onChildStartedNativeGesture(ev);
}
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
dispatchJSTouchEvent(ev);