mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Clean up useEditTextStockAndroidFocusBehavior feature flag (#51039)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51039 We added a feature flag in case this broke things. Its been about 4 months now with now issues, I think we can clean this up. Changelog: [Android][Fixed] - Can now focus TextInput with keyboard Reviewed By: NickGerleman Differential Revision: D73954790 fbshipit-source-id: 4682cf709aa2f34ba69e76a35d07a908edb28f23
This commit is contained in:
1 parent
6fa1864d52
commit
e00028f6bb
22 files changed
+30
-189
No files matched your search
@@ -6600,7 +6600,6 @@ public class com/facebook/react/views/textinput/ReactEditText : androidx/appcomp
|
||||
public fun onTextContextMenuItem (I)Z
|
||||
public fun onTouchEvent (Landroid/view/MotionEvent;)Z
|
||||
public fun removeTextChangedListener (Landroid/text/TextWatcher;)V
|
||||
public fun requestFocus (ILandroid/graphics/Rect;)Z
|
||||
public final fun requestFocusFromJS ()V
|
||||
public final fun setAllowFontScaling (Z)V
|
||||
public final fun setAutoFocus (Z)V
|
||||
|
||||
+1
-7
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<991cfdadfc26e470da425a986d75c766>>
|
||||
* @generated SignedSource<<b86b8bb1d53ca03240c25adb8b423040>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -258,12 +258,6 @@ public object ReactNativeFeatureFlags {
|
||||
@JvmStatic
|
||||
public fun useAlwaysAvailableJSErrorHandling(): Boolean = accessor.useAlwaysAvailableJSErrorHandling()
|
||||
|
||||
/**
|
||||
* If true, focusing in ReactEditText will mainly use stock Android requestFocus() behavior. If false it will use legacy custom focus behavior.
|
||||
*/
|
||||
@JvmStatic
|
||||
public fun useEditTextStockAndroidFocusBehavior(): Boolean = accessor.useEditTextStockAndroidFocusBehavior()
|
||||
|
||||
/**
|
||||
* Should this application enable the Fabric Interop Layer for Android? If yes, the application will behave so that it can accept non-Fabric components and render them on Fabric. This toggle is controlling extra logic such as custom event dispatching that are needed for the Fabric Interop Layer to work correctly.
|
||||
*/
|
||||
|
||||
+1
-11
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<65268cf15face782370694a2a5bd8c3f>>
|
||||
* @generated SignedSource<<9c1e0e7e87aead96e2554ef5ecf9e7af>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -58,7 +58,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
||||
private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null
|
||||
private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
|
||||
private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
|
||||
private var useEditTextStockAndroidFocusBehaviorCache: Boolean? = null
|
||||
private var useFabricInteropCache: Boolean? = null
|
||||
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
|
||||
private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null
|
||||
@@ -409,15 +408,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun useEditTextStockAndroidFocusBehavior(): Boolean {
|
||||
var cached = useEditTextStockAndroidFocusBehaviorCache
|
||||
if (cached == null) {
|
||||
cached = ReactNativeFeatureFlagsCxxInterop.useEditTextStockAndroidFocusBehavior()
|
||||
useEditTextStockAndroidFocusBehaviorCache = cached
|
||||
}
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun useFabricInterop(): Boolean {
|
||||
var cached = useFabricInteropCache
|
||||
if (cached == null) {
|
||||
|
||||
+1
-3
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<6650ca57c9b43c16506ea8a95cf95b8a>>
|
||||
* @generated SignedSource<<b95c0d1f576b67fcf9d9df498ea30994>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -104,8 +104,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun useAlwaysAvailableJSErrorHandling(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun useEditTextStockAndroidFocusBehavior(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun useFabricInterop(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun useNativeViewConfigsInBridgelessMode(): Boolean
|
||||
|
||||
+1
-3
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<906ab78c1c4099bc4711c102885becd0>>
|
||||
* @generated SignedSource<<c7425e6212e4e9d70e64452e550bf638>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -99,8 +99,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
||||
|
||||
override fun useAlwaysAvailableJSErrorHandling(): Boolean = false
|
||||
|
||||
override fun useEditTextStockAndroidFocusBehavior(): Boolean = true
|
||||
|
||||
override fun useFabricInterop(): Boolean = true
|
||||
|
||||
override fun useNativeViewConfigsInBridgelessMode(): Boolean = false
|
||||
|
||||
+1
-12
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<aa86a9c0807638f1f44ced69462b1d17>>
|
||||
* @generated SignedSource<<5b145ee103cf6b40e13d33c88cd52777>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -62,7 +62,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
||||
private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null
|
||||
private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
|
||||
private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
|
||||
private var useEditTextStockAndroidFocusBehaviorCache: Boolean? = null
|
||||
private var useFabricInteropCache: Boolean? = null
|
||||
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
|
||||
private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null
|
||||
@@ -451,16 +450,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun useEditTextStockAndroidFocusBehavior(): Boolean {
|
||||
var cached = useEditTextStockAndroidFocusBehaviorCache
|
||||
if (cached == null) {
|
||||
cached = currentProvider.useEditTextStockAndroidFocusBehavior()
|
||||
accessedFeatureFlags.add("useEditTextStockAndroidFocusBehavior")
|
||||
useEditTextStockAndroidFocusBehaviorCache = cached
|
||||
}
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun useFabricInterop(): Boolean {
|
||||
var cached = useFabricInteropCache
|
||||
if (cached == null) {
|
||||
|
||||
+1
-3
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<bad6f4d9b4c7ba419c2ad37a5089c3e7>>
|
||||
* @generated SignedSource<<9cdb965a420d53cf36b6531684cb07ae>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -99,8 +99,6 @@ public interface ReactNativeFeatureFlagsProvider {
|
||||
|
||||
@DoNotStrip public fun useAlwaysAvailableJSErrorHandling(): Boolean
|
||||
|
||||
@DoNotStrip public fun useEditTextStockAndroidFocusBehavior(): Boolean
|
||||
|
||||
@DoNotStrip public fun useFabricInterop(): Boolean
|
||||
|
||||
@DoNotStrip public fun useNativeViewConfigsInBridgelessMode(): Boolean
|
||||
|
||||
+3
-45
@@ -47,7 +47,6 @@ import com.facebook.react.bridge.ReactSoftExceptionLogger.logSoftException
|
||||
import com.facebook.react.common.ReactConstants
|
||||
import com.facebook.react.common.build.ReactBuildConfig
|
||||
import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags
|
||||
import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags.useEditTextStockAndroidFocusBehavior
|
||||
import com.facebook.react.internal.featureflags.ReactNativeNewArchitectureFeatureFlags
|
||||
import com.facebook.react.uimanager.BackgroundStyleApplicator.clipToPaddingBox
|
||||
import com.facebook.react.uimanager.BackgroundStyleApplicator.getBackgroundColor
|
||||
@@ -198,10 +197,6 @@ public open class ReactEditText public constructor(context: Context) : AppCompat
|
||||
}
|
||||
|
||||
init {
|
||||
if (!useEditTextStockAndroidFocusBehavior()) {
|
||||
isFocusableInTouchMode = false
|
||||
}
|
||||
|
||||
inputMethodManager =
|
||||
context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
defaultGravityHorizontal =
|
||||
@@ -240,8 +235,7 @@ public open class ReactEditText public constructor(context: Context) : AppCompat
|
||||
// selection on accessibility click to undo that.
|
||||
setSelection(length)
|
||||
}
|
||||
return if (useEditTextStockAndroidFocusBehavior()) requestFocusProgrammatically()
|
||||
else requestFocusInternal()
|
||||
return requestFocusProgrammatically()
|
||||
}
|
||||
return super.performAccessibilityAction(host, action, args)
|
||||
}
|
||||
@@ -366,38 +360,10 @@ public open class ReactEditText public constructor(context: Context) : AppCompat
|
||||
if (id == android.R.id.paste) android.R.id.pasteAsPlainText else id)
|
||||
|
||||
override fun clearFocus() {
|
||||
val useStockFocusBehavior = useEditTextStockAndroidFocusBehavior()
|
||||
if (!useStockFocusBehavior) {
|
||||
isFocusableInTouchMode = false
|
||||
}
|
||||
super.clearFocus()
|
||||
hideSoftKeyboard()
|
||||
}
|
||||
|
||||
override fun requestFocus(direction: Int, previouslyFocusedRect: Rect?): Boolean =
|
||||
// This is a no-op so that when the OS calls requestFocus(), nothing will happen.
|
||||
// ReactEditText
|
||||
// is a controlled component, which means its focus is controlled by JS, with two exceptions:
|
||||
// autofocus when it's attached to the window, and responding to accessibility events. In both
|
||||
// of these cases, we call requestFocusInternal() directly.
|
||||
if (useEditTextStockAndroidFocusBehavior()) {
|
||||
super.requestFocus(direction, previouslyFocusedRect)
|
||||
} else {
|
||||
isFocused
|
||||
}
|
||||
|
||||
private fun requestFocusInternal(): Boolean {
|
||||
isFocusableInTouchMode = true
|
||||
// We must explicitly call this method on the super class; if we call requestFocus() without
|
||||
// any arguments, it will call into the overridden requestFocus(int, Rect) above, which no-ops.
|
||||
val focused = super.requestFocus(FOCUS_DOWN, null)
|
||||
if (showSoftInputOnFocus) {
|
||||
showSoftKeyboard()
|
||||
}
|
||||
|
||||
return focused
|
||||
}
|
||||
|
||||
// For cases like autoFocus, or ref.focus() where we request focus programmatically and not
|
||||
// through
|
||||
// interacting with the EditText directly (like clicking on it). We cannot use stock
|
||||
@@ -629,11 +595,7 @@ public open class ReactEditText public constructor(context: Context) : AppCompat
|
||||
}
|
||||
|
||||
public fun requestFocusFromJS() {
|
||||
if (useEditTextStockAndroidFocusBehavior()) {
|
||||
requestFocusProgrammatically()
|
||||
} else {
|
||||
requestFocusInternal()
|
||||
}
|
||||
requestFocusProgrammatically()
|
||||
}
|
||||
|
||||
internal fun clearFocusFromJS() {
|
||||
@@ -983,11 +945,7 @@ public open class ReactEditText public constructor(context: Context) : AppCompat
|
||||
}
|
||||
|
||||
if (autoFocus && !didAttachToWindow) {
|
||||
if (useEditTextStockAndroidFocusBehavior()) {
|
||||
requestFocusProgrammatically()
|
||||
} else {
|
||||
requestFocusInternal()
|
||||
}
|
||||
requestFocusProgrammatically()
|
||||
}
|
||||
|
||||
didAttachToWindow = true
|
||||
|
||||
+1
-15
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<65232e117b548982fd5c59502599b1bb>>
|
||||
* @generated SignedSource<<c89831646046b10c7b2a40e14deb3d1a>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -267,12 +267,6 @@ class ReactNativeFeatureFlagsJavaProvider
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool useEditTextStockAndroidFocusBehavior() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useEditTextStockAndroidFocusBehavior");
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool useFabricInterop() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useFabricInterop");
|
||||
@@ -509,11 +503,6 @@ bool JReactNativeFeatureFlagsCxxInterop::useAlwaysAvailableJSErrorHandling(
|
||||
return ReactNativeFeatureFlags::useAlwaysAvailableJSErrorHandling();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::useEditTextStockAndroidFocusBehavior(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::useEditTextStockAndroidFocusBehavior();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::useFabricInterop(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::useFabricInterop();
|
||||
@@ -694,9 +683,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
||||
makeNativeMethod(
|
||||
"useAlwaysAvailableJSErrorHandling",
|
||||
JReactNativeFeatureFlagsCxxInterop::useAlwaysAvailableJSErrorHandling),
|
||||
makeNativeMethod(
|
||||
"useEditTextStockAndroidFocusBehavior",
|
||||
JReactNativeFeatureFlagsCxxInterop::useEditTextStockAndroidFocusBehavior),
|
||||
makeNativeMethod(
|
||||
"useFabricInterop",
|
||||
JReactNativeFeatureFlagsCxxInterop::useFabricInterop),
|
||||
|
||||
+1
-4
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<980b6545944b8053fbe9901d3e4746ee>>
|
||||
* @generated SignedSource<<2a5ad62d2cb4f1111391f1b566e10c1d>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -144,9 +144,6 @@ class JReactNativeFeatureFlagsCxxInterop
|
||||
static bool useAlwaysAvailableJSErrorHandling(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
static bool useEditTextStockAndroidFocusBehavior(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
static bool useFabricInterop(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<7929b1ed09571f4afd84196d8c672615>>
|
||||
* @generated SignedSource<<0eb63ead191be88440cbb73fd760dec7>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -178,10 +178,6 @@ bool ReactNativeFeatureFlags::useAlwaysAvailableJSErrorHandling() {
|
||||
return getAccessor().useAlwaysAvailableJSErrorHandling();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlags::useEditTextStockAndroidFocusBehavior() {
|
||||
return getAccessor().useEditTextStockAndroidFocusBehavior();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlags::useFabricInterop() {
|
||||
return getAccessor().useFabricInterop();
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<0588d6b7fda4af37b3ba8ec5ad88657b>>
|
||||
* @generated SignedSource<<80dcd75591a392144c2fd2817cc4408a>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -229,11 +229,6 @@ class ReactNativeFeatureFlags {
|
||||
*/
|
||||
RN_EXPORT static bool useAlwaysAvailableJSErrorHandling();
|
||||
|
||||
/**
|
||||
* If true, focusing in ReactEditText will mainly use stock Android requestFocus() behavior. If false it will use legacy custom focus behavior.
|
||||
*/
|
||||
RN_EXPORT static bool useEditTextStockAndroidFocusBehavior();
|
||||
|
||||
/**
|
||||
* Should this application enable the Fabric Interop Layer for Android? If yes, the application will behave so that it can accept non-Fabric components and render them on Fabric. This toggle is controlling extra logic such as custom event dispatching that are needed for the Fabric Interop Layer to work correctly.
|
||||
*/
|
||||
|
||||
+8
-26
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<e2a3e80e76a3956277bd443f060a395e>>
|
||||
* @generated SignedSource<<0c39183e7858453bfc18515be46eb17f>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -713,24 +713,6 @@ bool ReactNativeFeatureFlagsAccessor::useAlwaysAvailableJSErrorHandling() {
|
||||
return flagValue.value();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlagsAccessor::useEditTextStockAndroidFocusBehavior() {
|
||||
auto flagValue = useEditTextStockAndroidFocusBehavior_.load();
|
||||
|
||||
if (!flagValue.has_value()) {
|
||||
// This block is not exclusive but it is not necessary.
|
||||
// If multiple threads try to initialize the feature flag, we would only
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(38, "useEditTextStockAndroidFocusBehavior");
|
||||
|
||||
flagValue = currentProvider_->useEditTextStockAndroidFocusBehavior();
|
||||
useEditTextStockAndroidFocusBehavior_ = flagValue;
|
||||
}
|
||||
|
||||
return flagValue.value();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlagsAccessor::useFabricInterop() {
|
||||
auto flagValue = useFabricInterop_.load();
|
||||
|
||||
@@ -740,7 +722,7 @@ bool ReactNativeFeatureFlagsAccessor::useFabricInterop() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(39, "useFabricInterop");
|
||||
markFlagAsAccessed(38, "useFabricInterop");
|
||||
|
||||
flagValue = currentProvider_->useFabricInterop();
|
||||
useFabricInterop_ = flagValue;
|
||||
@@ -758,7 +740,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(40, "useNativeViewConfigsInBridgelessMode");
|
||||
markFlagAsAccessed(39, "useNativeViewConfigsInBridgelessMode");
|
||||
|
||||
flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
|
||||
useNativeViewConfigsInBridgelessMode_ = flagValue;
|
||||
@@ -776,7 +758,7 @@ bool ReactNativeFeatureFlagsAccessor::useOptimizedEventBatchingOnAndroid() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(41, "useOptimizedEventBatchingOnAndroid");
|
||||
markFlagAsAccessed(40, "useOptimizedEventBatchingOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->useOptimizedEventBatchingOnAndroid();
|
||||
useOptimizedEventBatchingOnAndroid_ = flagValue;
|
||||
@@ -794,7 +776,7 @@ bool ReactNativeFeatureFlagsAccessor::useRawPropsJsiValue() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(42, "useRawPropsJsiValue");
|
||||
markFlagAsAccessed(41, "useRawPropsJsiValue");
|
||||
|
||||
flagValue = currentProvider_->useRawPropsJsiValue();
|
||||
useRawPropsJsiValue_ = flagValue;
|
||||
@@ -812,7 +794,7 @@ bool ReactNativeFeatureFlagsAccessor::useShadowNodeStateOnClone() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(43, "useShadowNodeStateOnClone");
|
||||
markFlagAsAccessed(42, "useShadowNodeStateOnClone");
|
||||
|
||||
flagValue = currentProvider_->useShadowNodeStateOnClone();
|
||||
useShadowNodeStateOnClone_ = flagValue;
|
||||
@@ -830,7 +812,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(44, "useTurboModuleInterop");
|
||||
markFlagAsAccessed(43, "useTurboModuleInterop");
|
||||
|
||||
flagValue = currentProvider_->useTurboModuleInterop();
|
||||
useTurboModuleInterop_ = flagValue;
|
||||
@@ -848,7 +830,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModules() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(45, "useTurboModules");
|
||||
markFlagAsAccessed(44, "useTurboModules");
|
||||
|
||||
flagValue = currentProvider_->useTurboModules();
|
||||
useTurboModules_ = flagValue;
|
||||
|
||||
+2
-4
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<eb23ba04e30dfd5c7652d782a4b47bbe>>
|
||||
* @generated SignedSource<<336504fac084993c9aff86f274d45342>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -70,7 +70,6 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
bool traceTurboModulePromiseRejectionsOnAndroid();
|
||||
bool updateRuntimeShadowNodeReferencesOnCommit();
|
||||
bool useAlwaysAvailableJSErrorHandling();
|
||||
bool useEditTextStockAndroidFocusBehavior();
|
||||
bool useFabricInterop();
|
||||
bool useNativeViewConfigsInBridgelessMode();
|
||||
bool useOptimizedEventBatchingOnAndroid();
|
||||
@@ -89,7 +88,7 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
|
||||
bool wasOverridden_;
|
||||
|
||||
std::array<std::atomic<const char*>, 46> accessedFeatureFlags_;
|
||||
std::array<std::atomic<const char*>, 45> accessedFeatureFlags_;
|
||||
|
||||
std::atomic<std::optional<bool>> commonTestFlag_;
|
||||
std::atomic<std::optional<bool>> animatedShouldSignalBatch_;
|
||||
@@ -129,7 +128,6 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
std::atomic<std::optional<bool>> traceTurboModulePromiseRejectionsOnAndroid_;
|
||||
std::atomic<std::optional<bool>> updateRuntimeShadowNodeReferencesOnCommit_;
|
||||
std::atomic<std::optional<bool>> useAlwaysAvailableJSErrorHandling_;
|
||||
std::atomic<std::optional<bool>> useEditTextStockAndroidFocusBehavior_;
|
||||
std::atomic<std::optional<bool>> useFabricInterop_;
|
||||
std::atomic<std::optional<bool>> useNativeViewConfigsInBridgelessMode_;
|
||||
std::atomic<std::optional<bool>> useOptimizedEventBatchingOnAndroid_;
|
||||
|
||||
+1
-5
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<3d6301ade77a134895cf5ba0499f50b8>>
|
||||
* @generated SignedSource<<825294594363fb672b6cd64eaa954dd4>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -179,10 +179,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool useEditTextStockAndroidFocusBehavior() override {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool useFabricInterop() override {
|
||||
return true;
|
||||
}
|
||||
|
||||
+1
-10
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<3684edcb7df20ae270d101504da667ed>>
|
||||
* @generated SignedSource<<d9dc055d9cda1ac17b7039aa70691a6b>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -387,15 +387,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
|
||||
return ReactNativeFeatureFlagsDefaults::useAlwaysAvailableJSErrorHandling();
|
||||
}
|
||||
|
||||
bool useEditTextStockAndroidFocusBehavior() override {
|
||||
auto value = values_["useEditTextStockAndroidFocusBehavior"];
|
||||
if (!value.isNull()) {
|
||||
return value.getBool();
|
||||
}
|
||||
|
||||
return ReactNativeFeatureFlagsDefaults::useEditTextStockAndroidFocusBehavior();
|
||||
}
|
||||
|
||||
bool useFabricInterop() override {
|
||||
auto value = values_["useFabricInterop"];
|
||||
if (!value.isNull()) {
|
||||
|
||||
+1
-2
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<490d765da7ce24dc5bc87643c3ec0793>>
|
||||
* @generated SignedSource<<905f26c85dc731205b1a6f44c4e32468>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -63,7 +63,6 @@ class ReactNativeFeatureFlagsProvider {
|
||||
virtual bool traceTurboModulePromiseRejectionsOnAndroid() = 0;
|
||||
virtual bool updateRuntimeShadowNodeReferencesOnCommit() = 0;
|
||||
virtual bool useAlwaysAvailableJSErrorHandling() = 0;
|
||||
virtual bool useEditTextStockAndroidFocusBehavior() = 0;
|
||||
virtual bool useFabricInterop() = 0;
|
||||
virtual bool useNativeViewConfigsInBridgelessMode() = 0;
|
||||
virtual bool useOptimizedEventBatchingOnAndroid() = 0;
|
||||
|
||||
+1
-6
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<c5f06647621e59c1684e964065bd528f>>
|
||||
* @generated SignedSource<<614814062283858cf70138a2ac3d6304>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -234,11 +234,6 @@ bool NativeReactNativeFeatureFlags::useAlwaysAvailableJSErrorHandling(
|
||||
return ReactNativeFeatureFlags::useAlwaysAvailableJSErrorHandling();
|
||||
}
|
||||
|
||||
bool NativeReactNativeFeatureFlags::useEditTextStockAndroidFocusBehavior(
|
||||
jsi::Runtime& /*runtime*/) {
|
||||
return ReactNativeFeatureFlags::useEditTextStockAndroidFocusBehavior();
|
||||
}
|
||||
|
||||
bool NativeReactNativeFeatureFlags::useFabricInterop(
|
||||
jsi::Runtime& /*runtime*/) {
|
||||
return ReactNativeFeatureFlags::useFabricInterop();
|
||||
|
||||
+1
-3
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<8497861e92cb78ab7b2bae7ac3c3e200>>
|
||||
* @generated SignedSource<<1c0248c3eda43cc89a61b3e3ff8b4345>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -113,8 +113,6 @@ class NativeReactNativeFeatureFlags
|
||||
|
||||
bool useAlwaysAvailableJSErrorHandling(jsi::Runtime& runtime);
|
||||
|
||||
bool useEditTextStockAndroidFocusBehavior(jsi::Runtime& runtime);
|
||||
|
||||
bool useFabricInterop(jsi::Runtime& runtime);
|
||||
|
||||
bool useNativeViewConfigsInBridgelessMode(jsi::Runtime& runtime);
|
||||
|
||||
@@ -446,16 +446,6 @@ const definitions: FeatureFlagDefinitions = {
|
||||
},
|
||||
ossReleaseStage: 'none',
|
||||
},
|
||||
useEditTextStockAndroidFocusBehavior: {
|
||||
defaultValue: true,
|
||||
metadata: {
|
||||
description:
|
||||
'If true, focusing in ReactEditText will mainly use stock Android requestFocus() behavior. If false it will use legacy custom focus behavior.',
|
||||
expectedReleaseValue: true,
|
||||
purpose: 'release',
|
||||
},
|
||||
ossReleaseStage: 'none',
|
||||
},
|
||||
useFabricInterop: {
|
||||
defaultValue: true,
|
||||
metadata: {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<9aead6f81a34e5c7ad93ebceed4dad54>>
|
||||
* @generated SignedSource<<fab0bb6a5cd8a2b8366e8184659188c0>>
|
||||
* @flow strict
|
||||
*/
|
||||
|
||||
@@ -84,7 +84,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
||||
traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean>,
|
||||
updateRuntimeShadowNodeReferencesOnCommit: Getter<boolean>,
|
||||
useAlwaysAvailableJSErrorHandling: Getter<boolean>,
|
||||
useEditTextStockAndroidFocusBehavior: Getter<boolean>,
|
||||
useFabricInterop: Getter<boolean>,
|
||||
useNativeViewConfigsInBridgelessMode: Getter<boolean>,
|
||||
useOptimizedEventBatchingOnAndroid: Getter<boolean>,
|
||||
@@ -310,10 +309,6 @@ export const updateRuntimeShadowNodeReferencesOnCommit: Getter<boolean> = create
|
||||
* In Bridgeless mode, use the always available javascript error reporting pipeline.
|
||||
*/
|
||||
export const useAlwaysAvailableJSErrorHandling: Getter<boolean> = createNativeFlagGetter('useAlwaysAvailableJSErrorHandling', false);
|
||||
/**
|
||||
* If true, focusing in ReactEditText will mainly use stock Android requestFocus() behavior. If false it will use legacy custom focus behavior.
|
||||
*/
|
||||
export const useEditTextStockAndroidFocusBehavior: Getter<boolean> = createNativeFlagGetter('useEditTextStockAndroidFocusBehavior', true);
|
||||
/**
|
||||
* Should this application enable the Fabric Interop Layer for Android? If yes, the application will behave so that it can accept non-Fabric components and render them on Fabric. This toggle is controlling extra logic such as custom event dispatching that are needed for the Fabric Interop Layer to work correctly.
|
||||
*/
|
||||
|
||||
+1
-2
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<c96551a53c3de47f04eaac9057660ade>>
|
||||
* @generated SignedSource<<715d2a137ded85479120f5090c05b3b6>>
|
||||
* @flow strict
|
||||
*/
|
||||
|
||||
@@ -62,7 +62,6 @@ export interface Spec extends TurboModule {
|
||||
+traceTurboModulePromiseRejectionsOnAndroid?: () => boolean;
|
||||
+updateRuntimeShadowNodeReferencesOnCommit?: () => boolean;
|
||||
+useAlwaysAvailableJSErrorHandling?: () => boolean;
|
||||
+useEditTextStockAndroidFocusBehavior?: () => boolean;
|
||||
+useFabricInterop?: () => boolean;
|
||||
+useNativeViewConfigsInBridgelessMode?: () => boolean;
|
||||
+useOptimizedEventBatchingOnAndroid?: () => boolean;
|
||||
|
||||
Reference in new issue
Block a user