mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +01:00
add new pref for relay's proxy/device port
This commit is contained in:
parent
1de029f3f0
commit
39827ec894
4 changed files with 22 additions and 3 deletions
|
@ -28,6 +28,7 @@
|
||||||
<string name="key_clr_crosshairs">key_clr_crosshairs</string>
|
<string name="key_clr_crosshairs">key_clr_crosshairs</string>
|
||||||
<string name="key_relay_host">key_relay_host</string>
|
<string name="key_relay_host">key_relay_host</string>
|
||||||
<string name="key_relay_port">key_relay_port</string>
|
<string name="key_relay_port">key_relay_port</string>
|
||||||
|
<string name="key_proxy_port">key_proxy_port</string>
|
||||||
<string name="key_sms_port">key_sms_port</string>
|
<string name="key_sms_port">key_sms_port</string>
|
||||||
<string name="key_dict_host">key_dict_host</string>
|
<string name="key_dict_host">key_dict_host</string>
|
||||||
<string name="key_board_size">key_board_size</string>
|
<string name="key_board_size">key_board_size</string>
|
||||||
|
|
|
@ -287,7 +287,8 @@
|
||||||
<string name="advanced_summary">You may never need these...</string>
|
<string name="advanced_summary">You may never need these...</string>
|
||||||
<string name="relay_host">Relay address</string>
|
<string name="relay_host">Relay address</string>
|
||||||
<string name="dict_host">Dictionary download URL</string>
|
<string name="dict_host">Dictionary download URL</string>
|
||||||
<string name="relay_port">Relay port</string>
|
<string name="relay_port">Relay game port</string>
|
||||||
|
<string name="proxy_port">Relay device port</string>
|
||||||
<string name="sms_port">SMS port</string>
|
<string name="sms_port">SMS port</string>
|
||||||
|
|
||||||
<string name="sms_phone_label">sms_phone_label</string>
|
<string name="sms_phone_label">sms_phone_label</string>
|
||||||
|
|
|
@ -182,6 +182,11 @@
|
||||||
android:defaultValue="10999"
|
android:defaultValue="10999"
|
||||||
android:numeric="decimal"
|
android:numeric="decimal"
|
||||||
/>
|
/>
|
||||||
|
<EditTextPreference android:key="@string/key_proxy_port"
|
||||||
|
android:title="@string/proxy_port"
|
||||||
|
android:defaultValue="10998"
|
||||||
|
android:numeric="decimal"
|
||||||
|
/>
|
||||||
<!-- <EditTextPreference android:key="@string/key_sms_port" -->
|
<!-- <EditTextPreference android:key="@string/key_sms_port" -->
|
||||||
<!-- android:title="@string/sms_port" -->
|
<!-- android:title="@string/sms_port" -->
|
||||||
<!-- android:defaultValue="5432" -->
|
<!-- android:defaultValue="5432" -->
|
||||||
|
|
|
@ -145,10 +145,22 @@ public class CommonPrefs {
|
||||||
String val = getString( context, R.string.key_relay_port );
|
String val = getString( context, R.string.key_relay_port );
|
||||||
int result = 0;
|
int result = 0;
|
||||||
try {
|
try {
|
||||||
return Integer.parseInt( val );
|
result = Integer.parseInt( val );
|
||||||
} catch ( Exception ex ) {
|
} 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 )
|
public static String getDefaultDictURL( Context context )
|
||||||
|
|
Loading…
Reference in a new issue