Skip to content

Migrate NativeViewHierarchyManager from Java to Kotlin#56828

Open
cortinico wants to merge 3 commits into
facebook:mainfrom
cortinico:export-D104999732
Open

Migrate NativeViewHierarchyManager from Java to Kotlin#56828
cortinico wants to merge 3 commits into
facebook:mainfrom
cortinico:export-D104999732

Conversation

@cortinico
Copy link
Copy Markdown
Contributor

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 and others added 3 commits May 14, 2026 03:11
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
@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 May 14, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented May 14, 2026

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

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 meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant