From 2e6eea8390ebcf6f03637050907c78f3e0d4bc05 Mon Sep 17 00:00:00 2001 From: Joshua Gross Date: Wed, 2 Dec 2020 20:07:57 -0800 Subject: [PATCH] Remove enableStopSurfaceOnRootViewUnmount feature flag Summary: This feature flag (enableStopSurfaceOnRootViewUnmount) was used to gate usage of the "stopSurface" API, which is now fully supported, and has been used in the FB app for several months. This is safe to ship in code. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D25275192 fbshipit-source-id: fa22bfd00aa023297bc19c83c138f133e9ff1645 --- .../src/main/java/com/facebook/react/ReactRootView.java | 3 +-- .../main/java/com/facebook/react/config/ReactFeatureFlags.java | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java b/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java index b48c71ccdd69bb..d15ad24067a87d 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java +++ b/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java @@ -41,7 +41,6 @@ import com.facebook.react.bridge.WritableMap; import com.facebook.react.bridge.WritableNativeMap; import com.facebook.react.common.annotations.VisibleForTesting; -import com.facebook.react.config.ReactFeatureFlags; import com.facebook.react.modules.appregistry.AppRegistry; import com.facebook.react.modules.core.DeviceEventManagerModule; import com.facebook.react.modules.deviceinfo.DeviceInfoModule; @@ -489,7 +488,7 @@ public void unmountReactApplication() { // to be committed via the Scheduler, which will cause mounting instructions // to be queued up and synchronously executed to delete and remove // all the views in the hierarchy. - if (mReactInstanceManager != null && ReactFeatureFlags.enableStopSurfaceOnRootViewUnmount) { + if (mReactInstanceManager != null) { final ReactContext reactApplicationContext = mReactInstanceManager.getCurrentReactContext(); if (reactApplicationContext != null && getUIManagerType() == FABRIC) { @Nullable diff --git a/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java b/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java index 58ffe7db73a844..1fa7e75571b5a5 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +++ b/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java @@ -74,9 +74,6 @@ public class ReactFeatureFlags { /** Feature flag to configure eager initialization of Fabric */ public static boolean eagerInitializeFabric = false; - /** Feature flag to use stopSurface when ReactRootView is unmounted. */ - public static boolean enableStopSurfaceOnRootViewUnmount = false; - /** Use experimental SetState retry mechanism in view? */ public static boolean enableExperimentalStateUpdateRetry = false;