Fix setJSResponder for Fabric
Summary: Before this fix, ReactNative screens that uses the Fabric renderer crashes when an event is dispatched. The root cause of the bug is that React JS executes the setJSResponder method in UIManagerModule, but this method is not implemented yet in Fabric. This fix will have to be picked into current RC to fix events into the City Guides screen running the Fabric experiment Reviewed By: fkgozali Differential Revision: D8515300 fbshipit-source-id: 40fe2f77987470abed8164f848680a911efa4bd2
This commit is contained in:
parent
5f9a2117bf
commit
c6a52b6db6
|
@ -10,7 +10,6 @@ package com.facebook.react.uimanager;
|
|||
import static com.facebook.react.bridge.ReactMarkerConstants.CREATE_UI_MANAGER_MODULE_CONSTANTS_END;
|
||||
import static com.facebook.react.bridge.ReactMarkerConstants.CREATE_UI_MANAGER_MODULE_CONSTANTS_START;
|
||||
import static com.facebook.react.uimanager.common.UIManagerType.DEFAULT;
|
||||
import static com.facebook.react.uimanager.common.UIManagerType.FABRIC;
|
||||
|
||||
import android.content.ComponentCallbacks2;
|
||||
import android.content.Context;
|
||||
|
@ -25,9 +24,7 @@ import com.facebook.react.bridge.Callback;
|
|||
import com.facebook.react.bridge.GuardedRunnable;
|
||||
import com.facebook.react.bridge.LifecycleEventListener;
|
||||
import com.facebook.react.bridge.OnBatchCompleteListener;
|
||||
import com.facebook.react.bridge.PerformanceCounter;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.bridge.ReactContext;
|
||||
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
||||
import com.facebook.react.bridge.ReactMarker;
|
||||
import com.facebook.react.bridge.ReactMethod;
|
||||
|
@ -40,7 +37,6 @@ import com.facebook.react.common.ReactConstants;
|
|||
import com.facebook.react.module.annotations.ReactModule;
|
||||
import com.facebook.react.uimanager.common.MeasureSpecProvider;
|
||||
import com.facebook.react.uimanager.common.SizeMonitoringFrameLayout;
|
||||
import com.facebook.react.uimanager.common.UIManagerType;
|
||||
import com.facebook.react.uimanager.common.ViewUtil;
|
||||
import com.facebook.react.uimanager.debug.NotThreadSafeViewHierarchyUpdateDebugListener;
|
||||
import com.facebook.react.uimanager.events.EventDispatcher;
|
||||
|
@ -595,9 +591,9 @@ public class UIManagerModule extends ReactContextBaseJavaModule implements
|
|||
int uiManagerType = ViewUtil.getUIManagerType(reactTag);
|
||||
if (uiManagerType != DEFAULT) {
|
||||
UIManagerHelper.getUIManager(getReactApplicationContext(), uiManagerType).setJSResponder(reactTag, blockNativeResponder);
|
||||
} else {
|
||||
mUIImplementation.setJSResponder(reactTag, blockNativeResponder);
|
||||
}
|
||||
|
||||
mUIImplementation.setJSResponder(reactTag, blockNativeResponder);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue