diff --git a/xwords4/android/XWords4/res/values/common_rsrc.xml b/xwords4/android/XWords4/res/values/common_rsrc.xml index 0c3a969b9..e8757841a 100644 --- a/xwords4/android/XWords4/res/values/common_rsrc.xml +++ b/xwords4/android/XWords4/res/values/common_rsrc.xml @@ -28,6 +28,7 @@ key_clr_crosshairs key_relay_host key_relay_port + key_proxy_port key_sms_port key_dict_host key_board_size diff --git a/xwords4/android/XWords4/res/values/strings.xml b/xwords4/android/XWords4/res/values/strings.xml index 7a755251a..c630539e4 100644 --- a/xwords4/android/XWords4/res/values/strings.xml +++ b/xwords4/android/XWords4/res/values/strings.xml @@ -287,7 +287,8 @@ You may never need these... Relay address Dictionary download URL - Relay port + Relay game port + Relay device port SMS port sms_phone_label diff --git a/xwords4/android/XWords4/res/xml/xwprefs.xml b/xwords4/android/XWords4/res/xml/xwprefs.xml index 726a486e3..866214b89 100644 --- a/xwords4/android/XWords4/res/xml/xwprefs.xml +++ b/xwords4/android/XWords4/res/xml/xwprefs.xml @@ -182,6 +182,11 @@ android:defaultValue="10999" android:numeric="decimal" /> + diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/CommonPrefs.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/CommonPrefs.java index 25d43b8b3..f22686f19 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/CommonPrefs.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/CommonPrefs.java @@ -145,10 +145,22 @@ public class CommonPrefs { String val = getString( context, R.string.key_relay_port ); int result = 0; try { - return Integer.parseInt( val ); + result = Integer.parseInt( val ); } catch ( Exception ex ) { - return 0; } + return result; + } + + public static int getDefaultProxyPort( Context context ) + { + String val = getString( context, R.string.key_proxy_port ); + int result = 0; + try { + result = Integer.parseInt( val ); + } catch ( Exception ex ) { + } + Utils.logf( "getDefaultProxyPort=>%d", result ); + return result; } public static String getDefaultDictURL( Context context )