Skip to content

Commit e7b8a60

Browse files
sammy-SCmeta-codesync[bot]
authored andcommitted
Remove dead test-only method simulateAttachForTesting from ReactRootView
Summary: `ReactRootView.simulateAttachForTesting()` was a package-private `VisibleForTesting` helper that set up the attach flags and dispatchers, but no test or production code ever called it. `RootViewTest` exercises `startReactApplication`/`unmountReactApplication` and the sibling `simulateCheckForKeyboardForTesting`, never this method. This removes the orphaned helper. Changelog: [Internal] Differential Revision: D108012908
1 parent 4488b71 commit e7b8a60

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -776,22 +776,6 @@ public void runApplication() {
776776
}
777777
}
778778

779-
/**
780-
* Is used by unit test to setup mIsAttachedToWindow flags, that will let this view to be properly
781-
* attached to catalyst instance by startReactApplication call
782-
*/
783-
@VisibleForTesting
784-
/* package */ void simulateAttachForTesting() {
785-
mIsAttachedToInstance = true;
786-
mJSTouchDispatcher = new JSTouchDispatcher(this);
787-
if (ReactFeatureFlags.dispatchPointerEvents) {
788-
mJSPointerDispatcher = new JSPointerDispatcher(this);
789-
}
790-
if (ReactNativeFeatureFlags.enableKeyEvents()) {
791-
mJSKeyDispatcher = new JSKeyDispatcher();
792-
}
793-
}
794-
795779
@VisibleForTesting
796780
/* package */ void simulateCheckForKeyboardForTesting() {
797781
getCustomGlobalLayoutListener().checkForKeyboardEvents();

0 commit comments

Comments
 (0)