Skip to content

Commit c6dd6f9

Browse files
cortinicometa-codesync[bot]
authored andcommitted
Migrate NativeViewHierarchyManager from Java to Kotlin (#56828)
Summary: Pull Request resolved: #56828 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] Reviewed By: christophpurrer Differential Revision: D104999732 fbshipit-source-id: 9ef9da7f114cf32844a4761d130e1a86cedd606a
1 parent 935f8e5 commit c6dd6f9

3 files changed

Lines changed: 188 additions & 223 deletions

File tree

packages/react-native/ReactAndroid/api/ReactAndroid.api

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3457,8 +3457,8 @@ public final class com/facebook/react/uimanager/MeasureSpecAssertions {
34573457
}
34583458

34593459
public class com/facebook/react/uimanager/NativeViewHierarchyManager {
3460+
public static final field Companion Lcom/facebook/react/uimanager/NativeViewHierarchyManager$Companion;
34603461
public fun <init> (Lcom/facebook/react/uimanager/ViewManagerRegistry;)V
3461-
public fun <init> (Lcom/facebook/react/uimanager/ViewManagerRegistry;Lcom/facebook/react/uimanager/RootViewManager;)V
34623462
public fun addRootView (ILandroid/view/View;)V
34633463
protected final fun addRootViewGroup (ILandroid/view/View;)V
34643464
public fun clearJSResponder ()V
@@ -3469,7 +3469,6 @@ public class com/facebook/react/uimanager/NativeViewHierarchyManager {
34693469
public fun findTargetTagForTouch (IFF)I
34703470
public fun getInstanceHandle (I)J
34713471
public fun getRootViewNum ()I
3472-
public fun manageChildren (I[I[Lcom/facebook/react/uimanager/ViewAtIndex;[I)V
34733472
public fun measure (I[I)V
34743473
public fun measureInWindow (I[I)V
34753474
public fun removeRootView (I)V
@@ -3486,6 +3485,9 @@ public class com/facebook/react/uimanager/NativeViewHierarchyManager {
34863485
public fun updateViewExtraData (ILjava/lang/Object;)V
34873486
}
34883487

3488+
public final class com/facebook/react/uimanager/NativeViewHierarchyManager$Companion {
3489+
}
3490+
34893491
public final class com/facebook/react/uimanager/NativeViewHierarchyOptimizer {
34903492
public fun <init> ()V
34913493
}

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

Lines changed: 0 additions & 221 deletions
This file was deleted.

0 commit comments

Comments
 (0)