react-native 0.82.0-nightly-20250807-2768c8444 → 0.82.0-nightly-20250808-aaf471278
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/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Renderer/shims/ReactFabric.js +1 -3
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +1 -3
- package/Libraries/Renderer/shims/ReactNative.js +1 -3
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +1 -3
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +1 -3
- package/Libraries/Utilities/HMRClient.js +0 -1
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/api/ReactAndroid.api +71 -92
- package/ReactAndroid/build.gradle.kts +1 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +15 -1
- package/ReactAndroid/src/main/java/com/facebook/react/ReactNativeHost.java +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java +6 -5
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevSupportManagerFactory.kt +5 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerFactory.kt +6 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +19 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/deviceinfo/DeviceInfoModule.kt +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactInstance.kt +4 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/DisplayMetricsHolder.kt +76 -17
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/PixelUtil.kt +4 -4
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +11 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/AbstractLayoutAnimation.kt +5 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/AnimatedPropertyType.kt +5 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/BaseLayoutAnimation.kt +5 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/InterpolatorType.kt +5 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationController.kt +5 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationListener.kt +5 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationType.kt +5 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutCreateAnimation.kt +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutDeleteAnimation.kt +5 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutHandlingAnimation.kt +5 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutUpdateAnimation.kt +5 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/OpacityAnimation.kt +5 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/PositionAndSizeAnimation.kt +5 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/SimpleSpringInterpolator.kt +5 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt +0 -26
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/VirtualViewContainer.kt +11 -7
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.kt +561 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.kt +45 -41
- package/ReactAndroid/src/main/java/com/facebook/react/views/virtual/view/ReactVirtualView.kt +9 -6
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaConstants.kt +18 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/react/renderer/components/modal/ModalHostViewComponentDescriptor.cpp +48 -0
- package/ReactCommon/react/renderer/components/modal/ModalHostViewComponentDescriptor.h +10 -0
- package/ReactCommon/react/renderer/components/modal/platform/android/ModalHostViewUtils.cpp +1 -2
- package/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchShadowNode.cpp +1 -0
- package/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchShadowNode.h +1 -0
- package/gradle/libs.versions.toml +2 -0
- package/package.json +8 -8
- package/scripts/cocoapods/new_architecture.rb +1 -0
- package/scripts/cocoapods/utils.rb +2 -0
- package/scripts/codegen/templates/ReactCodegen.podspec.template +1 -0
- package/scripts/react_native_pods.rb +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/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.java +0 -811
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaConstants.java +0 -25
- package/ReactCommon/react/renderer/components/modal/platform/android/JReactModalHostView.h +0 -38
|
@@ -29,7 +29,7 @@ export default class ReactNativeVersion {
|
|
|
29
29
|
static major: number = 0;
|
|
30
30
|
static minor: number = 82;
|
|
31
31
|
static patch: number = 0;
|
|
32
|
-
static prerelease: string | null = 'nightly-
|
|
32
|
+
static prerelease: string | null = 'nightly-20250808-aaf471278';
|
|
33
33
|
|
|
34
34
|
static getVersionString(): string {
|
|
35
35
|
return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
|
|
@@ -7,9 +7,7 @@
|
|
|
7
7
|
* @noformat
|
|
8
8
|
* @nolint
|
|
9
9
|
* @flow strict-local
|
|
10
|
-
* @generated SignedSource<<
|
|
11
|
-
*
|
|
12
|
-
* This file was sync'd from the facebook/react repository.
|
|
10
|
+
* @generated SignedSource<<908f5fb85384725318e261f40e49d9a6>>
|
|
13
11
|
*/
|
|
14
12
|
|
|
15
13
|
'use strict';
|
|
@@ -7,9 +7,7 @@
|
|
|
7
7
|
* @noformat
|
|
8
8
|
* @nolint
|
|
9
9
|
* @flow strict-local
|
|
10
|
-
* @generated SignedSource<<
|
|
11
|
-
*
|
|
12
|
-
* This file was sync'd from the facebook/react repository.
|
|
10
|
+
* @generated SignedSource<<83073425aa3f71ced2c8c51f25a25938>>
|
|
13
11
|
*/
|
|
14
12
|
|
|
15
13
|
'use strict';
|
|
@@ -7,9 +7,7 @@
|
|
|
7
7
|
* @noformat
|
|
8
8
|
* @nolint
|
|
9
9
|
* @flow strict-local
|
|
10
|
-
* @generated SignedSource<<
|
|
11
|
-
*
|
|
12
|
-
* This file was sync'd from the facebook/react repository.
|
|
10
|
+
* @generated SignedSource<<52163887de05f1cff05388145cf85b3b>>
|
|
13
11
|
*/
|
|
14
12
|
|
|
15
13
|
'use strict';
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
|
|
|
24
24
|
RCTVersionMajor: @(0),
|
|
25
25
|
RCTVersionMinor: @(82),
|
|
26
26
|
RCTVersionPatch: @(0),
|
|
27
|
-
RCTVersionPrerelease: @"nightly-
|
|
27
|
+
RCTVersionPrerelease: @"nightly-20250808-aaf471278",
|
|
28
28
|
};
|
|
29
29
|
});
|
|
30
30
|
return __rnVersion;
|
|
@@ -3348,8 +3348,10 @@ public final class com/facebook/react/uimanager/DisplayMetricsHolder {
|
|
|
3348
3348
|
public static final fun getDisplayMetricsWritableMap (D)Lcom/facebook/react/bridge/WritableMap;
|
|
3349
3349
|
public static final fun getScreenDisplayMetrics ()Landroid/util/DisplayMetrics;
|
|
3350
3350
|
public static final fun getWindowDisplayMetrics ()Landroid/util/DisplayMetrics;
|
|
3351
|
-
public static final fun
|
|
3352
|
-
public static final fun
|
|
3351
|
+
public static final fun initScreenDisplayMetrics (Landroid/content/Context;)V
|
|
3352
|
+
public static final fun initScreenDisplayMetricsIfNotInitialized (Landroid/content/Context;)V
|
|
3353
|
+
public static final fun initWindowDisplayMetrics (Landroid/content/Context;)V
|
|
3354
|
+
public static final fun initWindowDisplayMetricsIfNotInitialized (Landroid/content/Context;)V
|
|
3353
3355
|
public static final fun setScreenDisplayMetrics (Landroid/util/DisplayMetrics;)V
|
|
3354
3356
|
public static final fun setWindowDisplayMetrics (Landroid/util/DisplayMetrics;)V
|
|
3355
3357
|
}
|
|
@@ -6211,97 +6213,74 @@ public final class com/facebook/react/views/text/ReactTypefaceUtils {
|
|
|
6211
6213
|
public static final fun parseFontWeight (Ljava/lang/String;)I
|
|
6212
6214
|
}
|
|
6213
6215
|
|
|
6214
|
-
public class com/facebook/react/views/text/TextAttributeProps {
|
|
6215
|
-
public static final field
|
|
6216
|
-
public static final field
|
|
6217
|
-
public static final field
|
|
6218
|
-
public static final field
|
|
6219
|
-
public static final field
|
|
6220
|
-
public static final field
|
|
6221
|
-
public static final field
|
|
6222
|
-
public static final field
|
|
6223
|
-
public static final field
|
|
6224
|
-
public static final field
|
|
6225
|
-
public static final field
|
|
6226
|
-
public static final field
|
|
6227
|
-
public static final field
|
|
6228
|
-
public static final field
|
|
6229
|
-
public static final field
|
|
6230
|
-
public static final field
|
|
6231
|
-
public static final field
|
|
6232
|
-
public static final field
|
|
6233
|
-
public static final field
|
|
6234
|
-
public static final field
|
|
6235
|
-
public static final field
|
|
6236
|
-
public static final field
|
|
6237
|
-
public static final field
|
|
6238
|
-
public static final field
|
|
6239
|
-
public static final field
|
|
6240
|
-
public static final field
|
|
6241
|
-
public static final field
|
|
6242
|
-
public static final field
|
|
6216
|
+
public final class com/facebook/react/views/text/TextAttributeProps {
|
|
6217
|
+
public static final field Companion Lcom/facebook/react/views/text/TextAttributeProps$Companion;
|
|
6218
|
+
public static final field TA_KEY_ACCESSIBILITY_ROLE I
|
|
6219
|
+
public static final field TA_KEY_ALIGNMENT I
|
|
6220
|
+
public static final field TA_KEY_ALLOW_FONT_SCALING I
|
|
6221
|
+
public static final field TA_KEY_BACKGROUND_COLOR I
|
|
6222
|
+
public static final field TA_KEY_BEST_WRITING_DIRECTION I
|
|
6223
|
+
public static final field TA_KEY_FONT_FAMILY I
|
|
6224
|
+
public static final field TA_KEY_FONT_SIZE I
|
|
6225
|
+
public static final field TA_KEY_FONT_SIZE_MULTIPLIER I
|
|
6226
|
+
public static final field TA_KEY_FONT_STYLE I
|
|
6227
|
+
public static final field TA_KEY_FONT_VARIANT I
|
|
6228
|
+
public static final field TA_KEY_FONT_WEIGHT I
|
|
6229
|
+
public static final field TA_KEY_FOREGROUND_COLOR I
|
|
6230
|
+
public static final field TA_KEY_IS_HIGHLIGHTED I
|
|
6231
|
+
public static final field TA_KEY_LAYOUT_DIRECTION I
|
|
6232
|
+
public static final field TA_KEY_LETTER_SPACING I
|
|
6233
|
+
public static final field TA_KEY_LINE_BREAK_STRATEGY I
|
|
6234
|
+
public static final field TA_KEY_LINE_HEIGHT I
|
|
6235
|
+
public static final field TA_KEY_MAX_FONT_SIZE_MULTIPLIER I
|
|
6236
|
+
public static final field TA_KEY_OPACITY I
|
|
6237
|
+
public static final field TA_KEY_ROLE I
|
|
6238
|
+
public static final field TA_KEY_TEXT_DECORATION_COLOR I
|
|
6239
|
+
public static final field TA_KEY_TEXT_DECORATION_LINE I
|
|
6240
|
+
public static final field TA_KEY_TEXT_DECORATION_STYLE I
|
|
6241
|
+
public static final field TA_KEY_TEXT_SHADOW_COLOR I
|
|
6242
|
+
public static final field TA_KEY_TEXT_SHADOW_OFFSET_DX I
|
|
6243
|
+
public static final field TA_KEY_TEXT_SHADOW_OFFSET_DY I
|
|
6244
|
+
public static final field TA_KEY_TEXT_SHADOW_RADIUS I
|
|
6245
|
+
public static final field TA_KEY_TEXT_TRANSFORM I
|
|
6243
6246
|
public static final field UNSET I
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
public
|
|
6276
|
-
public
|
|
6277
|
-
public fun
|
|
6278
|
-
public fun
|
|
6279
|
-
public fun
|
|
6280
|
-
public fun
|
|
6281
|
-
public fun getEffectiveLetterSpacing ()F
|
|
6282
|
-
public fun getEffectiveLineHeight ()F
|
|
6283
|
-
public static fun getEllipsizeMode (Ljava/lang/String;)Landroid/text/TextUtils$TruncateAt;
|
|
6284
|
-
public fun getFontFamily ()Ljava/lang/String;
|
|
6285
|
-
public fun getFontFeatureSettings ()Ljava/lang/String;
|
|
6286
|
-
public fun getFontStyle ()I
|
|
6287
|
-
public fun getFontWeight ()I
|
|
6288
|
-
public static fun getHyphenationFrequency (Ljava/lang/String;)I
|
|
6289
|
-
public static fun getJustificationMode (Lcom/facebook/react/uimanager/ReactStylesDiffMap;I)I
|
|
6290
|
-
public static fun getLayoutDirection (Ljava/lang/String;)I
|
|
6291
|
-
public fun getLetterSpacing ()F
|
|
6292
|
-
public fun getOpacity ()F
|
|
6293
|
-
public fun getRole ()Lcom/facebook/react/uimanager/ReactAccessibilityDelegate$Role;
|
|
6294
|
-
public static fun getTextAlignment (Lcom/facebook/react/uimanager/ReactStylesDiffMap;ZI)I
|
|
6295
|
-
public static fun getTextBreakStrategy (Ljava/lang/String;)I
|
|
6296
|
-
public fun getTextShadowColor ()I
|
|
6297
|
-
public fun getTextShadowOffsetDx ()F
|
|
6298
|
-
public fun getTextShadowOffsetDy ()F
|
|
6299
|
-
public fun getTextShadowRadius ()F
|
|
6300
|
-
public fun getTextTransform ()Lcom/facebook/react/views/text/TextTransform;
|
|
6301
|
-
public fun isBackgroundColorSet ()Z
|
|
6302
|
-
public fun isColorSet ()Z
|
|
6303
|
-
public fun isLineThroughTextDecorationSet ()Z
|
|
6304
|
-
public fun isUnderlineTextDecorationSet ()Z
|
|
6247
|
+
public final fun getAccessibilityRole ()Lcom/facebook/react/uimanager/ReactAccessibilityDelegate$AccessibilityRole;
|
|
6248
|
+
public final fun getAllowFontScaling ()Z
|
|
6249
|
+
public final fun getBackgroundColor ()Ljava/lang/Integer;
|
|
6250
|
+
public final fun getColor ()Ljava/lang/Integer;
|
|
6251
|
+
public final fun getEffectiveLetterSpacing ()F
|
|
6252
|
+
public final fun getEffectiveLineHeight ()F
|
|
6253
|
+
public final fun getFontFamily ()Ljava/lang/String;
|
|
6254
|
+
public final fun getFontFeatureSettings ()Ljava/lang/String;
|
|
6255
|
+
public final fun getFontSize ()I
|
|
6256
|
+
public final fun getFontStyle ()I
|
|
6257
|
+
public final fun getFontWeight ()I
|
|
6258
|
+
public final fun getLayoutDirection ()I
|
|
6259
|
+
public final fun getLetterSpacing ()F
|
|
6260
|
+
public final fun getLineHeight ()F
|
|
6261
|
+
public final fun getMaxFontSizeMultiplier ()F
|
|
6262
|
+
public final fun getNumberOfLines ()I
|
|
6263
|
+
public final fun getOpacity ()F
|
|
6264
|
+
public final fun getRole ()Lcom/facebook/react/uimanager/ReactAccessibilityDelegate$Role;
|
|
6265
|
+
public final fun getTextShadowColor ()I
|
|
6266
|
+
public final fun getTextShadowOffsetDx ()F
|
|
6267
|
+
public final fun getTextShadowOffsetDy ()F
|
|
6268
|
+
public final fun getTextShadowRadius ()F
|
|
6269
|
+
public final fun isBackgroundColorSet ()Z
|
|
6270
|
+
public final fun isColorSet ()Z
|
|
6271
|
+
public final fun isLineThroughTextDecorationSet ()Z
|
|
6272
|
+
public final fun isUnderlineTextDecorationSet ()Z
|
|
6273
|
+
}
|
|
6274
|
+
|
|
6275
|
+
public final class com/facebook/react/views/text/TextAttributeProps$Companion {
|
|
6276
|
+
public final fun fromMapBuffer (Lcom/facebook/react/common/mapbuffer/MapBuffer;)Lcom/facebook/react/views/text/TextAttributeProps;
|
|
6277
|
+
public final fun fromReadableMap (Lcom/facebook/react/uimanager/ReactStylesDiffMap;)Lcom/facebook/react/views/text/TextAttributeProps;
|
|
6278
|
+
public final fun getEllipsizeMode (Ljava/lang/String;)Landroid/text/TextUtils$TruncateAt;
|
|
6279
|
+
public final fun getHyphenationFrequency (Ljava/lang/String;)I
|
|
6280
|
+
public final fun getJustificationMode (Lcom/facebook/react/uimanager/ReactStylesDiffMap;I)I
|
|
6281
|
+
public final fun getLayoutDirection (Ljava/lang/String;)I
|
|
6282
|
+
public final fun getTextAlignment (Lcom/facebook/react/uimanager/ReactStylesDiffMap;ZI)I
|
|
6283
|
+
public final fun getTextBreakStrategy (Ljava/lang/String;)I
|
|
6305
6284
|
}
|
|
6306
6285
|
|
|
6307
6286
|
public final class com/facebook/react/views/text/TextAttributes {
|
|
@@ -229,6 +229,9 @@ public class ReactInstanceManager {
|
|
|
229
229
|
return new ReactInstanceManagerBuilder();
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
+
/**
|
|
233
|
+
* @noinspection deprecation
|
|
234
|
+
*/
|
|
232
235
|
/* package */ ReactInstanceManager(
|
|
233
236
|
Context applicationContext,
|
|
234
237
|
@Nullable Activity currentActivity,
|
|
@@ -259,7 +262,11 @@ public class ReactInstanceManager {
|
|
|
259
262
|
FLog.d(TAG, "ReactInstanceManager.ctor()");
|
|
260
263
|
initializeSoLoaderIfNecessary(applicationContext);
|
|
261
264
|
|
|
262
|
-
DisplayMetricsHolder.
|
|
265
|
+
DisplayMetricsHolder.initScreenDisplayMetricsIfNotInitialized(applicationContext);
|
|
266
|
+
|
|
267
|
+
if (currentActivity != null) {
|
|
268
|
+
DisplayMetricsHolder.initWindowDisplayMetricsIfNotInitialized(currentActivity);
|
|
269
|
+
}
|
|
263
270
|
|
|
264
271
|
// See {@code ReactInstanceManagerBuilder} for description of all flags here.
|
|
265
272
|
mApplicationContext = applicationContext;
|
|
@@ -924,6 +931,13 @@ public class ReactInstanceManager {
|
|
|
924
931
|
|
|
925
932
|
ReactContext currentReactContext = getCurrentReactContext();
|
|
926
933
|
if (currentReactContext != null) {
|
|
934
|
+
DisplayMetricsHolder.initScreenDisplayMetrics(currentReactContext);
|
|
935
|
+
Activity currentActivity = currentReactContext.getCurrentActivity();
|
|
936
|
+
|
|
937
|
+
if (currentActivity != null) {
|
|
938
|
+
DisplayMetricsHolder.initWindowDisplayMetrics(currentActivity);
|
|
939
|
+
}
|
|
940
|
+
|
|
927
941
|
AppearanceModule appearanceModule =
|
|
928
942
|
currentReactContext.getNativeModule(AppearanceModule.class);
|
|
929
943
|
|
|
@@ -35,7 +35,8 @@ import java.util.List;
|
|
|
35
35
|
*
|
|
36
36
|
* @deprecated This class will be replaced by com.facebook.react.ReactHost in the New Architecture.
|
|
37
37
|
*/
|
|
38
|
-
@Deprecated
|
|
38
|
+
@Deprecated(
|
|
39
|
+
since = "This class is part of Legacy Architecture and will be removed in a future release")
|
|
39
40
|
@LegacyArchitecture(logLevel = LegacyArchitectureLogLevel.ERROR)
|
|
40
41
|
@Nullsafe(Nullsafe.Mode.LOCAL)
|
|
41
42
|
public abstract class ReactNativeHost {
|
|
@@ -136,9 +136,8 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
|
|
136
136
|
setRootViewTag(ReactRootViewTagGenerator.getNextRootViewTag());
|
|
137
137
|
setClipChildren(false);
|
|
138
138
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
139
|
+
DisplayMetricsHolder.initScreenDisplayMetrics(getContext());
|
|
140
|
+
DisplayMetricsHolder.initWindowDisplayMetrics(getContext());
|
|
142
141
|
}
|
|
143
142
|
|
|
144
143
|
@Override
|
|
@@ -883,7 +882,8 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
|
|
883
882
|
private int mDeviceRotation = 0;
|
|
884
883
|
|
|
885
884
|
/* package */ CustomGlobalLayoutListener() {
|
|
886
|
-
DisplayMetricsHolder.
|
|
885
|
+
DisplayMetricsHolder.initScreenDisplayMetricsIfNotInitialized(getContext());
|
|
886
|
+
DisplayMetricsHolder.initWindowDisplayMetricsIfNotInitialized(getContext());
|
|
887
887
|
mVisibleViewArea = new Rect();
|
|
888
888
|
mMinKeyboardHeightDetected = (int) PixelUtil.toPixelFromDIP(60);
|
|
889
889
|
}
|
|
@@ -1006,7 +1006,8 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
|
|
1006
1006
|
return;
|
|
1007
1007
|
}
|
|
1008
1008
|
mDeviceRotation = rotation;
|
|
1009
|
-
DisplayMetricsHolder.
|
|
1009
|
+
DisplayMetricsHolder.initScreenDisplayMetrics(getContext());
|
|
1010
|
+
DisplayMetricsHolder.initWindowDisplayMetrics(getContext());
|
|
1010
1011
|
emitOrientationChanged(rotation);
|
|
1011
1012
|
}
|
|
1012
1013
|
|
package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevSupportManagerFactory.kt
CHANGED
|
@@ -25,6 +25,11 @@ import com.facebook.react.packagerconnection.RequestHandler
|
|
|
25
25
|
*/
|
|
26
26
|
internal class DefaultDevSupportManagerFactory : DevSupportManagerFactory {
|
|
27
27
|
|
|
28
|
+
@Deprecated(
|
|
29
|
+
"Use the other create() method with useDevSupport parameter for New Architecture. This method will be removed in a future release.",
|
|
30
|
+
replaceWith =
|
|
31
|
+
ReplaceWith(
|
|
32
|
+
"create(applicationContext, reactInstanceManagerHelper, packagerPathForJSBundleName, enableOnCreate, redBoxHandler, devBundleDownloadListener, minNumShakes, customPackagerCommandHandlers, surfaceDelegateFactory, devLoadingViewManager, pausedInDebuggerOverlayManager)"))
|
|
28
33
|
override fun create(
|
|
29
34
|
applicationContext: Context,
|
|
30
35
|
reactInstanceManagerHelper: ReactInstanceDevHelper,
|
package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerFactory.kt
CHANGED
|
@@ -22,6 +22,12 @@ public interface DevSupportManagerFactory {
|
|
|
22
22
|
* Factory used by the Old Architecture flow to create a [DevSupportManager] and a
|
|
23
23
|
* [BridgeDevSupportManager]
|
|
24
24
|
*/
|
|
25
|
+
@Deprecated(
|
|
26
|
+
message =
|
|
27
|
+
"Use the other create() method with useDevSupport parameter for New Architecture. This method will be removed in a future release.",
|
|
28
|
+
replaceWith =
|
|
29
|
+
ReplaceWith(
|
|
30
|
+
"create(applicationContext, reactInstanceManagerHelper, packagerPathForJSBundleName, enableOnCreate, redBoxHandler, devBundleDownloadListener, minNumShakes, customPackagerCommandHandlers, surfaceDelegateFactory, devLoadingViewManager, pausedInDebuggerOverlayManager)"))
|
|
25
31
|
public fun create(
|
|
26
32
|
applicationContext: Context,
|
|
27
33
|
reactInstanceManagerHelper: ReactInstanceDevHelper,
|
|
@@ -70,6 +70,7 @@ import com.facebook.react.internal.featureflags.ReactNativeNewArchitectureFeatur
|
|
|
70
70
|
import com.facebook.react.internal.interop.InteropEventEmitter;
|
|
71
71
|
import com.facebook.react.modules.core.ReactChoreographer;
|
|
72
72
|
import com.facebook.react.modules.i18nmanager.I18nUtil;
|
|
73
|
+
import com.facebook.react.uimanager.DisplayMetricsHolder;
|
|
73
74
|
import com.facebook.react.uimanager.GuardedFrameCallback;
|
|
74
75
|
import com.facebook.react.uimanager.IllegalViewOperationException;
|
|
75
76
|
import com.facebook.react.uimanager.PixelUtil;
|
|
@@ -97,6 +98,7 @@ import java.util.HashMap;
|
|
|
97
98
|
import java.util.HashSet;
|
|
98
99
|
import java.util.List;
|
|
99
100
|
import java.util.Map;
|
|
101
|
+
import java.util.Objects;
|
|
100
102
|
import java.util.Queue;
|
|
101
103
|
import java.util.Set;
|
|
102
104
|
import java.util.concurrent.CopyOnWriteArrayList;
|
|
@@ -725,6 +727,23 @@ public class FabricUIManager
|
|
|
725
727
|
return true;
|
|
726
728
|
}
|
|
727
729
|
|
|
730
|
+
/**
|
|
731
|
+
* This method is used to get the encoded screen size without vertical insets for a given surface.
|
|
732
|
+
* It's used by the Modal component to determine the size of the screen without vertical insets.
|
|
733
|
+
* The method is private as it's accessed via JNI from C++.
|
|
734
|
+
*
|
|
735
|
+
* @param surfaceId The surface ID of the surface for which the Modal is going to render.
|
|
736
|
+
* @return The encoded screen size as a long (both width and height) are represented without
|
|
737
|
+
* vertical insets.
|
|
738
|
+
*/
|
|
739
|
+
private long getEncodedScreenSizeWithoutVerticalInsets(int surfaceId) {
|
|
740
|
+
SurfaceMountingManager surfaceMountingManager = mMountingManager.getSurfaceManager(surfaceId);
|
|
741
|
+
Objects.requireNonNull(surfaceMountingManager);
|
|
742
|
+
ThemedReactContext context = Objects.requireNonNull(surfaceMountingManager.getContext());
|
|
743
|
+
return DisplayMetricsHolder.getEncodedScreenSizeWithoutVerticalInsets(
|
|
744
|
+
context.getCurrentActivity());
|
|
745
|
+
}
|
|
746
|
+
|
|
728
747
|
@Override
|
|
729
748
|
public void addUIManagerEventListener(UIManagerListener listener) {
|
|
730
749
|
mListeners.add(listener);
|
package/ReactAndroid/src/main/java/com/facebook/react/modules/deviceinfo/DeviceInfoModule.kt
CHANGED
|
@@ -15,7 +15,8 @@ import com.facebook.react.bridge.ReactSoftExceptionLogger
|
|
|
15
15
|
import com.facebook.react.bridge.ReadableMap
|
|
16
16
|
import com.facebook.react.module.annotations.ReactModule
|
|
17
17
|
import com.facebook.react.uimanager.DisplayMetricsHolder.getDisplayMetricsWritableMap
|
|
18
|
-
import com.facebook.react.uimanager.DisplayMetricsHolder.
|
|
18
|
+
import com.facebook.react.uimanager.DisplayMetricsHolder.initScreenDisplayMetricsIfNotInitialized
|
|
19
|
+
import com.facebook.react.uimanager.DisplayMetricsHolder.initWindowDisplayMetricsIfNotInitialized
|
|
19
20
|
import com.facebook.react.views.view.isEdgeToEdgeFeatureFlagOn
|
|
20
21
|
|
|
21
22
|
/** Module that exposes Android Constants to JS. */
|
|
@@ -26,7 +27,8 @@ internal class DeviceInfoModule(reactContext: ReactApplicationContext) :
|
|
|
26
27
|
private var previousDisplayMetrics: ReadableMap? = null
|
|
27
28
|
|
|
28
29
|
init {
|
|
29
|
-
|
|
30
|
+
initScreenDisplayMetricsIfNotInitialized(reactContext)
|
|
31
|
+
reactContext.currentActivity?.let { initWindowDisplayMetricsIfNotInitialized(it) }
|
|
30
32
|
reactContext.addLifecycleEventListener(this)
|
|
31
33
|
}
|
|
32
34
|
|
|
@@ -625,9 +625,8 @@ public class ReactHostImpl(
|
|
|
625
625
|
override fun onConfigurationChanged(context: Context) {
|
|
626
626
|
val currentReactContext = this.currentReactContext
|
|
627
627
|
if (currentReactContext != null) {
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
}
|
|
628
|
+
DisplayMetricsHolder.initScreenDisplayMetrics(currentReactContext)
|
|
629
|
+
currentReactContext.currentActivity?.let { DisplayMetricsHolder.initWindowDisplayMetrics(it) }
|
|
631
630
|
|
|
632
631
|
val appearanceModule = currentReactContext.getNativeModule(AppearanceModule::class.java)
|
|
633
632
|
appearanceModule?.onConfigurationChanged(context)
|
|
@@ -918,6 +917,7 @@ public class ReactHostImpl(
|
|
|
918
917
|
val instance =
|
|
919
918
|
ReactInstance(
|
|
920
919
|
reactContext,
|
|
920
|
+
currentActivity,
|
|
921
921
|
reactHostDelegate,
|
|
922
922
|
componentFactory,
|
|
923
923
|
devSupportManager,
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
package com.facebook.react.runtime
|
|
9
9
|
|
|
10
|
+
import android.app.Activity
|
|
10
11
|
import android.content.res.AssetManager
|
|
11
12
|
import android.view.View
|
|
12
13
|
import com.facebook.common.logging.FLog
|
|
@@ -88,6 +89,7 @@ import kotlin.jvm.JvmStatic
|
|
|
88
89
|
@UnstableReactNativeAPI
|
|
89
90
|
internal class ReactInstance(
|
|
90
91
|
private val context: BridgelessReactContext,
|
|
92
|
+
private val activity: Activity?,
|
|
91
93
|
delegate: ReactHostDelegate,
|
|
92
94
|
componentFactory: ComponentFactory,
|
|
93
95
|
devSupportManager: DevSupportManager,
|
|
@@ -240,7 +242,8 @@ internal class ReactInstance(
|
|
|
240
242
|
FabricUIManager(context, ViewManagerRegistry(viewManagerResolver), eventBeatManager)
|
|
241
243
|
|
|
242
244
|
// Misc initialization that needs to be done before Fabric init
|
|
243
|
-
DisplayMetricsHolder.
|
|
245
|
+
DisplayMetricsHolder.initScreenDisplayMetricsIfNotInitialized(context)
|
|
246
|
+
activity?.let { DisplayMetricsHolder.initWindowDisplayMetricsIfNotInitialized(it) }
|
|
244
247
|
|
|
245
248
|
val binding = FabricUIManagerBinding()
|
|
246
249
|
binding.register(
|