Only lookup IP addresses when in Chrome debug mode
This commit is contained in:
parent
8d73a8e985
commit
d96c645415
|
@ -62,10 +62,13 @@ public class RealmReactModule extends ReactContextBaseJavaModule {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> getConstants() {
|
public Map<String, Object> getConstants() {
|
||||||
if (!isContextInjected()) {
|
if (isContextInjected()) {
|
||||||
startWebServer();
|
// No constants are needed if *not* running in Chrome debug mode.
|
||||||
|
return Collections.EMPTY_MAP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
startWebServer();
|
||||||
|
|
||||||
List<String> hosts;
|
List<String> hosts;
|
||||||
if (RealmAnalytics.isRunningOnEmulator()) {
|
if (RealmAnalytics.isRunningOnEmulator()) {
|
||||||
hosts = Arrays.asList(new String[]{"localhost"});
|
hosts = Arrays.asList(new String[]{"localhost"});
|
||||||
|
|
Loading…
Reference in New Issue