Pass blockNativeResponder param to setIsJSResponder

Summary:
The non-Fabric API has a `blockNativeResponder` param in setJSResponder. Make sure to pass that along in Fabric.

On Android this allows us to respect the flag and do the same thing non-Fabric was doing if `blockNativeResponder` is false. It's not clear yet what the impact is on iOS.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D27058806

fbshipit-source-id: aa5074fa46191d78f5292a93d9040ab4bb58ca66
This commit is contained in:
Joshua Gross
2021-03-15 18:37:36 -07:00
committed by Facebook GitHub Bot
parent 07f9d21131
commit 9c1926051e
10 changed files with 24 additions and 13 deletions
@@ -1189,7 +1189,8 @@ void Binding::schedulerDidSendAccessibilityEvent(
void Binding::schedulerDidSetIsJSResponder(
ShadowView const &shadowView,
bool isJSResponder) {
bool isJSResponder,
bool blockNativeResponder) {
jni::global_ref<jobject> localJavaUIManager = getJavaUIManager();
if (!localJavaUIManager) {
LOG(ERROR) << "Binding::schedulerSetJSResponder: JavaUIManager disappeared";
@@ -1214,7 +1215,7 @@ void Binding::schedulerDidSetIsJSResponder(
// be flattened because the only component that uses this feature -
// ScrollView - cannot be flattened.
shadowView.tag,
(jboolean) true);
(jboolean)blockNativeResponder);
} else {
clearJSResponder(localJavaUIManager);
}
@@ -147,7 +147,8 @@ class Binding : public jni::HybridClass<Binding>,
void schedulerDidSetIsJSResponder(
ShadowView const &shadowView,
bool isJSResponder) override;
bool isJSResponder,
bool blockNativeResponder) override;
void setPixelDensity(float pointScaleFactor);