diff --git a/packages/react-native/ReactAndroid/api/ReactAndroid.api b/packages/react-native/ReactAndroid/api/ReactAndroid.api index 5c5cc396486..0e01ff68d47 100644 --- a/packages/react-native/ReactAndroid/api/ReactAndroid.api +++ b/packages/react-native/ReactAndroid/api/ReactAndroid.api @@ -3351,7 +3351,6 @@ public final class com/facebook/react/modules/i18nmanager/I18nUtil { public final fun doLeftAndRightSwapInRTL (Landroid/content/Context;)Z public final fun forceRTL (Landroid/content/Context;Z)V public static final fun getInstance ()Lcom/facebook/react/modules/i18nmanager/I18nUtil; - public final fun hasRtlSupport (Landroid/content/Context;)Z public final fun isRTL (Landroid/content/Context;)Z public final fun swapLeftAndRightInRTL (Landroid/content/Context;Z)V } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/i18nmanager/I18nUtil.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/i18nmanager/I18nUtil.kt index 1968ec99bd5..57347b30481 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/i18nmanager/I18nUtil.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/i18nmanager/I18nUtil.kt @@ -20,9 +20,8 @@ public class I18nUtil private constructor() { * * allows RTL layout when using RTL locale */ public fun isRTL(context: Context): Boolean = - if (isRTLForced(context)) { - true - } else isRTLAllowed(context) && isDevicePreferredLanguageRTL + applicationHasRtlSupport(context) && + (isRTLForced(context) || (isRTLAllowed(context) && isDevicePreferredLanguageRTL)) /** * Android relies on the presence of `android:supportsRtl="true"` being set in order to resolve @@ -33,10 +32,6 @@ public class I18nUtil private constructor() { return (context.getApplicationInfo().flags and ApplicationInfo.FLAG_SUPPORTS_RTL) != 0 } - public fun hasRtlSupport(context: Context): Boolean { - return applicationHasRtlSupport(context) || isRTLAllowed(context) - } - /** * Should be used very early during app start up Before the bridge is initialized *