mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Disable Android Workarounds for Attachment Metrics (#52446)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52446 The logic for retrieving metrics from a placeholder character is kind of insane, and has been around since inline views were added built into TextView in Paper. One of the workarounds, for old versions of Android on Samsung phones (no more info to bound the versions) causes incorrect behavior, at least in the case where we have RTL text in LTR layout. Another, explicitly mentions `singleLine` with RTL para, a deprecated TextView prop, that doesn't apply to us here (and also could never apply to BoringLayout, since RTL chars are not boring). We don't have these workarounds anywhere else (though we have some other workarounds for bidi crash in old Android), including other frameworks I could find. Let's bias to cleaning this old code up. Changelog: [Android][Fixed] - Fix incorrect positioning of inline view at the end of string when RTL text in LTR container Reviewed By: javache Differential Revision: D77703906 fbshipit-source-id: f25a5e2f05100f0288f3889132b658cdabf26f22
This commit is contained in:
committed by
Facebook GitHub Bot
parent
7cd0b42ca0
commit
7f224941bb
+7
-1
@@ -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<<64faf70fad18019fc27e77681ff41d05>>
|
||||
* @generated SignedSource<<9b580dfb56a10ebe9e80bc7ce0c2ca36>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -54,6 +54,12 @@ public object ReactNativeFeatureFlags {
|
||||
@JvmStatic
|
||||
public fun disableMountItemReorderingAndroid(): Boolean = accessor.disableMountItemReorderingAndroid()
|
||||
|
||||
/**
|
||||
* Disable some workarounds for old Android versions in TextLayoutManager logic for retrieving attachment metrics
|
||||
*/
|
||||
@JvmStatic
|
||||
public fun disableOldAndroidAttachmentMetricsWorkarounds(): Boolean = accessor.disableOldAndroidAttachmentMetricsWorkarounds()
|
||||
|
||||
/**
|
||||
* Turns off the global measurement cache used by TextLayoutManager on Android.
|
||||
*/
|
||||
|
||||
+11
-1
@@ -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<<d09b78184190ec69fcaa937031cd7f04>>
|
||||
* @generated SignedSource<<99871d495699fdea7f67b3b29af2d28f>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -24,6 +24,7 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
||||
private var cxxNativeAnimatedEnabledCache: Boolean? = null
|
||||
private var cxxNativeAnimatedRemoveJsSyncCache: Boolean? = null
|
||||
private var disableMountItemReorderingAndroidCache: Boolean? = null
|
||||
private var disableOldAndroidAttachmentMetricsWorkaroundsCache: Boolean? = null
|
||||
private var disableTextLayoutManagerCacheAndroidCache: Boolean? = null
|
||||
private var enableAccessibilityOrderCache: Boolean? = null
|
||||
private var enableAccumulatedUpdatesInRawPropsAndroidCache: Boolean? = null
|
||||
@@ -114,6 +115,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun disableOldAndroidAttachmentMetricsWorkarounds(): Boolean {
|
||||
var cached = disableOldAndroidAttachmentMetricsWorkaroundsCache
|
||||
if (cached == null) {
|
||||
cached = ReactNativeFeatureFlagsCxxInterop.disableOldAndroidAttachmentMetricsWorkarounds()
|
||||
disableOldAndroidAttachmentMetricsWorkaroundsCache = cached
|
||||
}
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun disableTextLayoutManagerCacheAndroid(): Boolean {
|
||||
var cached = disableTextLayoutManagerCacheAndroidCache
|
||||
if (cached == null) {
|
||||
|
||||
+3
-1
@@ -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<<b9aa0387de9705e781bac7e522461224>>
|
||||
* @generated SignedSource<<cfa7407ac0b1fe6cfb92dbc22449bae2>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -36,6 +36,8 @@ public object ReactNativeFeatureFlagsCxxInterop {
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun disableMountItemReorderingAndroid(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun disableOldAndroidAttachmentMetricsWorkarounds(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun disableTextLayoutManagerCacheAndroid(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun enableAccessibilityOrder(): Boolean
|
||||
|
||||
+3
-1
@@ -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<<fdcaa94192d003c28fa3a1d538fc859c>>
|
||||
* @generated SignedSource<<21fdb20c1fca274a6096de088bdd85ff>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -31,6 +31,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
||||
|
||||
override fun disableMountItemReorderingAndroid(): Boolean = false
|
||||
|
||||
override fun disableOldAndroidAttachmentMetricsWorkarounds(): Boolean = true
|
||||
|
||||
override fun disableTextLayoutManagerCacheAndroid(): Boolean = false
|
||||
|
||||
override fun enableAccessibilityOrder(): Boolean = false
|
||||
|
||||
+12
-1
@@ -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<<d645897d5c2e27e7de611605686d8413>>
|
||||
* @generated SignedSource<<09d954a90ac197146c441b71a7352c24>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -28,6 +28,7 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
||||
private var cxxNativeAnimatedEnabledCache: Boolean? = null
|
||||
private var cxxNativeAnimatedRemoveJsSyncCache: Boolean? = null
|
||||
private var disableMountItemReorderingAndroidCache: Boolean? = null
|
||||
private var disableOldAndroidAttachmentMetricsWorkaroundsCache: Boolean? = null
|
||||
private var disableTextLayoutManagerCacheAndroidCache: Boolean? = null
|
||||
private var enableAccessibilityOrderCache: Boolean? = null
|
||||
private var enableAccumulatedUpdatesInRawPropsAndroidCache: Boolean? = null
|
||||
@@ -122,6 +123,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun disableOldAndroidAttachmentMetricsWorkarounds(): Boolean {
|
||||
var cached = disableOldAndroidAttachmentMetricsWorkaroundsCache
|
||||
if (cached == null) {
|
||||
cached = currentProvider.disableOldAndroidAttachmentMetricsWorkarounds()
|
||||
accessedFeatureFlags.add("disableOldAndroidAttachmentMetricsWorkarounds")
|
||||
disableOldAndroidAttachmentMetricsWorkaroundsCache = cached
|
||||
}
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun disableTextLayoutManagerCacheAndroid(): Boolean {
|
||||
var cached = disableTextLayoutManagerCacheAndroidCache
|
||||
if (cached == null) {
|
||||
|
||||
+3
-1
@@ -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<<8168412a7d792853fa19e10a621012c4>>
|
||||
* @generated SignedSource<<50a3f126540e1b2afd4a4ce85a4d1ac3>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -31,6 +31,8 @@ public interface ReactNativeFeatureFlagsProvider {
|
||||
|
||||
@DoNotStrip public fun disableMountItemReorderingAndroid(): Boolean
|
||||
|
||||
@DoNotStrip public fun disableOldAndroidAttachmentMetricsWorkarounds(): Boolean
|
||||
|
||||
@DoNotStrip public fun disableTextLayoutManagerCacheAndroid(): Boolean
|
||||
|
||||
@DoNotStrip public fun enableAccessibilityOrder(): Boolean
|
||||
|
||||
+5
-2
@@ -1102,7 +1102,8 @@ internal object TextLayoutManager {
|
||||
// There's a bug on Samsung devices where calling getPrimaryHorizontal on
|
||||
// the last offset in the layout will result in an endless loop. Work around
|
||||
// this bug by avoiding getPrimaryHorizontal in that case.
|
||||
if (start == text.length - 1) {
|
||||
if (!ReactNativeFeatureFlags.disableOldAndroidAttachmentMetricsWorkarounds() &&
|
||||
start == text.length - 1) {
|
||||
val endsWithNewLine = text.length > 0 && text[layout.getLineEnd(line) - 1] == '\n'
|
||||
val lineWidth = if (endsWithNewLine) layout.getLineMax(line) else layout.getLineWidth(line)
|
||||
placeholderLeftPosition =
|
||||
@@ -1127,7 +1128,9 @@ internal object TextLayoutManager {
|
||||
placeholderLeftPosition =
|
||||
if (characterAndParagraphDirectionMatch) layout.getPrimaryHorizontal(start)
|
||||
else layout.getSecondaryHorizontal(start)
|
||||
if (isRtlParagraph && !isRtlChar) {
|
||||
if (!ReactNativeFeatureFlags.disableOldAndroidAttachmentMetricsWorkarounds() &&
|
||||
isRtlParagraph &&
|
||||
!isRtlChar) {
|
||||
// Adjust `placeholderLeftPosition` to work around an Android bug.
|
||||
// The bug is when the paragraph is RTL and `setSingleLine(true)`, some layout
|
||||
// methods such as `getPrimaryHorizontal`, `getSecondaryHorizontal`, and
|
||||
|
||||
+15
-1
@@ -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<<2a33de4ea9c5d0c332845046053a9598>>
|
||||
* @generated SignedSource<<d106cd4237f65206b31428ec09344536>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -63,6 +63,12 @@ class ReactNativeFeatureFlagsJavaProvider
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool disableOldAndroidAttachmentMetricsWorkarounds() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("disableOldAndroidAttachmentMetricsWorkarounds");
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool disableTextLayoutManagerCacheAndroid() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("disableTextLayoutManagerCacheAndroid");
|
||||
@@ -405,6 +411,11 @@ bool JReactNativeFeatureFlagsCxxInterop::disableMountItemReorderingAndroid(
|
||||
return ReactNativeFeatureFlags::disableMountItemReorderingAndroid();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::disableOldAndroidAttachmentMetricsWorkarounds(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::disableOldAndroidAttachmentMetricsWorkarounds();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::disableTextLayoutManagerCacheAndroid(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::disableTextLayoutManagerCacheAndroid();
|
||||
@@ -713,6 +724,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
||||
makeNativeMethod(
|
||||
"disableMountItemReorderingAndroid",
|
||||
JReactNativeFeatureFlagsCxxInterop::disableMountItemReorderingAndroid),
|
||||
makeNativeMethod(
|
||||
"disableOldAndroidAttachmentMetricsWorkarounds",
|
||||
JReactNativeFeatureFlagsCxxInterop::disableOldAndroidAttachmentMetricsWorkarounds),
|
||||
makeNativeMethod(
|
||||
"disableTextLayoutManagerCacheAndroid",
|
||||
JReactNativeFeatureFlagsCxxInterop::disableTextLayoutManagerCacheAndroid),
|
||||
|
||||
+4
-1
@@ -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<<509e0e4d8b2568e2b682797cfb83c79a>>
|
||||
* @generated SignedSource<<42e5e857fdfb9ad780ccc3f942638891>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -42,6 +42,9 @@ class JReactNativeFeatureFlagsCxxInterop
|
||||
static bool disableMountItemReorderingAndroid(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
static bool disableOldAndroidAttachmentMetricsWorkarounds(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
static bool disableTextLayoutManagerCacheAndroid(
|
||||
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<<6288be2bb9b5d8fcb318ae01ab3854c3>>
|
||||
* @generated SignedSource<<0ebe67635de9568917a9ed02d92a88e2>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -42,6 +42,10 @@ bool ReactNativeFeatureFlags::disableMountItemReorderingAndroid() {
|
||||
return getAccessor().disableMountItemReorderingAndroid();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlags::disableOldAndroidAttachmentMetricsWorkarounds() {
|
||||
return getAccessor().disableOldAndroidAttachmentMetricsWorkarounds();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlags::disableTextLayoutManagerCacheAndroid() {
|
||||
return getAccessor().disableTextLayoutManagerCacheAndroid();
|
||||
}
|
||||
|
||||
@@ -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<<133c1ad1e5f96679faeeba9e500dba33>>
|
||||
* @generated SignedSource<<ce7268c5f71d95c5214909fbcfa9355e>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -59,6 +59,11 @@ class ReactNativeFeatureFlags {
|
||||
*/
|
||||
RN_EXPORT static bool disableMountItemReorderingAndroid();
|
||||
|
||||
/**
|
||||
* Disable some workarounds for old Android versions in TextLayoutManager logic for retrieving attachment metrics
|
||||
*/
|
||||
RN_EXPORT static bool disableOldAndroidAttachmentMetricsWorkarounds();
|
||||
|
||||
/**
|
||||
* Turns off the global measurement cache used by TextLayoutManager on Android.
|
||||
*/
|
||||
|
||||
+72
-54
@@ -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<<60ce562d131604b030784224b0da710d>>
|
||||
* @generated SignedSource<<674887274e2f33e31ca43b0aabe77135>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -101,6 +101,24 @@ bool ReactNativeFeatureFlagsAccessor::disableMountItemReorderingAndroid() {
|
||||
return flagValue.value();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlagsAccessor::disableOldAndroidAttachmentMetricsWorkarounds() {
|
||||
auto flagValue = disableOldAndroidAttachmentMetricsWorkarounds_.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(4, "disableOldAndroidAttachmentMetricsWorkarounds");
|
||||
|
||||
flagValue = currentProvider_->disableOldAndroidAttachmentMetricsWorkarounds();
|
||||
disableOldAndroidAttachmentMetricsWorkarounds_ = flagValue;
|
||||
}
|
||||
|
||||
return flagValue.value();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlagsAccessor::disableTextLayoutManagerCacheAndroid() {
|
||||
auto flagValue = disableTextLayoutManagerCacheAndroid_.load();
|
||||
|
||||
@@ -110,7 +128,7 @@ bool ReactNativeFeatureFlagsAccessor::disableTextLayoutManagerCacheAndroid() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(4, "disableTextLayoutManagerCacheAndroid");
|
||||
markFlagAsAccessed(5, "disableTextLayoutManagerCacheAndroid");
|
||||
|
||||
flagValue = currentProvider_->disableTextLayoutManagerCacheAndroid();
|
||||
disableTextLayoutManagerCacheAndroid_ = flagValue;
|
||||
@@ -128,7 +146,7 @@ bool ReactNativeFeatureFlagsAccessor::enableAccessibilityOrder() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(5, "enableAccessibilityOrder");
|
||||
markFlagAsAccessed(6, "enableAccessibilityOrder");
|
||||
|
||||
flagValue = currentProvider_->enableAccessibilityOrder();
|
||||
enableAccessibilityOrder_ = flagValue;
|
||||
@@ -146,7 +164,7 @@ bool ReactNativeFeatureFlagsAccessor::enableAccumulatedUpdatesInRawPropsAndroid(
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(6, "enableAccumulatedUpdatesInRawPropsAndroid");
|
||||
markFlagAsAccessed(7, "enableAccumulatedUpdatesInRawPropsAndroid");
|
||||
|
||||
flagValue = currentProvider_->enableAccumulatedUpdatesInRawPropsAndroid();
|
||||
enableAccumulatedUpdatesInRawPropsAndroid_ = flagValue;
|
||||
@@ -164,7 +182,7 @@ bool ReactNativeFeatureFlagsAccessor::enableAndroidTextMeasurementOptimizations(
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(7, "enableAndroidTextMeasurementOptimizations");
|
||||
markFlagAsAccessed(8, "enableAndroidTextMeasurementOptimizations");
|
||||
|
||||
flagValue = currentProvider_->enableAndroidTextMeasurementOptimizations();
|
||||
enableAndroidTextMeasurementOptimizations_ = flagValue;
|
||||
@@ -182,7 +200,7 @@ bool ReactNativeFeatureFlagsAccessor::enableBridgelessArchitecture() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(8, "enableBridgelessArchitecture");
|
||||
markFlagAsAccessed(9, "enableBridgelessArchitecture");
|
||||
|
||||
flagValue = currentProvider_->enableBridgelessArchitecture();
|
||||
enableBridgelessArchitecture_ = flagValue;
|
||||
@@ -200,7 +218,7 @@ bool ReactNativeFeatureFlagsAccessor::enableCppPropsIteratorSetter() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(9, "enableCppPropsIteratorSetter");
|
||||
markFlagAsAccessed(10, "enableCppPropsIteratorSetter");
|
||||
|
||||
flagValue = currentProvider_->enableCppPropsIteratorSetter();
|
||||
enableCppPropsIteratorSetter_ = flagValue;
|
||||
@@ -218,7 +236,7 @@ bool ReactNativeFeatureFlagsAccessor::enableCustomFocusSearchOnClippedElementsAn
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(10, "enableCustomFocusSearchOnClippedElementsAndroid");
|
||||
markFlagAsAccessed(11, "enableCustomFocusSearchOnClippedElementsAndroid");
|
||||
|
||||
flagValue = currentProvider_->enableCustomFocusSearchOnClippedElementsAndroid();
|
||||
enableCustomFocusSearchOnClippedElementsAndroid_ = flagValue;
|
||||
@@ -236,7 +254,7 @@ bool ReactNativeFeatureFlagsAccessor::enableDestroyShadowTreeRevisionAsync() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(11, "enableDestroyShadowTreeRevisionAsync");
|
||||
markFlagAsAccessed(12, "enableDestroyShadowTreeRevisionAsync");
|
||||
|
||||
flagValue = currentProvider_->enableDestroyShadowTreeRevisionAsync();
|
||||
enableDestroyShadowTreeRevisionAsync_ = flagValue;
|
||||
@@ -254,7 +272,7 @@ bool ReactNativeFeatureFlagsAccessor::enableDoubleMeasurementFixAndroid() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(12, "enableDoubleMeasurementFixAndroid");
|
||||
markFlagAsAccessed(13, "enableDoubleMeasurementFixAndroid");
|
||||
|
||||
flagValue = currentProvider_->enableDoubleMeasurementFixAndroid();
|
||||
enableDoubleMeasurementFixAndroid_ = flagValue;
|
||||
@@ -272,7 +290,7 @@ bool ReactNativeFeatureFlagsAccessor::enableEagerMainQueueModulesOnIOS() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(13, "enableEagerMainQueueModulesOnIOS");
|
||||
markFlagAsAccessed(14, "enableEagerMainQueueModulesOnIOS");
|
||||
|
||||
flagValue = currentProvider_->enableEagerMainQueueModulesOnIOS();
|
||||
enableEagerMainQueueModulesOnIOS_ = flagValue;
|
||||
@@ -290,7 +308,7 @@ bool ReactNativeFeatureFlagsAccessor::enableEagerRootViewAttachment() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(14, "enableEagerRootViewAttachment");
|
||||
markFlagAsAccessed(15, "enableEagerRootViewAttachment");
|
||||
|
||||
flagValue = currentProvider_->enableEagerRootViewAttachment();
|
||||
enableEagerRootViewAttachment_ = flagValue;
|
||||
@@ -308,7 +326,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFabricLogs() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(15, "enableFabricLogs");
|
||||
markFlagAsAccessed(16, "enableFabricLogs");
|
||||
|
||||
flagValue = currentProvider_->enableFabricLogs();
|
||||
enableFabricLogs_ = flagValue;
|
||||
@@ -326,7 +344,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFabricRenderer() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(16, "enableFabricRenderer");
|
||||
markFlagAsAccessed(17, "enableFabricRenderer");
|
||||
|
||||
flagValue = currentProvider_->enableFabricRenderer();
|
||||
enableFabricRenderer_ = flagValue;
|
||||
@@ -344,7 +362,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFixForParentTagDuringReparenting() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(17, "enableFixForParentTagDuringReparenting");
|
||||
markFlagAsAccessed(18, "enableFixForParentTagDuringReparenting");
|
||||
|
||||
flagValue = currentProvider_->enableFixForParentTagDuringReparenting();
|
||||
enableFixForParentTagDuringReparenting_ = flagValue;
|
||||
@@ -362,7 +380,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFontScaleChangesUpdatingLayout() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(18, "enableFontScaleChangesUpdatingLayout");
|
||||
markFlagAsAccessed(19, "enableFontScaleChangesUpdatingLayout");
|
||||
|
||||
flagValue = currentProvider_->enableFontScaleChangesUpdatingLayout();
|
||||
enableFontScaleChangesUpdatingLayout_ = flagValue;
|
||||
@@ -380,7 +398,7 @@ bool ReactNativeFeatureFlagsAccessor::enableIOSTextBaselineOffsetPerLine() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(19, "enableIOSTextBaselineOffsetPerLine");
|
||||
markFlagAsAccessed(20, "enableIOSTextBaselineOffsetPerLine");
|
||||
|
||||
flagValue = currentProvider_->enableIOSTextBaselineOffsetPerLine();
|
||||
enableIOSTextBaselineOffsetPerLine_ = flagValue;
|
||||
@@ -398,7 +416,7 @@ bool ReactNativeFeatureFlagsAccessor::enableIOSViewClipToPaddingBox() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(20, "enableIOSViewClipToPaddingBox");
|
||||
markFlagAsAccessed(21, "enableIOSViewClipToPaddingBox");
|
||||
|
||||
flagValue = currentProvider_->enableIOSViewClipToPaddingBox();
|
||||
enableIOSViewClipToPaddingBox_ = flagValue;
|
||||
@@ -416,7 +434,7 @@ bool ReactNativeFeatureFlagsAccessor::enableInteropViewManagerClassLookUpOptimiz
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(21, "enableInteropViewManagerClassLookUpOptimizationIOS");
|
||||
markFlagAsAccessed(22, "enableInteropViewManagerClassLookUpOptimizationIOS");
|
||||
|
||||
flagValue = currentProvider_->enableInteropViewManagerClassLookUpOptimizationIOS();
|
||||
enableInteropViewManagerClassLookUpOptimizationIOS_ = flagValue;
|
||||
@@ -434,7 +452,7 @@ bool ReactNativeFeatureFlagsAccessor::enableLayoutAnimationsOnAndroid() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(22, "enableLayoutAnimationsOnAndroid");
|
||||
markFlagAsAccessed(23, "enableLayoutAnimationsOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->enableLayoutAnimationsOnAndroid();
|
||||
enableLayoutAnimationsOnAndroid_ = flagValue;
|
||||
@@ -452,7 +470,7 @@ bool ReactNativeFeatureFlagsAccessor::enableLayoutAnimationsOnIOS() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(23, "enableLayoutAnimationsOnIOS");
|
||||
markFlagAsAccessed(24, "enableLayoutAnimationsOnIOS");
|
||||
|
||||
flagValue = currentProvider_->enableLayoutAnimationsOnIOS();
|
||||
enableLayoutAnimationsOnIOS_ = flagValue;
|
||||
@@ -470,7 +488,7 @@ bool ReactNativeFeatureFlagsAccessor::enableMainQueueCoordinatorOnIOS() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(24, "enableMainQueueCoordinatorOnIOS");
|
||||
markFlagAsAccessed(25, "enableMainQueueCoordinatorOnIOS");
|
||||
|
||||
flagValue = currentProvider_->enableMainQueueCoordinatorOnIOS();
|
||||
enableMainQueueCoordinatorOnIOS_ = flagValue;
|
||||
@@ -488,7 +506,7 @@ bool ReactNativeFeatureFlagsAccessor::enableModuleArgumentNSNullConversionIOS()
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(25, "enableModuleArgumentNSNullConversionIOS");
|
||||
markFlagAsAccessed(26, "enableModuleArgumentNSNullConversionIOS");
|
||||
|
||||
flagValue = currentProvider_->enableModuleArgumentNSNullConversionIOS();
|
||||
enableModuleArgumentNSNullConversionIOS_ = flagValue;
|
||||
@@ -506,7 +524,7 @@ bool ReactNativeFeatureFlagsAccessor::enableNativeCSSParsing() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(26, "enableNativeCSSParsing");
|
||||
markFlagAsAccessed(27, "enableNativeCSSParsing");
|
||||
|
||||
flagValue = currentProvider_->enableNativeCSSParsing();
|
||||
enableNativeCSSParsing_ = flagValue;
|
||||
@@ -524,7 +542,7 @@ bool ReactNativeFeatureFlagsAccessor::enableNetworkEventReporting() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(27, "enableNetworkEventReporting");
|
||||
markFlagAsAccessed(28, "enableNetworkEventReporting");
|
||||
|
||||
flagValue = currentProvider_->enableNetworkEventReporting();
|
||||
enableNetworkEventReporting_ = flagValue;
|
||||
@@ -542,7 +560,7 @@ bool ReactNativeFeatureFlagsAccessor::enableNewBackgroundAndBorderDrawables() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(28, "enableNewBackgroundAndBorderDrawables");
|
||||
markFlagAsAccessed(29, "enableNewBackgroundAndBorderDrawables");
|
||||
|
||||
flagValue = currentProvider_->enableNewBackgroundAndBorderDrawables();
|
||||
enableNewBackgroundAndBorderDrawables_ = flagValue;
|
||||
@@ -560,7 +578,7 @@ bool ReactNativeFeatureFlagsAccessor::enablePreparedTextLayout() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(29, "enablePreparedTextLayout");
|
||||
markFlagAsAccessed(30, "enablePreparedTextLayout");
|
||||
|
||||
flagValue = currentProvider_->enablePreparedTextLayout();
|
||||
enablePreparedTextLayout_ = flagValue;
|
||||
@@ -578,7 +596,7 @@ bool ReactNativeFeatureFlagsAccessor::enablePropsUpdateReconciliationAndroid() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(30, "enablePropsUpdateReconciliationAndroid");
|
||||
markFlagAsAccessed(31, "enablePropsUpdateReconciliationAndroid");
|
||||
|
||||
flagValue = currentProvider_->enablePropsUpdateReconciliationAndroid();
|
||||
enablePropsUpdateReconciliationAndroid_ = flagValue;
|
||||
@@ -596,7 +614,7 @@ bool ReactNativeFeatureFlagsAccessor::enableResourceTimingAPI() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(31, "enableResourceTimingAPI");
|
||||
markFlagAsAccessed(32, "enableResourceTimingAPI");
|
||||
|
||||
flagValue = currentProvider_->enableResourceTimingAPI();
|
||||
enableResourceTimingAPI_ = flagValue;
|
||||
@@ -614,7 +632,7 @@ bool ReactNativeFeatureFlagsAccessor::enableSynchronousStateUpdates() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(32, "enableSynchronousStateUpdates");
|
||||
markFlagAsAccessed(33, "enableSynchronousStateUpdates");
|
||||
|
||||
flagValue = currentProvider_->enableSynchronousStateUpdates();
|
||||
enableSynchronousStateUpdates_ = flagValue;
|
||||
@@ -632,7 +650,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewCulling() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(33, "enableViewCulling");
|
||||
markFlagAsAccessed(34, "enableViewCulling");
|
||||
|
||||
flagValue = currentProvider_->enableViewCulling();
|
||||
enableViewCulling_ = flagValue;
|
||||
@@ -650,7 +668,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecycling() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(34, "enableViewRecycling");
|
||||
markFlagAsAccessed(35, "enableViewRecycling");
|
||||
|
||||
flagValue = currentProvider_->enableViewRecycling();
|
||||
enableViewRecycling_ = flagValue;
|
||||
@@ -668,7 +686,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecyclingForText() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(35, "enableViewRecyclingForText");
|
||||
markFlagAsAccessed(36, "enableViewRecyclingForText");
|
||||
|
||||
flagValue = currentProvider_->enableViewRecyclingForText();
|
||||
enableViewRecyclingForText_ = flagValue;
|
||||
@@ -686,7 +704,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecyclingForView() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(36, "enableViewRecyclingForView");
|
||||
markFlagAsAccessed(37, "enableViewRecyclingForView");
|
||||
|
||||
flagValue = currentProvider_->enableViewRecyclingForView();
|
||||
enableViewRecyclingForView_ = flagValue;
|
||||
@@ -704,7 +722,7 @@ bool ReactNativeFeatureFlagsAccessor::enableVirtualViewDebugFeatures() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(37, "enableVirtualViewDebugFeatures");
|
||||
markFlagAsAccessed(38, "enableVirtualViewDebugFeatures");
|
||||
|
||||
flagValue = currentProvider_->enableVirtualViewDebugFeatures();
|
||||
enableVirtualViewDebugFeatures_ = flagValue;
|
||||
@@ -722,7 +740,7 @@ bool ReactNativeFeatureFlagsAccessor::enableVirtualViewRenderState() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(38, "enableVirtualViewRenderState");
|
||||
markFlagAsAccessed(39, "enableVirtualViewRenderState");
|
||||
|
||||
flagValue = currentProvider_->enableVirtualViewRenderState();
|
||||
enableVirtualViewRenderState_ = flagValue;
|
||||
@@ -740,7 +758,7 @@ bool ReactNativeFeatureFlagsAccessor::enableVirtualViewWindowFocusDetection() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(39, "enableVirtualViewWindowFocusDetection");
|
||||
markFlagAsAccessed(40, "enableVirtualViewWindowFocusDetection");
|
||||
|
||||
flagValue = currentProvider_->enableVirtualViewWindowFocusDetection();
|
||||
enableVirtualViewWindowFocusDetection_ = flagValue;
|
||||
@@ -758,7 +776,7 @@ bool ReactNativeFeatureFlagsAccessor::fixMappingOfEventPrioritiesBetweenFabricAn
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(40, "fixMappingOfEventPrioritiesBetweenFabricAndReact");
|
||||
markFlagAsAccessed(41, "fixMappingOfEventPrioritiesBetweenFabricAndReact");
|
||||
|
||||
flagValue = currentProvider_->fixMappingOfEventPrioritiesBetweenFabricAndReact();
|
||||
fixMappingOfEventPrioritiesBetweenFabricAndReact_ = flagValue;
|
||||
@@ -776,7 +794,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxEnabledRelease() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(41, "fuseboxEnabledRelease");
|
||||
markFlagAsAccessed(42, "fuseboxEnabledRelease");
|
||||
|
||||
flagValue = currentProvider_->fuseboxEnabledRelease();
|
||||
fuseboxEnabledRelease_ = flagValue;
|
||||
@@ -794,7 +812,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxNetworkInspectionEnabled() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(42, "fuseboxNetworkInspectionEnabled");
|
||||
markFlagAsAccessed(43, "fuseboxNetworkInspectionEnabled");
|
||||
|
||||
flagValue = currentProvider_->fuseboxNetworkInspectionEnabled();
|
||||
fuseboxNetworkInspectionEnabled_ = flagValue;
|
||||
@@ -812,7 +830,7 @@ bool ReactNativeFeatureFlagsAccessor::hideOffscreenVirtualViewsOnIOS() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(43, "hideOffscreenVirtualViewsOnIOS");
|
||||
markFlagAsAccessed(44, "hideOffscreenVirtualViewsOnIOS");
|
||||
|
||||
flagValue = currentProvider_->hideOffscreenVirtualViewsOnIOS();
|
||||
hideOffscreenVirtualViewsOnIOS_ = flagValue;
|
||||
@@ -830,7 +848,7 @@ double ReactNativeFeatureFlagsAccessor::preparedTextCacheSize() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(44, "preparedTextCacheSize");
|
||||
markFlagAsAccessed(45, "preparedTextCacheSize");
|
||||
|
||||
flagValue = currentProvider_->preparedTextCacheSize();
|
||||
preparedTextCacheSize_ = flagValue;
|
||||
@@ -848,7 +866,7 @@ bool ReactNativeFeatureFlagsAccessor::releaseImageDataWhenConsumed() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(45, "releaseImageDataWhenConsumed");
|
||||
markFlagAsAccessed(46, "releaseImageDataWhenConsumed");
|
||||
|
||||
flagValue = currentProvider_->releaseImageDataWhenConsumed();
|
||||
releaseImageDataWhenConsumed_ = flagValue;
|
||||
@@ -866,7 +884,7 @@ bool ReactNativeFeatureFlagsAccessor::traceTurboModulePromiseRejectionsOnAndroid
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(46, "traceTurboModulePromiseRejectionsOnAndroid");
|
||||
markFlagAsAccessed(47, "traceTurboModulePromiseRejectionsOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid();
|
||||
traceTurboModulePromiseRejectionsOnAndroid_ = flagValue;
|
||||
@@ -884,7 +902,7 @@ bool ReactNativeFeatureFlagsAccessor::updateRuntimeShadowNodeReferencesOnCommit(
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(47, "updateRuntimeShadowNodeReferencesOnCommit");
|
||||
markFlagAsAccessed(48, "updateRuntimeShadowNodeReferencesOnCommit");
|
||||
|
||||
flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommit();
|
||||
updateRuntimeShadowNodeReferencesOnCommit_ = flagValue;
|
||||
@@ -902,7 +920,7 @@ bool ReactNativeFeatureFlagsAccessor::useAlwaysAvailableJSErrorHandling() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(48, "useAlwaysAvailableJSErrorHandling");
|
||||
markFlagAsAccessed(49, "useAlwaysAvailableJSErrorHandling");
|
||||
|
||||
flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling();
|
||||
useAlwaysAvailableJSErrorHandling_ = flagValue;
|
||||
@@ -920,7 +938,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(49, "useFabricInterop");
|
||||
markFlagAsAccessed(50, "useFabricInterop");
|
||||
|
||||
flagValue = currentProvider_->useFabricInterop();
|
||||
useFabricInterop_ = flagValue;
|
||||
@@ -938,7 +956,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(50, "useNativeViewConfigsInBridgelessMode");
|
||||
markFlagAsAccessed(51, "useNativeViewConfigsInBridgelessMode");
|
||||
|
||||
flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
|
||||
useNativeViewConfigsInBridgelessMode_ = flagValue;
|
||||
@@ -956,7 +974,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(51, "useOptimizedEventBatchingOnAndroid");
|
||||
markFlagAsAccessed(52, "useOptimizedEventBatchingOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->useOptimizedEventBatchingOnAndroid();
|
||||
useOptimizedEventBatchingOnAndroid_ = flagValue;
|
||||
@@ -974,7 +992,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(52, "useRawPropsJsiValue");
|
||||
markFlagAsAccessed(53, "useRawPropsJsiValue");
|
||||
|
||||
flagValue = currentProvider_->useRawPropsJsiValue();
|
||||
useRawPropsJsiValue_ = flagValue;
|
||||
@@ -992,7 +1010,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(53, "useShadowNodeStateOnClone");
|
||||
markFlagAsAccessed(54, "useShadowNodeStateOnClone");
|
||||
|
||||
flagValue = currentProvider_->useShadowNodeStateOnClone();
|
||||
useShadowNodeStateOnClone_ = flagValue;
|
||||
@@ -1010,7 +1028,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(54, "useTurboModuleInterop");
|
||||
markFlagAsAccessed(55, "useTurboModuleInterop");
|
||||
|
||||
flagValue = currentProvider_->useTurboModuleInterop();
|
||||
useTurboModuleInterop_ = flagValue;
|
||||
@@ -1028,7 +1046,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(55, "useTurboModules");
|
||||
markFlagAsAccessed(56, "useTurboModules");
|
||||
|
||||
flagValue = currentProvider_->useTurboModules();
|
||||
useTurboModules_ = flagValue;
|
||||
@@ -1046,7 +1064,7 @@ double ReactNativeFeatureFlagsAccessor::virtualViewPrerenderRatio() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(56, "virtualViewPrerenderRatio");
|
||||
markFlagAsAccessed(57, "virtualViewPrerenderRatio");
|
||||
|
||||
flagValue = currentProvider_->virtualViewPrerenderRatio();
|
||||
virtualViewPrerenderRatio_ = flagValue;
|
||||
|
||||
+4
-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<<97ea79c3e8cdf6afc4ff44018cda256d>>
|
||||
* @generated SignedSource<<7355987993949fd07c60efac54994d4b>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -36,6 +36,7 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
bool cxxNativeAnimatedEnabled();
|
||||
bool cxxNativeAnimatedRemoveJsSync();
|
||||
bool disableMountItemReorderingAndroid();
|
||||
bool disableOldAndroidAttachmentMetricsWorkarounds();
|
||||
bool disableTextLayoutManagerCacheAndroid();
|
||||
bool enableAccessibilityOrder();
|
||||
bool enableAccumulatedUpdatesInRawPropsAndroid();
|
||||
@@ -100,12 +101,13 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
|
||||
bool wasOverridden_;
|
||||
|
||||
std::array<std::atomic<const char*>, 57> accessedFeatureFlags_;
|
||||
std::array<std::atomic<const char*>, 58> accessedFeatureFlags_;
|
||||
|
||||
std::atomic<std::optional<bool>> commonTestFlag_;
|
||||
std::atomic<std::optional<bool>> cxxNativeAnimatedEnabled_;
|
||||
std::atomic<std::optional<bool>> cxxNativeAnimatedRemoveJsSync_;
|
||||
std::atomic<std::optional<bool>> disableMountItemReorderingAndroid_;
|
||||
std::atomic<std::optional<bool>> disableOldAndroidAttachmentMetricsWorkarounds_;
|
||||
std::atomic<std::optional<bool>> disableTextLayoutManagerCacheAndroid_;
|
||||
std::atomic<std::optional<bool>> enableAccessibilityOrder_;
|
||||
std::atomic<std::optional<bool>> enableAccumulatedUpdatesInRawPropsAndroid_;
|
||||
|
||||
+5
-1
@@ -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<<fbc0fe5e434b2f367ec6e73383a91d4c>>
|
||||
* @generated SignedSource<<ce04a87cb868a9885b18951c3c0822ae>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -43,6 +43,10 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool disableOldAndroidAttachmentMetricsWorkarounds() override {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool disableTextLayoutManagerCacheAndroid() override {
|
||||
return false;
|
||||
}
|
||||
|
||||
+10
-1
@@ -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<<406685c2b45e65315bb5af9b527ca681>>
|
||||
* @generated SignedSource<<f7c839906f0f5c784d05cd4dae80171c>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -81,6 +81,15 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
|
||||
return ReactNativeFeatureFlagsDefaults::disableMountItemReorderingAndroid();
|
||||
}
|
||||
|
||||
bool disableOldAndroidAttachmentMetricsWorkarounds() override {
|
||||
auto value = values_["disableOldAndroidAttachmentMetricsWorkarounds"];
|
||||
if (!value.isNull()) {
|
||||
return value.getBool();
|
||||
}
|
||||
|
||||
return ReactNativeFeatureFlagsDefaults::disableOldAndroidAttachmentMetricsWorkarounds();
|
||||
}
|
||||
|
||||
bool disableTextLayoutManagerCacheAndroid() override {
|
||||
auto value = values_["disableTextLayoutManagerCacheAndroid"];
|
||||
if (!value.isNull()) {
|
||||
|
||||
+2
-1
@@ -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<<2e697819e9d5137ea0ce92275cad2943>>
|
||||
* @generated SignedSource<<2aa195b3a81e14b785768b9d74f77132>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -29,6 +29,7 @@ class ReactNativeFeatureFlagsProvider {
|
||||
virtual bool cxxNativeAnimatedEnabled() = 0;
|
||||
virtual bool cxxNativeAnimatedRemoveJsSync() = 0;
|
||||
virtual bool disableMountItemReorderingAndroid() = 0;
|
||||
virtual bool disableOldAndroidAttachmentMetricsWorkarounds() = 0;
|
||||
virtual bool disableTextLayoutManagerCacheAndroid() = 0;
|
||||
virtual bool enableAccessibilityOrder() = 0;
|
||||
virtual bool enableAccumulatedUpdatesInRawPropsAndroid() = 0;
|
||||
|
||||
+6
-1
@@ -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<<14c2e4494d0aca1228e2d7593e65fa00>>
|
||||
* @generated SignedSource<<38ab47539ec62bb4be34a46bb567e28a>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -64,6 +64,11 @@ bool NativeReactNativeFeatureFlags::disableMountItemReorderingAndroid(
|
||||
return ReactNativeFeatureFlags::disableMountItemReorderingAndroid();
|
||||
}
|
||||
|
||||
bool NativeReactNativeFeatureFlags::disableOldAndroidAttachmentMetricsWorkarounds(
|
||||
jsi::Runtime& /*runtime*/) {
|
||||
return ReactNativeFeatureFlags::disableOldAndroidAttachmentMetricsWorkarounds();
|
||||
}
|
||||
|
||||
bool NativeReactNativeFeatureFlags::disableTextLayoutManagerCacheAndroid(
|
||||
jsi::Runtime& /*runtime*/) {
|
||||
return ReactNativeFeatureFlags::disableTextLayoutManagerCacheAndroid();
|
||||
|
||||
+3
-1
@@ -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<<46d82eb7ba3a33e1411f576ef5d2f28b>>
|
||||
* @generated SignedSource<<854d17fee309ed9228698bd773c5d44e>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -44,6 +44,8 @@ class NativeReactNativeFeatureFlags
|
||||
|
||||
bool disableMountItemReorderingAndroid(jsi::Runtime& runtime);
|
||||
|
||||
bool disableOldAndroidAttachmentMetricsWorkarounds(jsi::Runtime& runtime);
|
||||
|
||||
bool disableTextLayoutManagerCacheAndroid(jsi::Runtime& runtime);
|
||||
|
||||
bool enableAccessibilityOrder(jsi::Runtime& runtime);
|
||||
|
||||
@@ -92,6 +92,17 @@ const definitions: FeatureFlagDefinitions = {
|
||||
},
|
||||
ossReleaseStage: 'none',
|
||||
},
|
||||
disableOldAndroidAttachmentMetricsWorkarounds: {
|
||||
defaultValue: true,
|
||||
metadata: {
|
||||
dateAdded: '2025-07-02',
|
||||
description:
|
||||
'Disable some workarounds for old Android versions in TextLayoutManager logic for retrieving attachment metrics',
|
||||
expectedReleaseValue: true,
|
||||
purpose: 'experimentation',
|
||||
},
|
||||
ossReleaseStage: 'none',
|
||||
},
|
||||
disableTextLayoutManagerCacheAndroid: {
|
||||
defaultValue: false,
|
||||
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<<4abf44d370e3056274df1ac8648c9fb2>>
|
||||
* @generated SignedSource<<b4d192e4eb07d03a9e3aa0fb0e988ba5>>
|
||||
* @flow strict
|
||||
* @noformat
|
||||
*/
|
||||
@@ -55,6 +55,7 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
||||
cxxNativeAnimatedEnabled: Getter<boolean>,
|
||||
cxxNativeAnimatedRemoveJsSync: Getter<boolean>,
|
||||
disableMountItemReorderingAndroid: Getter<boolean>,
|
||||
disableOldAndroidAttachmentMetricsWorkarounds: Getter<boolean>,
|
||||
disableTextLayoutManagerCacheAndroid: Getter<boolean>,
|
||||
enableAccessibilityOrder: Getter<boolean>,
|
||||
enableAccumulatedUpdatesInRawPropsAndroid: Getter<boolean>,
|
||||
@@ -210,6 +211,10 @@ export const cxxNativeAnimatedRemoveJsSync: Getter<boolean> = createNativeFlagGe
|
||||
* Prevent FabricMountingManager from reordering mountItems, which may lead to invalid state on the UI thread
|
||||
*/
|
||||
export const disableMountItemReorderingAndroid: Getter<boolean> = createNativeFlagGetter('disableMountItemReorderingAndroid', false);
|
||||
/**
|
||||
* Disable some workarounds for old Android versions in TextLayoutManager logic for retrieving attachment metrics
|
||||
*/
|
||||
export const disableOldAndroidAttachmentMetricsWorkarounds: Getter<boolean> = createNativeFlagGetter('disableOldAndroidAttachmentMetricsWorkarounds', true);
|
||||
/**
|
||||
* Turns off the global measurement cache used by TextLayoutManager on Android.
|
||||
*/
|
||||
|
||||
+2
-1
@@ -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<<6cac48969d6e6bc72bd7713f9aaaf86e>>
|
||||
* @generated SignedSource<<f8b808af10955953a2fbec2b9a78a489>>
|
||||
* @flow strict
|
||||
* @noformat
|
||||
*/
|
||||
@@ -29,6 +29,7 @@ export interface Spec extends TurboModule {
|
||||
+cxxNativeAnimatedEnabled?: () => boolean;
|
||||
+cxxNativeAnimatedRemoveJsSync?: () => boolean;
|
||||
+disableMountItemReorderingAndroid?: () => boolean;
|
||||
+disableOldAndroidAttachmentMetricsWorkarounds?: () => boolean;
|
||||
+disableTextLayoutManagerCacheAndroid?: () => boolean;
|
||||
+enableAccessibilityOrder?: () => boolean;
|
||||
+enableAccumulatedUpdatesInRawPropsAndroid?: () => boolean;
|
||||
|
||||
Reference in New Issue
Block a user