Skip to content

Commit aee2bd7

Browse files
cortinicometa-codesync[bot]
authored andcommitted
Back out "Remove legacy architecture stub: UIImplementation"
Summary: Original commit changeset: 8a4bb015453f Original Phabricator Diff: D104991922 This broke one OSS library: react-native-safe-area-context and also broke our CI Reviewed By: javache Differential Revision: D105561831 fbshipit-source-id: 4b3632f9fb53857942a6830795117302cf185e00
1 parent c652815 commit aee2bd7

7 files changed

Lines changed: 429 additions & 9 deletions

File tree

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

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4206,6 +4206,63 @@ public abstract interface class com/facebook/react/uimanager/UIBlock {
42064206
public abstract fun execute (Lcom/facebook/react/uimanager/NativeViewHierarchyManager;)V
42074207
}
42084208

4209+
public class com/facebook/react/uimanager/UIImplementation {
4210+
protected fun <init> (Lcom/facebook/react/bridge/ReactApplicationContext;Lcom/facebook/react/uimanager/ViewManagerRegistry;Lcom/facebook/react/uimanager/UIViewOperationQueue;Lcom/facebook/react/uimanager/events/EventDispatcher;)V
4211+
public fun addUIBlock (Lcom/facebook/react/uimanager/UIBlock;)V
4212+
protected fun calculateRootLayout (Lcom/facebook/react/uimanager/ReactShadowNode;)V
4213+
public fun clearJSResponder ()V
4214+
public fun configureNextLayoutAnimation (Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Callback;)V
4215+
protected fun createRootShadowNode ()Lcom/facebook/react/uimanager/ReactShadowNode;
4216+
protected fun createShadowNode (Ljava/lang/String;)Lcom/facebook/react/uimanager/ReactShadowNode;
4217+
public fun createView (ILjava/lang/String;ILcom/facebook/react/bridge/ReadableMap;)V
4218+
public fun dispatchViewManagerCommand (IILcom/facebook/react/bridge/ReadableArray;)V
4219+
public fun dispatchViewManagerCommand (ILjava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
4220+
public fun dispatchViewUpdates (I)V
4221+
public fun findSubviewIn (IFFLcom/facebook/react/bridge/Callback;)V
4222+
public fun getProfiledBatchPerfCounters ()Ljava/util/Map;
4223+
public fun getRootViewNum ()I
4224+
protected fun handleCreateView (Lcom/facebook/react/uimanager/ReactShadowNode;ILcom/facebook/react/uimanager/ReactStylesDiffMap;)V
4225+
protected fun handleUpdateView (Lcom/facebook/react/uimanager/ReactShadowNode;Ljava/lang/String;Lcom/facebook/react/uimanager/ReactStylesDiffMap;)V
4226+
public fun manageChildren (ILcom/facebook/react/bridge/ReadableArray;Lcom/facebook/react/bridge/ReadableArray;Lcom/facebook/react/bridge/ReadableArray;Lcom/facebook/react/bridge/ReadableArray;Lcom/facebook/react/bridge/ReadableArray;)V
4227+
public fun measure (ILcom/facebook/react/bridge/Callback;)V
4228+
public fun measureInWindow (ILcom/facebook/react/bridge/Callback;)V
4229+
public fun measureLayout (IILcom/facebook/react/bridge/Callback;Lcom/facebook/react/bridge/Callback;)V
4230+
public fun measureLayoutRelativeToParent (ILcom/facebook/react/bridge/Callback;Lcom/facebook/react/bridge/Callback;)V
4231+
public fun onCatalystInstanceDestroyed ()V
4232+
public fun onHostDestroy ()V
4233+
public fun onHostPause ()V
4234+
public fun onHostResume ()V
4235+
public fun prependUIBlock (Lcom/facebook/react/uimanager/UIBlock;)V
4236+
public fun profileNextBatch ()V
4237+
public fun registerRootView (Landroid/view/View;ILcom/facebook/react/uimanager/ThemedReactContext;)V
4238+
public fun removeLayoutUpdateListener ()V
4239+
public fun removeRootShadowNode (I)V
4240+
public fun removeRootView (I)V
4241+
protected final fun removeShadowNode (Lcom/facebook/react/uimanager/ReactShadowNode;)V
4242+
public fun replaceExistingNonRootView (II)V
4243+
public fun resolveRootTagFromReactTag (I)I
4244+
public final fun resolveShadowNode (I)Lcom/facebook/react/uimanager/ReactShadowNode;
4245+
protected final fun resolveViewManager (Ljava/lang/String;)Lcom/facebook/react/uimanager/ViewManager;
4246+
public fun sendAccessibilityEvent (II)V
4247+
public fun setChildren (ILcom/facebook/react/bridge/ReadableArray;)V
4248+
public fun setJSResponder (IZ)V
4249+
public fun setLayoutAnimationEnabledExperimental (Z)V
4250+
public fun setLayoutUpdateListener (Lcom/facebook/react/uimanager/UIImplementation$LayoutUpdateListener;)V
4251+
public fun setViewLocalData (ILjava/lang/Object;)V
4252+
public fun synchronouslyUpdateViewOnUIThread (ILcom/facebook/react/uimanager/ReactStylesDiffMap;)V
4253+
public fun updateInsetsPadding (IIIII)V
4254+
public fun updateNodeSize (III)V
4255+
public fun updateRootView (III)V
4256+
public fun updateRootView (Lcom/facebook/react/uimanager/ReactShadowNode;II)V
4257+
public fun updateView (ILjava/lang/String;Lcom/facebook/react/bridge/ReadableMap;)V
4258+
protected fun updateViewHierarchy ()V
4259+
public fun viewIsDescendantOf (IILcom/facebook/react/bridge/Callback;)V
4260+
}
4261+
4262+
public abstract interface class com/facebook/react/uimanager/UIImplementation$LayoutUpdateListener {
4263+
public abstract fun onLayoutUpdated (Lcom/facebook/react/uimanager/ReactShadowNode;)V
4264+
}
4265+
42094266
public final class com/facebook/react/uimanager/UIManagerHelper {
42104267
public static final field INSTANCE Lcom/facebook/react/uimanager/UIManagerHelper;
42114268
public static final field PADDING_BOTTOM_INDEX I
@@ -4248,6 +4305,7 @@ public class com/facebook/react/uimanager/UIManagerModule : com/facebook/react/b
42484305
public fun getEventDispatcher ()Lcom/facebook/react/uimanager/events/EventDispatcher;
42494306
public fun getName ()Ljava/lang/String;
42504307
public fun getPerformanceCounters ()Ljava/util/Map;
4308+
public fun getUIImplementation ()Lcom/facebook/react/uimanager/UIImplementation;
42514309
public fun getViewManagerRegistry_DO_NOT_USE ()Lcom/facebook/react/uimanager/ViewManagerRegistry;
42524310
public fun initialize ()V
42534311
public fun invalidate ()V
@@ -4300,6 +4358,7 @@ public class com/facebook/react/uimanager/UIViewOperationQueue {
43004358
public fun enqueueDispatchCommand (IILcom/facebook/react/bridge/ReadableArray;)V
43014359
public fun enqueueDispatchCommand (ILjava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
43024360
public fun enqueueFindTargetForTouch (IFFLcom/facebook/react/bridge/Callback;)V
4361+
public fun enqueueLayoutUpdateFinished (Lcom/facebook/react/uimanager/ReactShadowNode;Lcom/facebook/react/uimanager/UIImplementation$LayoutUpdateListener;)V
43034362
public fun enqueueManageChildren (I[I[Lcom/facebook/react/uimanager/ViewAtIndex;[I)V
43044363
public fun enqueueMeasure (ILcom/facebook/react/bridge/Callback;)V
43054364
public fun enqueueMeasureInWindow (ILcom/facebook/react/bridge/Callback;)V

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/touch/ReactInterceptingViewGroup.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ package com.facebook.react.touch
1010
import android.view.ViewGroup
1111

1212
/**
13-
* This interface should be implemented by all [ViewGroup] subviews managed by React Native. It is
14-
* used to configure onInterceptTouch event listener which then is used to control touch event flow
15-
* in cases in which they requested to be intercepted by some parent view based on a JS gesture
16-
* detector.
13+
* This interface should be implemented by all [ViewGroup] subviews that can be instantiating by
14+
* [com.facebook.react.uimanager.NativeViewHierarchyManager]. It is used to configure
15+
* onInterceptTouch event listener which then is used to control touch event flow in cases in which
16+
* they requested to be intercepted by some parent view based on a JS gesture detector.
1717
*/
1818
internal interface ReactInterceptingViewGroup {
1919

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,10 @@ public class JSTouchDispatcher(private val viewGroup: ViewGroup) {
9898
FLog.e(ReactConstants.TAG, "Got DOWN touch before receiving UP or CANCEL from last gesture")
9999
}
100100

101-
// First event for this gesture. We expect tag to be set to -1, and we use
102-
// findTargetTagAndSetCoordinates to find the react view ID that will handle this gesture
101+
// First event for this gesture. We expect tag to be set to -1, and we use helper method
102+
// [com.facebook.react.uimanager.NativeViewHierarchyManager.findTargetTagForTouch] to find
103+
// react view ID that will be responsible for handling
104+
// this gesture
103105
childIsHandlingNativeGesture = false
104106
gestureStartTime = ev.eventTime
105107
targetTag = findTargetTagAndSetCoordinates(ev)

0 commit comments

Comments
 (0)