Remove OnGenericMotionListener from ImmersiveReactFragment

Differential Revision: D4150394

fbshipit-source-id: 0ed3e42e1bda38283c9e66adde703ee9f9a96e61
This commit is contained in:
Andrew Y. Chen 2016-11-08 16:50:53 -08:00 committed by Facebook Github Bot
parent f0a58af37b
commit 1e57d1156f

View File

@ -60,7 +60,6 @@ public class ReactRootView extends SizeMonitoringFrameLayout implements RootView
private @Nullable String mJSModuleName;
private @Nullable Bundle mLaunchOptions;
private @Nullable CustomGlobalLayoutListener mCustomGlobalLayoutListener;
private @Nullable OnGenericMotionListener mOnGenericMotionListener;
private int mRootViewTag;
private boolean mWasMeasured = false;
private boolean mIsAttachedToInstance = false;
@ -110,10 +109,6 @@ public class ReactRootView extends SizeMonitoringFrameLayout implements RootView
EventDispatcher eventDispatcher = reactContext.getNativeModule(UIManagerModule.class)
.getEventDispatcher();
mJSTouchDispatcher.onChildStartedNativeGesture(androidEvent, eventDispatcher);
// Hook for containers or fragments to get informed of the on touch events to perform actions.
if (mOnGenericMotionListener != null) {
mOnGenericMotionListener.onGenericMotion(this, androidEvent);
}
}
@Override
@ -131,10 +126,6 @@ public class ReactRootView extends SizeMonitoringFrameLayout implements RootView
return true;
}
public void setOnGenericMotionListener(OnGenericMotionListener listener) {
mOnGenericMotionListener = listener;
}
private void dispatchJSTouchEvent(MotionEvent event) {
if (mReactInstanceManager == null || !mIsAttachedToInstance ||
mReactInstanceManager.getCurrentReactContext() == null) {