Skip to content

Stub UIImplementation and clean up usages#55759

Closed
mdvacca wants to merge 2 commits intofacebook:mainfrom
mdvacca:export-D93806249
Closed

Stub UIImplementation and clean up usages#55759
mdvacca wants to merge 2 commits intofacebook:mainfrom
mdvacca:export-D93806249

Conversation

@mdvacca
Copy link
Copy Markdown
Contributor

@mdvacca mdvacca commented Feb 25, 2026

Summary:
Continuing the Legacy Architecture cleanup, this diff stubs out UIImplementation by removing all fields, private methods, and method body implementations while keeping all public/protected method signatures with empty bodies. The primary consumer UIManagerModule is cleaned up to no longer reference UIImplementation — all delegating methods become empty stubs, and getConstantsForViewManager now uses mViewManagerRegistry directly.

Same pattern as NativeViewHierarchyManager (D93801180) and UIViewOperationQueue (D93069524).

Changes:

  • UIImplementation.java: Remove all fields and private methods. Both constructors become empty. All public/protected methods retain signatures with empty bodies returning null/0/empty map as appropriate. LayoutUpdateListener interface preserved.
  • UIManagerModule.java: Remove mUIImplementation field and getUIImplementation() method. All methods that delegated to UIImplementation become empty stubs, retaining only non-UIImplementation logic (event dispatcher teardown, Fabric sendAccessibilityEvent branch, debug logging, ViewUtil.isRootTag for resolveRootTagFromReactTag).
  • ReactAndroid.api: Remove 5 protected fields from UIImplementation, remove getUIImplementation() from UIManagerModule.

Reviewed By: NickGerleman

Differential Revision: D93806249

Summary:

Stub out NativeViewHierarchyManager by removing all fields, private methods, and method body implementations while keeping all public method signatures with empty bodies for backward compatibility with third-party libraries. This follows the same pattern used for UIViewOperationQueue in D93069524.

Also clean up direct usages:
- UIViewOperationQueue: remove NativeViewHierarchyManager constructor parameter and getNativeViewHierarchyManager() method
- UIImplementation: stop creating NativeViewHierarchyManager instance
- ReactAndroid.api: update API surface to reflect constructor change

UIBlock.kt is left unchanged — its execute(NativeViewHierarchyManager) signature is kept for backward compatibility with third-party libraries (expo-modules-core, react-native-maps, gesture-handler, view-shot).

Changelog: [Android][Removed] - Stub out NativeViewHierarchyManager (Legacy Architecture)

Reviewed By: NickGerleman

Differential Revision: D93801180
Summary:
Continuing the Legacy Architecture cleanup, this diff stubs out UIImplementation by removing all fields, private methods, and method body implementations while keeping all public/protected method signatures with empty bodies. The primary consumer UIManagerModule is cleaned up to no longer reference UIImplementation — all delegating methods become empty stubs, and getConstantsForViewManager now uses mViewManagerRegistry directly.

Same pattern as NativeViewHierarchyManager (D93801180) and UIViewOperationQueue (D93069524).

Changes:
- UIImplementation.java: Remove all fields and private methods. Both constructors become empty. All public/protected methods retain signatures with empty bodies returning null/0/empty map as appropriate. LayoutUpdateListener interface preserved.
- UIManagerModule.java: Remove mUIImplementation field and getUIImplementation() method. All methods that delegated to UIImplementation become empty stubs, retaining only non-UIImplementation logic (event dispatcher teardown, Fabric sendAccessibilityEvent branch, debug logging, ViewUtil.isRootTag for resolveRootTagFromReactTag).
- ReactAndroid.api: Remove 5 protected fields from UIImplementation, remove getUIImplementation() from UIManagerModule.

Reviewed By: NickGerleman

Differential Revision: D93806249
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 25, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Feb 25, 2026

@mdvacca has exported this pull request. If you are a Meta employee, you can view the originating Diff in D93806249.

@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Feb 26, 2026

This pull request has been merged in fbe15f6.

zoontek pushed a commit to zoontek/react-native that referenced this pull request Mar 9, 2026
Summary:
changelog: [Android][Breaking] stub UIImplementation class, this class is unused in the new architecture

Pull Request resolved: facebook#55759

Continuing the Legacy Architecture cleanup, this diff stubs out UIImplementation by removing all fields, private methods, and method body implementations while keeping all public/protected method signatures with empty bodies. The primary consumer UIManagerModule is cleaned up to no longer reference UIImplementation — all delegating methods become empty stubs, and getConstantsForViewManager now uses mViewManagerRegistry directly.

Same pattern as NativeViewHierarchyManager (D93801180) and UIViewOperationQueue (D93069524).

Changes:
- UIImplementation.java: Remove all fields and private methods. Both constructors become empty. All public/protected methods retain signatures with empty bodies returning null/0/empty map as appropriate. LayoutUpdateListener interface preserved.
- UIManagerModule.java: Remove mUIImplementation field and getUIImplementation() method. All methods that delegated to UIImplementation become empty stubs, retaining only non-UIImplementation logic (event dispatcher teardown, Fabric sendAccessibilityEvent branch, debug logging, ViewUtil.isRootTag for resolveRootTagFromReactTag).
- ReactAndroid.api: Remove 5 protected fields from UIImplementation, remove getUIImplementation() from UIManagerModule.

Reviewed By: NickGerleman

Differential Revision: D93806249

fbshipit-source-id: aed59fb824d021733306f9957dfb4c057aae08d3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants