react-native-tvos 0.79.2-0 → 0.79.4-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/AppDelegate/RCTReactNativeFactory.mm +0 -4
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/README.md +3 -1
- package/React/Base/RCTRootView.h +7 -1
- package/React/Base/RCTRootView.m +38 -0
- package/React/Base/RCTRootViewInternal.h +1 -0
- package/React/Base/RCTTVRemoteSelectHandler.h +4 -0
- package/React/Base/RCTTVRemoteSelectHandler.m +19 -6
- package/React/Base/RCTVersion.m +1 -1
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.h +6 -0
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.mm +37 -0
- package/React/CoreModules/RCTDeviceInfo.mm +51 -19
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI-generated.cpp +0 -6
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +0 -9
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +18 -4
- package/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.mm +1 -1
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +3 -5
- package/React/Views/RCTTVView.m +4 -4
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/publish.gradle +5 -3
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +1 -7
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +1 -11
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +1 -3
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +1 -3
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +1 -12
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Stable_Android.kt +0 -2
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +1 -3
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/BorderRadiusStyle.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +8 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +20 -36
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java +0 -3
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +1 -15
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +1 -4
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/jsc/React-jsc.podspec +1 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +1 -5
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +1 -6
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +8 -26
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +2 -4
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +1 -5
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +1 -10
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +1 -2
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +1 -6
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +1 -3
- package/ReactCommon/react/runtime/TimerManager.cpp +6 -4
- package/ReactCommon/react/runtime/TimerManager.h +3 -1
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm +0 -1
- package/ReactCommon/react/runtime/tests/cxx/ReactInstanceTest.cpp +9 -5
- package/package.json +9 -8
- package/scripts/cocoapods/utils.rb +8 -3
- package/scripts/codegen/generate-artifacts-executor.js +55 -18
- package/sdks/.hermesversion +1 -1
- package/sdks/hermesc/osx-bin/hermes +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/sdks/hermesc/win64-bin/msvcp140.dll +0 -0
- package/sdks/hermesc/win64-bin/vcruntime140.dll +0 -0
- package/sdks/hermesc/win64-bin/vcruntime140_1.dll +0 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +1 -6
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +1 -2
- package/types/index.d.ts +1 -1
- package/types/tsconfig.test.json +16 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<fa641112b3a8888ba2b24cf8829e9382>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -250,12 +250,6 @@ public object ReactNativeFeatureFlags {
|
|
|
250
250
|
@JvmStatic
|
|
251
251
|
public fun useAlwaysAvailableJSErrorHandling(): Boolean = accessor.useAlwaysAvailableJSErrorHandling()
|
|
252
252
|
|
|
253
|
-
/**
|
|
254
|
-
* If true, focusing in ReactEditText will mainly use stock Android requestFocus() behavior. If false it will use legacy custom focus behavior.
|
|
255
|
-
*/
|
|
256
|
-
@JvmStatic
|
|
257
|
-
public fun useEditTextStockAndroidFocusBehavior(): Boolean = accessor.useEditTextStockAndroidFocusBehavior()
|
|
258
|
-
|
|
259
253
|
/**
|
|
260
254
|
* 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.
|
|
261
255
|
*/
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<9ecb711480b7d6c22bac380c28d035bc>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -57,7 +57,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
|
|
57
57
|
private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null
|
|
58
58
|
private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
|
|
59
59
|
private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
|
|
60
|
-
private var useEditTextStockAndroidFocusBehaviorCache: Boolean? = null
|
|
61
60
|
private var useFabricInteropCache: Boolean? = null
|
|
62
61
|
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
|
|
63
62
|
private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null
|
|
@@ -399,15 +398,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
|
|
399
398
|
return cached
|
|
400
399
|
}
|
|
401
400
|
|
|
402
|
-
override fun useEditTextStockAndroidFocusBehavior(): Boolean {
|
|
403
|
-
var cached = useEditTextStockAndroidFocusBehaviorCache
|
|
404
|
-
if (cached == null) {
|
|
405
|
-
cached = ReactNativeFeatureFlagsCxxInterop.useEditTextStockAndroidFocusBehavior()
|
|
406
|
-
useEditTextStockAndroidFocusBehaviorCache = cached
|
|
407
|
-
}
|
|
408
|
-
return cached
|
|
409
|
-
}
|
|
410
|
-
|
|
411
401
|
override fun useFabricInterop(): Boolean {
|
|
412
402
|
var cached = useFabricInteropCache
|
|
413
403
|
if (cached == null) {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<2151e5ec5d04924e742f37b527dc23b9>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -102,8 +102,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
|
|
|
102
102
|
|
|
103
103
|
@DoNotStrip @JvmStatic public external fun useAlwaysAvailableJSErrorHandling(): Boolean
|
|
104
104
|
|
|
105
|
-
@DoNotStrip @JvmStatic public external fun useEditTextStockAndroidFocusBehavior(): Boolean
|
|
106
|
-
|
|
107
105
|
@DoNotStrip @JvmStatic public external fun useFabricInterop(): Boolean
|
|
108
106
|
|
|
109
107
|
@DoNotStrip @JvmStatic public external fun useNativeViewConfigsInBridgelessMode(): Boolean
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<56f86a3a0c0bbf453cf45a0db541ef54>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -97,8 +97,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
|
|
97
97
|
|
|
98
98
|
override fun useAlwaysAvailableJSErrorHandling(): Boolean = false
|
|
99
99
|
|
|
100
|
-
override fun useEditTextStockAndroidFocusBehavior(): Boolean = true
|
|
101
|
-
|
|
102
100
|
override fun useFabricInterop(): Boolean = false
|
|
103
101
|
|
|
104
102
|
override fun useNativeViewConfigsInBridgelessMode(): Boolean = false
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<5b016fd6298477856116736e37c37c6f>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -61,7 +61,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
|
|
61
61
|
private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null
|
|
62
62
|
private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
|
|
63
63
|
private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
|
|
64
|
-
private var useEditTextStockAndroidFocusBehaviorCache: Boolean? = null
|
|
65
64
|
private var useFabricInteropCache: Boolean? = null
|
|
66
65
|
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
|
|
67
66
|
private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null
|
|
@@ -440,16 +439,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
|
|
440
439
|
return cached
|
|
441
440
|
}
|
|
442
441
|
|
|
443
|
-
override fun useEditTextStockAndroidFocusBehavior(): Boolean {
|
|
444
|
-
var cached = useEditTextStockAndroidFocusBehaviorCache
|
|
445
|
-
if (cached == null) {
|
|
446
|
-
cached = currentProvider.useEditTextStockAndroidFocusBehavior()
|
|
447
|
-
accessedFeatureFlags.add("useEditTextStockAndroidFocusBehavior")
|
|
448
|
-
useEditTextStockAndroidFocusBehaviorCache = cached
|
|
449
|
-
}
|
|
450
|
-
return cached
|
|
451
|
-
}
|
|
452
|
-
|
|
453
442
|
override fun useFabricInterop(): Boolean {
|
|
454
443
|
var cached = useFabricInteropCache
|
|
455
444
|
if (cached == null) {
|
|
@@ -18,7 +18,5 @@ public class ReactNativeFeatureFlagsOverrides_RNOSS_Stable_Android(
|
|
|
18
18
|
|
|
19
19
|
override fun useTurboModules(): Boolean = bridgelessEnabled || turboModulesEnabled
|
|
20
20
|
|
|
21
|
-
override fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean = true
|
|
22
|
-
|
|
23
21
|
override fun useShadowNodeStateOnClone(): Boolean = true
|
|
24
22
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<b4d6157922f6182dd588d5ae5b54ead9>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -97,8 +97,6 @@ public interface ReactNativeFeatureFlagsProvider {
|
|
|
97
97
|
|
|
98
98
|
@DoNotStrip public fun useAlwaysAvailableJSErrorHandling(): Boolean
|
|
99
99
|
|
|
100
|
-
@DoNotStrip public fun useEditTextStockAndroidFocusBehavior(): Boolean
|
|
101
|
-
|
|
102
100
|
@DoNotStrip public fun useFabricInterop(): Boolean
|
|
103
101
|
|
|
104
102
|
@DoNotStrip public fun useNativeViewConfigsInBridgelessMode(): Boolean
|
|
@@ -136,10 +136,10 @@ internal data class BorderRadiusStyle(
|
|
|
136
136
|
(startStart ?: topStart ?: topLeft ?: uniform)?.resolve(width, height)
|
|
137
137
|
?: zeroRadii,
|
|
138
138
|
bottomLeft =
|
|
139
|
-
(endEnd ?:
|
|
139
|
+
(endEnd ?: bottomEnd ?: bottomRight ?: uniform)?.resolve(width, height)
|
|
140
140
|
?: zeroRadii,
|
|
141
141
|
bottomRight =
|
|
142
|
-
(startEnd ?:
|
|
142
|
+
(startEnd ?: bottomStart ?: bottomLeft ?: uniform)?.resolve(width, height)
|
|
143
143
|
?: zeroRadii,
|
|
144
144
|
width = width,
|
|
145
145
|
height = height,
|
package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java
CHANGED
|
@@ -171,7 +171,7 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
171
171
|
|
|
172
172
|
@Override
|
|
173
173
|
protected int computeScrollDeltaToGetChildRectOnScreen(Rect rect) {
|
|
174
|
-
if (mScrollEnabled) {
|
|
174
|
+
if (!mScrollEnabled) {
|
|
175
175
|
return 0;
|
|
176
176
|
}
|
|
177
177
|
return super.computeScrollDeltaToGetChildRectOnScreen(rect);
|
|
@@ -402,6 +402,14 @@ public class ReactScrollView extends ScrollView
|
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
404
|
|
|
405
|
+
@Override
|
|
406
|
+
protected int computeScrollDeltaToGetChildRectOnScreen(Rect rect) {
|
|
407
|
+
if (!mScrollEnabled) {
|
|
408
|
+
return 0;
|
|
409
|
+
}
|
|
410
|
+
return super.computeScrollDeltaToGetChildRectOnScreen(rect);
|
|
411
|
+
}
|
|
412
|
+
|
|
405
413
|
@Override
|
|
406
414
|
protected void onScrollChanged(int x, int y, int oldX, int oldY) {
|
|
407
415
|
Systrace.beginSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "ReactScrollView.onScrollChanged");
|
|
@@ -41,6 +41,7 @@ import android.view.Menu;
|
|
|
41
41
|
import android.view.MenuItem;
|
|
42
42
|
import android.view.MotionEvent;
|
|
43
43
|
import android.view.View;
|
|
44
|
+
import android.view.ViewGroup;
|
|
44
45
|
import android.view.accessibility.AccessibilityNodeInfo;
|
|
45
46
|
import android.view.inputmethod.EditorInfo;
|
|
46
47
|
import android.view.inputmethod.InputConnection;
|
|
@@ -153,9 +154,6 @@ public class ReactEditText extends AppCompatEditText {
|
|
|
153
154
|
|
|
154
155
|
public ReactEditText(Context context) {
|
|
155
156
|
super(context);
|
|
156
|
-
if (!ReactNativeFeatureFlags.useEditTextStockAndroidFocusBehavior()) {
|
|
157
|
-
setFocusableInTouchMode(false);
|
|
158
|
-
}
|
|
159
157
|
|
|
160
158
|
mInputMethodManager =
|
|
161
159
|
(InputMethodManager)
|
|
@@ -198,9 +196,7 @@ public class ReactEditText extends AppCompatEditText {
|
|
|
198
196
|
// selection on accessibility click to undo that.
|
|
199
197
|
setSelection(length);
|
|
200
198
|
}
|
|
201
|
-
return
|
|
202
|
-
? requestFocusProgramatically()
|
|
203
|
-
: requestFocusInternal();
|
|
199
|
+
return requestFocusProgramatically();
|
|
204
200
|
}
|
|
205
201
|
return super.performAccessibilityAction(host, action, args);
|
|
206
202
|
}
|
|
@@ -369,30 +365,30 @@ public class ReactEditText extends AppCompatEditText {
|
|
|
369
365
|
return super.onTextContextMenuItem(id);
|
|
370
366
|
}
|
|
371
367
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
368
|
+
public void clearFocusAndMaybeRefocus() {
|
|
369
|
+
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.P || !isInTouchMode()) {
|
|
370
|
+
super.clearFocus();
|
|
371
|
+
} else {
|
|
372
|
+
// Avoid refocusing to a new view on old versions of Android by default
|
|
373
|
+
// by preventing `requestFocus()` on the rootView from moving focus to any child.
|
|
374
|
+
// https://cs.android.com/android/_/android/platform/frameworks/base/+/bdc66cb5a0ef513f4306edf9156cc978b08e06e4
|
|
375
|
+
ViewGroup rootViewGroup = (ViewGroup)getRootView();
|
|
376
|
+
int oldDescendantFocusability = rootViewGroup.getDescendantFocusability();
|
|
377
|
+
rootViewGroup.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);
|
|
378
|
+
super.clearFocus();
|
|
379
|
+
rootViewGroup.setDescendantFocusability(oldDescendantFocusability);
|
|
377
380
|
}
|
|
378
|
-
super.clearFocus();
|
|
379
381
|
isKeyboardOpened = false;
|
|
380
382
|
hideSoftKeyboard();
|
|
381
383
|
}
|
|
382
384
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
// This is a no-op so that when the OS calls requestFocus(), nothing will happen. ReactEditText
|
|
386
|
-
// is a controlled component, which means its focus is controlled by JS, with two exceptions:
|
|
387
|
-
// autofocus when it's attached to the window, and responding to accessibility events. In both
|
|
388
|
-
// of these cases, we call requestFocusInternal() directly.
|
|
389
|
-
return ReactNativeFeatureFlags.useEditTextStockAndroidFocusBehavior()
|
|
390
|
-
? super.requestFocus(direction, previouslyFocusedRect)
|
|
391
|
-
: isFocused();
|
|
385
|
+
/* package */ void clearFocusFromJS() {
|
|
386
|
+
clearFocusAndMaybeRefocus();
|
|
392
387
|
}
|
|
393
388
|
|
|
394
389
|
private boolean requestFocusInternal() {
|
|
395
|
-
|
|
390
|
+
// We must explicitly call this method on the super class; if we call requestFocus() without
|
|
391
|
+
// any arguments, it will call into the overridden requestFocus(int, Rect) above, which no-ops.
|
|
396
392
|
boolean focused = super.requestFocus(View.FOCUS_DOWN, null);
|
|
397
393
|
if (getShowSoftInputOnFocus()) {
|
|
398
394
|
showSoftKeyboard();
|
|
@@ -693,15 +689,7 @@ public class ReactEditText extends AppCompatEditText {
|
|
|
693
689
|
|
|
694
690
|
// VisibleForTesting from {@link TextInputEventsTestCase}.
|
|
695
691
|
public void requestFocusFromJS() {
|
|
696
|
-
|
|
697
|
-
requestFocusProgramatically();
|
|
698
|
-
} else {
|
|
699
|
-
requestFocusInternal();
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
/* package */ void clearFocusFromJS() {
|
|
704
|
-
clearFocus();
|
|
692
|
+
requestFocusProgramatically();
|
|
705
693
|
}
|
|
706
694
|
|
|
707
695
|
// VisibleForTesting from {@link TextInputEventsTestCase}.
|
|
@@ -1166,11 +1154,7 @@ public class ReactEditText extends AppCompatEditText {
|
|
|
1166
1154
|
}
|
|
1167
1155
|
|
|
1168
1156
|
if (mAutoFocus && !mDidAttachToWindow) {
|
|
1169
|
-
|
|
1170
|
-
requestFocusProgramatically();
|
|
1171
|
-
} else {
|
|
1172
|
-
requestFocusInternal();
|
|
1173
|
-
}
|
|
1157
|
+
requestFocusProgramatically();
|
|
1174
1158
|
}
|
|
1175
1159
|
|
|
1176
1160
|
mDidAttachToWindow = true;
|
package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java
CHANGED
|
@@ -1164,7 +1164,7 @@ public class ReactTextInputManager extends BaseViewManager<ReactEditText, Layout
|
|
|
1164
1164
|
}
|
|
1165
1165
|
|
|
1166
1166
|
if (shouldBlur) {
|
|
1167
|
-
editText.
|
|
1167
|
+
editText.clearFocusAndMaybeRefocus();
|
|
1168
1168
|
}
|
|
1169
1169
|
|
|
1170
1170
|
// Prevent default behavior except when we want it to insert a newline.
|
|
@@ -710,9 +710,6 @@ public class ReactViewGroup extends ViewGroup
|
|
|
710
710
|
UiThreadUtil.assertOnUiThread();
|
|
711
711
|
checkViewClippingTag(child, Boolean.TRUE);
|
|
712
712
|
if (!customDrawOrderDisabled()) {
|
|
713
|
-
if (indexOfChild(child) == -1) {
|
|
714
|
-
return;
|
|
715
|
-
}
|
|
716
713
|
getDrawingOrderHelper().handleRemoveView(child);
|
|
717
714
|
setChildrenDrawingOrderEnabled(getDrawingOrderHelper().shouldEnableCustomDrawingOrder());
|
|
718
715
|
} else {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<cf0734c38bab916ecaf361bc557b8802>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -261,12 +261,6 @@ class ReactNativeFeatureFlagsProviderHolder
|
|
|
261
261
|
return method(javaProvider_);
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
bool useEditTextStockAndroidFocusBehavior() override {
|
|
265
|
-
static const auto method =
|
|
266
|
-
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useEditTextStockAndroidFocusBehavior");
|
|
267
|
-
return method(javaProvider_);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
264
|
bool useFabricInterop() override {
|
|
271
265
|
static const auto method =
|
|
272
266
|
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useFabricInterop");
|
|
@@ -498,11 +492,6 @@ bool JReactNativeFeatureFlagsCxxInterop::useAlwaysAvailableJSErrorHandling(
|
|
|
498
492
|
return ReactNativeFeatureFlags::useAlwaysAvailableJSErrorHandling();
|
|
499
493
|
}
|
|
500
494
|
|
|
501
|
-
bool JReactNativeFeatureFlagsCxxInterop::useEditTextStockAndroidFocusBehavior(
|
|
502
|
-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
503
|
-
return ReactNativeFeatureFlags::useEditTextStockAndroidFocusBehavior();
|
|
504
|
-
}
|
|
505
|
-
|
|
506
495
|
bool JReactNativeFeatureFlagsCxxInterop::useFabricInterop(
|
|
507
496
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
508
497
|
return ReactNativeFeatureFlags::useFabricInterop();
|
|
@@ -680,9 +669,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
|
|
680
669
|
makeNativeMethod(
|
|
681
670
|
"useAlwaysAvailableJSErrorHandling",
|
|
682
671
|
JReactNativeFeatureFlagsCxxInterop::useAlwaysAvailableJSErrorHandling),
|
|
683
|
-
makeNativeMethod(
|
|
684
|
-
"useEditTextStockAndroidFocusBehavior",
|
|
685
|
-
JReactNativeFeatureFlagsCxxInterop::useEditTextStockAndroidFocusBehavior),
|
|
686
672
|
makeNativeMethod(
|
|
687
673
|
"useFabricInterop",
|
|
688
674
|
JReactNativeFeatureFlagsCxxInterop::useFabricInterop),
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<f295d109e9a81ce2d2040a5fc89e9ada>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -141,9 +141,6 @@ class JReactNativeFeatureFlagsCxxInterop
|
|
|
141
141
|
static bool useAlwaysAvailableJSErrorHandling(
|
|
142
142
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
143
143
|
|
|
144
|
-
static bool useEditTextStockAndroidFocusBehavior(
|
|
145
|
-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
146
|
-
|
|
147
144
|
static bool useFabricInterop(
|
|
148
145
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
149
146
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<1c90106ded5dc5f08cdec4dede695341>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -174,10 +174,6 @@ bool ReactNativeFeatureFlags::useAlwaysAvailableJSErrorHandling() {
|
|
|
174
174
|
return getAccessor().useAlwaysAvailableJSErrorHandling();
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
bool ReactNativeFeatureFlags::useEditTextStockAndroidFocusBehavior() {
|
|
178
|
-
return getAccessor().useEditTextStockAndroidFocusBehavior();
|
|
179
|
-
}
|
|
180
|
-
|
|
181
177
|
bool ReactNativeFeatureFlags::useFabricInterop() {
|
|
182
178
|
return getAccessor().useFabricInterop();
|
|
183
179
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<ce2f5895234f1cfb30374c72db54ccce>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -224,11 +224,6 @@ class ReactNativeFeatureFlags {
|
|
|
224
224
|
*/
|
|
225
225
|
RN_EXPORT static bool useAlwaysAvailableJSErrorHandling();
|
|
226
226
|
|
|
227
|
-
/**
|
|
228
|
-
* If true, focusing in ReactEditText will mainly use stock Android requestFocus() behavior. If false it will use legacy custom focus behavior.
|
|
229
|
-
*/
|
|
230
|
-
RN_EXPORT static bool useEditTextStockAndroidFocusBehavior();
|
|
231
|
-
|
|
232
227
|
/**
|
|
233
228
|
* 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.
|
|
234
229
|
*/
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<f975f6ffd2d6ec5d9057585ac0613c23>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -695,24 +695,6 @@ bool ReactNativeFeatureFlagsAccessor::useAlwaysAvailableJSErrorHandling() {
|
|
|
695
695
|
return flagValue.value();
|
|
696
696
|
}
|
|
697
697
|
|
|
698
|
-
bool ReactNativeFeatureFlagsAccessor::useEditTextStockAndroidFocusBehavior() {
|
|
699
|
-
auto flagValue = useEditTextStockAndroidFocusBehavior_.load();
|
|
700
|
-
|
|
701
|
-
if (!flagValue.has_value()) {
|
|
702
|
-
// This block is not exclusive but it is not necessary.
|
|
703
|
-
// If multiple threads try to initialize the feature flag, we would only
|
|
704
|
-
// be accessing the provider multiple times but the end state of this
|
|
705
|
-
// instance and the returned flag value would be the same.
|
|
706
|
-
|
|
707
|
-
markFlagAsAccessed(37, "useEditTextStockAndroidFocusBehavior");
|
|
708
|
-
|
|
709
|
-
flagValue = currentProvider_->useEditTextStockAndroidFocusBehavior();
|
|
710
|
-
useEditTextStockAndroidFocusBehavior_ = flagValue;
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
return flagValue.value();
|
|
714
|
-
}
|
|
715
|
-
|
|
716
698
|
bool ReactNativeFeatureFlagsAccessor::useFabricInterop() {
|
|
717
699
|
auto flagValue = useFabricInterop_.load();
|
|
718
700
|
|
|
@@ -722,7 +704,7 @@ bool ReactNativeFeatureFlagsAccessor::useFabricInterop() {
|
|
|
722
704
|
// be accessing the provider multiple times but the end state of this
|
|
723
705
|
// instance and the returned flag value would be the same.
|
|
724
706
|
|
|
725
|
-
markFlagAsAccessed(
|
|
707
|
+
markFlagAsAccessed(37, "useFabricInterop");
|
|
726
708
|
|
|
727
709
|
flagValue = currentProvider_->useFabricInterop();
|
|
728
710
|
useFabricInterop_ = flagValue;
|
|
@@ -740,7 +722,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() {
|
|
|
740
722
|
// be accessing the provider multiple times but the end state of this
|
|
741
723
|
// instance and the returned flag value would be the same.
|
|
742
724
|
|
|
743
|
-
markFlagAsAccessed(
|
|
725
|
+
markFlagAsAccessed(38, "useNativeViewConfigsInBridgelessMode");
|
|
744
726
|
|
|
745
727
|
flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
|
|
746
728
|
useNativeViewConfigsInBridgelessMode_ = flagValue;
|
|
@@ -758,7 +740,7 @@ bool ReactNativeFeatureFlagsAccessor::useOptimizedEventBatchingOnAndroid() {
|
|
|
758
740
|
// be accessing the provider multiple times but the end state of this
|
|
759
741
|
// instance and the returned flag value would be the same.
|
|
760
742
|
|
|
761
|
-
markFlagAsAccessed(
|
|
743
|
+
markFlagAsAccessed(39, "useOptimizedEventBatchingOnAndroid");
|
|
762
744
|
|
|
763
745
|
flagValue = currentProvider_->useOptimizedEventBatchingOnAndroid();
|
|
764
746
|
useOptimizedEventBatchingOnAndroid_ = flagValue;
|
|
@@ -776,7 +758,7 @@ bool ReactNativeFeatureFlagsAccessor::useRawPropsJsiValue() {
|
|
|
776
758
|
// be accessing the provider multiple times but the end state of this
|
|
777
759
|
// instance and the returned flag value would be the same.
|
|
778
760
|
|
|
779
|
-
markFlagAsAccessed(
|
|
761
|
+
markFlagAsAccessed(40, "useRawPropsJsiValue");
|
|
780
762
|
|
|
781
763
|
flagValue = currentProvider_->useRawPropsJsiValue();
|
|
782
764
|
useRawPropsJsiValue_ = flagValue;
|
|
@@ -794,7 +776,7 @@ bool ReactNativeFeatureFlagsAccessor::useShadowNodeStateOnClone() {
|
|
|
794
776
|
// be accessing the provider multiple times but the end state of this
|
|
795
777
|
// instance and the returned flag value would be the same.
|
|
796
778
|
|
|
797
|
-
markFlagAsAccessed(
|
|
779
|
+
markFlagAsAccessed(41, "useShadowNodeStateOnClone");
|
|
798
780
|
|
|
799
781
|
flagValue = currentProvider_->useShadowNodeStateOnClone();
|
|
800
782
|
useShadowNodeStateOnClone_ = flagValue;
|
|
@@ -812,7 +794,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() {
|
|
|
812
794
|
// be accessing the provider multiple times but the end state of this
|
|
813
795
|
// instance and the returned flag value would be the same.
|
|
814
796
|
|
|
815
|
-
markFlagAsAccessed(
|
|
797
|
+
markFlagAsAccessed(42, "useTurboModuleInterop");
|
|
816
798
|
|
|
817
799
|
flagValue = currentProvider_->useTurboModuleInterop();
|
|
818
800
|
useTurboModuleInterop_ = flagValue;
|
|
@@ -830,7 +812,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModules() {
|
|
|
830
812
|
// be accessing the provider multiple times but the end state of this
|
|
831
813
|
// instance and the returned flag value would be the same.
|
|
832
814
|
|
|
833
|
-
markFlagAsAccessed(
|
|
815
|
+
markFlagAsAccessed(43, "useTurboModules");
|
|
834
816
|
|
|
835
817
|
flagValue = currentProvider_->useTurboModules();
|
|
836
818
|
useTurboModules_ = flagValue;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<978f828e7368b8802f8eaa5194e86e2f>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -69,7 +69,6 @@ class ReactNativeFeatureFlagsAccessor {
|
|
|
69
69
|
bool traceTurboModulePromiseRejectionsOnAndroid();
|
|
70
70
|
bool updateRuntimeShadowNodeReferencesOnCommit();
|
|
71
71
|
bool useAlwaysAvailableJSErrorHandling();
|
|
72
|
-
bool useEditTextStockAndroidFocusBehavior();
|
|
73
72
|
bool useFabricInterop();
|
|
74
73
|
bool useNativeViewConfigsInBridgelessMode();
|
|
75
74
|
bool useOptimizedEventBatchingOnAndroid();
|
|
@@ -88,7 +87,7 @@ class ReactNativeFeatureFlagsAccessor {
|
|
|
88
87
|
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
|
|
89
88
|
bool wasOverridden_;
|
|
90
89
|
|
|
91
|
-
std::array<std::atomic<const char*>,
|
|
90
|
+
std::array<std::atomic<const char*>, 44> accessedFeatureFlags_;
|
|
92
91
|
|
|
93
92
|
std::atomic<std::optional<bool>> commonTestFlag_;
|
|
94
93
|
std::atomic<std::optional<bool>> disableMountItemReorderingAndroid_;
|
|
@@ -127,7 +126,6 @@ class ReactNativeFeatureFlagsAccessor {
|
|
|
127
126
|
std::atomic<std::optional<bool>> traceTurboModulePromiseRejectionsOnAndroid_;
|
|
128
127
|
std::atomic<std::optional<bool>> updateRuntimeShadowNodeReferencesOnCommit_;
|
|
129
128
|
std::atomic<std::optional<bool>> useAlwaysAvailableJSErrorHandling_;
|
|
130
|
-
std::atomic<std::optional<bool>> useEditTextStockAndroidFocusBehavior_;
|
|
131
129
|
std::atomic<std::optional<bool>> useFabricInterop_;
|
|
132
130
|
std::atomic<std::optional<bool>> useNativeViewConfigsInBridgelessMode_;
|
|
133
131
|
std::atomic<std::optional<bool>> useOptimizedEventBatchingOnAndroid_;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<643c1fd24fbc1a77ef109e712023f9d5>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -175,10 +175,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
|
|
175
175
|
return false;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
bool useEditTextStockAndroidFocusBehavior() override {
|
|
179
|
-
return true;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
178
|
bool useFabricInterop() override {
|
|
183
179
|
return false;
|
|
184
180
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<a0aeb1ef5255e98ab3df8e892a6147f4>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -378,15 +378,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
|
|
|
378
378
|
return ReactNativeFeatureFlagsDefaults::useAlwaysAvailableJSErrorHandling();
|
|
379
379
|
}
|
|
380
380
|
|
|
381
|
-
bool useEditTextStockAndroidFocusBehavior() override {
|
|
382
|
-
auto value = values_["useEditTextStockAndroidFocusBehavior"];
|
|
383
|
-
if (!value.isNull()) {
|
|
384
|
-
return value.getBool();
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
return ReactNativeFeatureFlagsDefaults::useEditTextStockAndroidFocusBehavior();
|
|
388
|
-
}
|
|
389
|
-
|
|
390
381
|
bool useFabricInterop() override {
|
|
391
382
|
auto value = values_["useFabricInterop"];
|
|
392
383
|
if (!value.isNull()) {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<4db2ff36701f0dbcd3dd59fa5879a612>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -62,7 +62,6 @@ class ReactNativeFeatureFlagsProvider {
|
|
|
62
62
|
virtual bool traceTurboModulePromiseRejectionsOnAndroid() = 0;
|
|
63
63
|
virtual bool updateRuntimeShadowNodeReferencesOnCommit() = 0;
|
|
64
64
|
virtual bool useAlwaysAvailableJSErrorHandling() = 0;
|
|
65
|
-
virtual bool useEditTextStockAndroidFocusBehavior() = 0;
|
|
66
65
|
virtual bool useFabricInterop() = 0;
|
|
67
66
|
virtual bool useNativeViewConfigsInBridgelessMode() = 0;
|
|
68
67
|
virtual bool useOptimizedEventBatchingOnAndroid() = 0;
|