Skip to content

Commit 925d3d4

Browse files
sammy-SCmeta-codesync[bot]
authored andcommitted
Remove dead test-only method simulateAttachForTesting from ReactRootView
Summary: X-link: #57136 `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] Reviewed By: mdvacca Differential Revision: D108012908 fbshipit-source-id: ee550f66fae07bfeb75fd59b85d5d812fea7e2c1
1 parent cc23193 commit 925d3d4

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)