diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java b/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java index e0947264fd959a..5f3a34038bed36 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java @@ -182,9 +182,6 @@ public void onFabricCommitEnd(DevToolsReactPerfLogger.FabricCommitPoint commitPo */ private volatile boolean mDestroyed = false; - // TODO T83943316: Delete this variable once StaticViewConfigs are enabled by default - private volatile boolean mShouldDeallocateEventDispatcher = false; - private boolean mDriveCxxAnimations = false; private long mDispatchViewUpdatesTime = 0l; @@ -209,28 +206,6 @@ public void executeItems(Queue items) { } }; - // TODO T83943316: Deprecate and delete this constructor once StaticViewConfigs are enabled by - // default - @Deprecated - public FabricUIManager( - ReactApplicationContext reactContext, - ViewManagerRegistry viewManagerRegistry, - EventDispatcher eventDispatcher, - EventBeatManager eventBeatManager) { - mDispatchUIFrameCallback = new DispatchUIFrameCallback(reactContext); - mReactApplicationContext = reactContext; - mMountingManager = new MountingManager(viewManagerRegistry, mMountItemExecutor); - mMountItemDispatcher = - new MountItemDispatcher(mMountingManager, new MountItemDispatchListener()); - mEventDispatcher = eventDispatcher; - mShouldDeallocateEventDispatcher = false; - mEventBeatManager = eventBeatManager; - mReactApplicationContext.addLifecycleEventListener(this); - - mViewManagerRegistry = viewManagerRegistry; - mReactApplicationContext.registerComponentCallbacks(viewManagerRegistry); - } - public FabricUIManager( ReactApplicationContext reactContext, ViewManagerRegistry viewManagerRegistry, @@ -241,7 +216,6 @@ public FabricUIManager( mMountItemDispatcher = new MountItemDispatcher(mMountingManager, new MountItemDispatchListener()); mEventDispatcher = new EventDispatcherImpl(reactContext); - mShouldDeallocateEventDispatcher = true; mEventBeatManager = eventBeatManager; mReactApplicationContext.addLifecycleEventListener(this); @@ -467,10 +441,11 @@ public void onCatalystInstanceDestroy() { ViewManagerPropertyUpdater.clear(); - // When using StaticViewConfigs is enabled, FabriUIManager is - // responsible for initializing and deallocating EventDispatcher. + // When StaticViewConfigs is enabled, FabriUIManager is + // responsible for initializing and deallocating EventDispatcher. StaticViewConfigs is enabled + // only in Bridgeless for now. // TODO T83943316: Remove this IF once StaticViewConfigs are enabled by default - if (mShouldDeallocateEventDispatcher) { + if (!ReactFeatureFlags.enableBridgelessArchitecture) { mEventDispatcher.onCatalystInstanceDestroyed(); } }