From 139559fc0716a9ab7b78c9524df5eb295d882547 Mon Sep 17 00:00:00 2001 From: Haseeb Saeed Date: Mon, 20 Aug 2018 12:02:18 -0700 Subject: [PATCH] Fix accessibility role crash Summary: We were using a locale-specific `toUpperCase()` for accessibility roles. In the Turkish locale, `"image".toUpperCase()` does not become `"IMAGE"`; it becomes some weird turkish alphabet word, and we throw an error. This diff uses US-locale to avoid the error. Reviewed By: YaoPersonal Differential Revision: D9402330 fbshipit-source-id: a3fd7c54eec4b313c7e9df9236adb7ae42854ed8 --- .../java/com/facebook/react/uimanager/BaseViewManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java index 67f7932c8..fd5b2de97 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java @@ -13,6 +13,7 @@ import com.facebook.react.R; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.uimanager.annotations.ReactProp; import com.facebook.react.uimanager.util.ReactFindViewUtil; +import java.util.Locale; /** * Base class that should be suitable for the majority of subclasses of {@link ViewManager}. @@ -131,7 +132,7 @@ public abstract class BaseViewManager