diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/NetUtils.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/NetUtils.java index ea1ac0cd6..f79df6abb 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/NetUtils.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/NetUtils.java @@ -251,7 +251,7 @@ public class NetUtils { params.put( k_PARAMS, param ); String paramsString = getPostDataString( params ); - if ( null != paramsString ) { + if ( null != conn && null != paramsString ) { try { conn.setReadTimeout( 15000 ); conn.setConnectTimeout( 15000 ); @@ -294,6 +294,9 @@ public class NetUtils { } catch( java.io.IOException ioe ) { Log.ex( TAG, ioe ); } + } else { + Log.e( TAG, "not running conn %s with params %s", conn, + paramsString ); } return result; diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWPrefs.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWPrefs.java index 6011a22b7..1f1a1a2eb 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWPrefs.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWPrefs.java @@ -126,7 +126,11 @@ public class XWPrefs { public static String getDefaultRelayUrl( Context context ) { - return getPrefsString( context, R.string.key_relay_url ); + String result = getPrefsString( context, R.string.key_relay_url ); + if ( result == null || 0 == result.length() ) { + result = context.getString( R.string.default_relay_url ); + } + return result; } public static boolean getSkipToWebAPI( Context context )