Migrate NativeViewHierarchyManager from Java to Kotlin#56828
Open
cortinico wants to merge 3 commits into
Open
Conversation
Summary: This class was fully stubbed out as part of the Legacy Architecture removal. All public methods had empty bodies or returned null/0, meaning any OSS library still referencing it was already silently broken at runtime. - `UIImplementation` — all methods empty stubs Also removes the dead `getUIImplementation()` method from `UIManagerModule`, and cleans up stale Javadoc references in `JSTouchDispatcher`, `ReactViewGroup`, and `ReactInterceptingViewGroup`. `UIBlock`, `NativeViewHierarchyManager`, `UIViewOperationQueue`, and the `addUIBlock`/`prependUIBlock` methods on `UIManagerModule` are retained and will be deprecated in a follow-up diff. Changelog: [Android][Removed] - Remove legacy architecture stub `UIImplementation`. This class was already non-functional (all methods were empty stubs). Differential Revision: D104991922
Summary: Deprecate `UIBlock`, `NativeViewHierarchyManager`, and the `addUIBlock`/`prependUIBlock` methods on `UIManagerModule`. These are legacy Paper architecture APIs that are already non-functional stubs. Libraries should migrate to `UIManagerListener` or View Commands. The Fabric replacement for `UIBlock` already exists at `com.facebook.react.fabric.interop.UIBlock` and uses `UIBlockViewResolver` instead of `NativeViewHierarchyManager`. Changelog: [Android][Deprecated] - Deprecate `UIBlock` interface and `UIManagerModule.addUIBlock`/`prependUIBlock` methods. Use `UIManagerListener` or View Commands instead. Differential Revision: D104995161
Summary: Mechanical migration of the deprecated `NativeViewHierarchyManager` stub class from Java to Kotlin. All methods remain empty stubs — no behavioral changes. Key migration decisions: - Class marked `open` to preserve subclassability from Java/Kotlin - All non-final public/protected methods marked `open` to match Java virtual-by-default - `resolveView` and `resolveViewManager` remain `final` (matching the Java original) - `Nullable` return types converted to Kotlin nullable types (`?`) - `synchronized` methods use `Synchronized` annotation - Static initializer converted to companion object `init` block Changelog: [Internal] Differential Revision: D104999732
|
@cortinico has exported this pull request. If you are a Meta employee, you can view the originating Diff in D104999732. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Mechanical migration of the deprecated
NativeViewHierarchyManagerstub class from Java to Kotlin. All methods remain empty stubs — no behavioral changes.Key migration decisions:
opento preserve subclassability from Java/Kotlinopento match Java virtual-by-defaultresolveViewandresolveViewManagerremainfinal(matching the Java original)Nullablereturn types converted to Kotlin nullable types (?)synchronizedmethods useSynchronizedannotationinitblockChangelog:
[Internal]
Differential Revision: D104999732