diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWPrefs.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWPrefs.java index 6ce58f4e2..b7be9d67c 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWPrefs.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWPrefs.java @@ -30,6 +30,7 @@ import java.util.ArrayList; import junit.framework.Assert; +import org.eehouse.android.xw4.jni.CommsAddrRec.CommsConnType; import org.eehouse.android.xw4.jni.CommsAddrRec.CommsConnTypeSet; public class XWPrefs { @@ -466,8 +467,18 @@ public class XWPrefs { public static CommsConnTypeSet getAddrTypes( Context context ) { - int flags = getPrefsInt( context, R.string.key_addrs_pref, 0 ); - return DBUtils.intToConnTypeSet( flags ); + CommsConnTypeSet result; + int flags = getPrefsInt( context, R.string.key_addrs_pref, -1 ); + if ( -1 == flags ) { + result = new CommsConnTypeSet(); + result.add( CommsConnType.COMMS_CONN_RELAY ); + if ( BTService.BTEnabled() ) { + result.add( CommsConnType.COMMS_CONN_BT ); + } + } else { + result = DBUtils.intToConnTypeSet( flags ); + } + return result; } public static void setAddrTypes( Context context, CommsConnTypeSet set )