Skip to content

Commit 470ace0

Browse files
mdvaccafacebook-github-bot
authored andcommitted
Expose JSResponderHandler API in Fabric UIManager
Summary: This diff adds the new API required to implment JSResponderHandler in FabricUIManager The new API differs from the old API, but since setJSResponder is called ONLY from JS it's not necessary to have this method as part of UIManager interface. Reviewed By: JoshuaGross Differential Revision: D16543440 fbshipit-source-id: ca4bd4c1e4df706cda0eb16798e01f3350558d06
1 parent d123bea commit 470ace0

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

ReactAndroid/src/main/java/com/facebook/react/bridge/UIManager.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ <T extends View> int addRootView(
4343
*/
4444
void dispatchCommand(int reactTag, String commandId, @Nullable ReadableArray commandArgs);
4545

46-
void setJSResponder(int reactTag, boolean blockNativeResponder);
47-
48-
void clearJSResponder();
49-
5046
/**
5147
* Used by native animated module to bypass the process of updating the values through the shadow
5248
* view hierarchy. This method will directly update native views, which means that updates for

ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -559,12 +559,19 @@ public void dispatchCommand(
559559
}
560560
}
561561

562-
@Override
563-
public void setJSResponder(int reactTag, boolean blockNativeResponder) {
562+
/**
563+
* Set the JS responder for the view associated with the tags received as a parameter.
564+
*
565+
* @param reactTag React tag of the first parent of the view that is NOT virtual
566+
* @param initialReactTag React tag of the JS view that initiated the touch operation
567+
* @param blockNativeResponder If native responder should be blocked or not
568+
*/
569+
@DoNotStrip
570+
public void setJSResponder(
571+
final int reactTag, final int initialReactTag, final boolean blockNativeResponder) {
564572
// do nothing for now.
565573
}
566574

567-
@Override
568575
public void clearJSResponder() {
569576
// do nothing for now.
570577
}

ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,13 +650,11 @@ public void viewIsDescendantOf(
650650
mUIImplementation.viewIsDescendantOf(reactTag, ancestorReactTag, callback);
651651
}
652652

653-
@Override
654653
@ReactMethod
655654
public void setJSResponder(int reactTag, boolean blockNativeResponder) {
656655
mUIImplementation.setJSResponder(reactTag, blockNativeResponder);
657656
}
658657

659-
@Override
660658
@ReactMethod
661659
public void clearJSResponder() {
662660
mUIImplementation.clearJSResponder();

0 commit comments

Comments
 (0)