diff --git a/ReactAndroid/src/main/java/com/facebook/react/devsupport/JSDevSupport.java b/ReactAndroid/src/main/java/com/facebook/react/devsupport/JSDevSupport.java index f2b0e937b74f3f..9e98a6415ecf59 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/devsupport/JSDevSupport.java +++ b/ReactAndroid/src/main/java/com/facebook/react/devsupport/JSDevSupport.java @@ -20,7 +20,7 @@ @ReactModule(name = JSDevSupport.MODULE_NAME) public class JSDevSupport extends ReactContextBaseJavaModule { - static final String MODULE_NAME = "JSDevSupport"; + public static final String MODULE_NAME = "JSDevSupport"; public static final int ERROR_CODE_EXCEPTION = 0; public static final int ERROR_CODE_VIEW_NOT_FOUND = 1; diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/i18nmanager/I18nManagerModule.java b/ReactAndroid/src/main/java/com/facebook/react/modules/i18nmanager/I18nManagerModule.java index 0d491160b39363..9e15606235ccf2 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/modules/i18nmanager/I18nManagerModule.java +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/i18nmanager/I18nManagerModule.java @@ -19,9 +19,11 @@ /** * {@link NativeModule} that allows JS to set allowRTL and get isRTL status. */ -@ReactModule(name = "I18nManager") +@ReactModule(name = I18nManagerModule.NAME) public class I18nManagerModule extends ContextBaseJavaModule { + public static final String NAME = "I18nManager"; + private final I18nUtil sharedI18nUtilInstance = I18nUtil.getInstance(); public I18nManagerModule(Context context) { @@ -30,7 +32,7 @@ public I18nManagerModule(Context context) { @Override public String getName() { - return "I18nManager"; + return NAME; } @Override diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.java b/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.java index 4095c8e5998720..33d8644eeabff7 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.java +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.java @@ -25,10 +25,10 @@ import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; -import java.util.concurrent.ConcurrentHashMap; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; import javax.annotation.Nullable; import okhttp3.OkHttpClient; @@ -38,9 +38,9 @@ import okhttp3.WebSocketListener; import okio.ByteString; -@ReactModule(name = "WebSocketModule", hasConstants = false) +@ReactModule(name = WebSocketModule.NAME, hasConstants = false) public final class WebSocketModule extends ReactContextBaseJavaModule { - + public static final String NAME="WebSocketModule"; public interface ContentHandler { void onMessage(String text, WritableMap params); @@ -67,7 +67,7 @@ private void sendEvent(String eventName, WritableMap params) { @Override public String getName() { - return "WebSocketModule"; + return NAME; } public void setContentHandler(final int id, final ContentHandler contentHandler) {