diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/CommsTransport.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/CommsTransport.java index e092f5d5b..43c7fba6d 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/CommsTransport.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/CommsTransport.java @@ -87,7 +87,7 @@ public class CommsTransport implements TransportProcs, m_done = false; boolean failed = true; try { - if ( Build.PRODUCT.contains("sdk") ) { + if ( XWApp.onEmulator() ) { System.setProperty("java.net.preferIPv6Addresses", "false"); } diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/NetStateCache.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/NetStateCache.java index dea479421..990682fa6 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/NetStateCache.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/NetStateCache.java @@ -48,7 +48,7 @@ public class NetStateCache { private static boolean s_netAvail = false; private static boolean s_isWifi; private static PvtBroadcastReceiver s_receiver; - private static final boolean s_onSim = Build.PRODUCT.contains("sdk"); + private static final boolean s_onSim = XWApp.onEmulator(); public static void register( Context context, StateChangedIf proc ) { diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWApp.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWApp.java index 4de78b274..b45520354 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWApp.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWApp.java @@ -112,7 +112,8 @@ public class XWApp extends Application { public static boolean onEmulator() { if ( null == s_onEmulator ) { - s_onEmulator = new Boolean( "google_sdk".equals(Build.MODEL) ); + s_onEmulator = new Boolean( "google_sdk".equals(Build.MODEL) + || Build.PRODUCT.startsWith("vbox") ); } return s_onEmulator; }