add new prefs controlling web api usage

Add, but don't use yet, prefs giving relay.py path and checkbox whether
to use the new APIs.
This commit is contained in:
Eric House 2017-11-10 22:16:15 -08:00
parent f2c4c82129
commit acf668ae8a
3 changed files with 24 additions and 5 deletions

View file

@ -36,7 +36,9 @@
<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_port2</string> <string name="key_relay_port">key_relay_port2</string>
<string name="key_relay_via_http">key_relay_via_http</string>
<string name="key_update_url">key_update_url</string> <string name="key_update_url">key_update_url</string>
<string name="key_relay_url">key_relay_url</string>
<string name="key_update_prerel">key_update_prerel</string> <string name="key_update_prerel">key_update_prerel</string>
<string name="key_proxy_port">key_proxy_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>
@ -149,6 +151,7 @@
<string name="dict_url">http://eehouse.org/and_wordlists</string> <string name="dict_url">http://eehouse.org/and_wordlists</string>
<string name="default_update_url">http://eehouse.org/xw4/info.py</string> <string name="default_update_url">http://eehouse.org/xw4/info.py</string>
<string name="default_relay_url">http://eehouse.org/xw4/relay.py</string>
<!--string name="dict_url">http://10.0.2.2/~eehouse/and_dicts</string--> <!--string name="dict_url">http://10.0.2.2/~eehouse/and_dicts</string-->

View file

@ -2474,6 +2474,8 @@
<string name="advanced">For debugging</string> <string name="advanced">For debugging</string>
<string name="advanced_summary">You should never need these...</string> <string name="advanced_summary">You should never need these...</string>
<string name="relay_host">Relay host</string> <string name="relay_host">Relay host</string>
<string name="relay_via_http">Use Web APIs</string>
<string name="relay_via_http_summary">(instead of custom protocol to ports below)</string>
<string name="dict_host">Wordlist download URL</string> <string name="dict_host">Wordlist download URL</string>
<string name="logging_on">Enable logging</string> <string name="logging_on">Enable logging</string>
<string name="logging_on_summary">(release builds only)</string> <string name="logging_on_summary">(release builds only)</string>
@ -2513,6 +2515,7 @@
<string name="game_summary_field_gameid">gameid</string> <string name="game_summary_field_gameid">gameid</string>
<string name="game_summary_field_npackets">Pending packet count</string> <string name="game_summary_field_npackets">Pending packet count</string>
<string name="expl_update_url">Update checks URL</string> <string name="expl_update_url">Update checks URL</string>
<string name="expl_relay_url">URL for relay web API</string>
<string name="got_langdict_title">Fetch default wordlist for language</string> <string name="got_langdict_title">Fetch default wordlist for language</string>
<string name="got_langdict_summary">Don\'t try a second time</string> <string name="got_langdict_summary">Don\'t try a second time</string>

View file

@ -415,11 +415,29 @@
<PreferenceScreen android:title="@string/pref_group_relay_title" <PreferenceScreen android:title="@string/pref_group_relay_title"
android:summary="@string/pref_group_relay_summary" android:summary="@string/pref_group_relay_summary"
> >
<CheckBoxPreference android:key="@string/key_enable_relay_toself"
android:title="@string/enable_relay_toself_title"
android:summary="@string/enable_relay_toself_summary"
android:defaultValue="false"
/>
<org.eehouse.android.xw4.XWEditTextPreference <org.eehouse.android.xw4.XWEditTextPreference
android:key="@string/key_relay_host" android:key="@string/key_relay_host"
android:title="@string/relay_host" android:title="@string/relay_host"
android:defaultValue="@string/default_host" android:defaultValue="@string/default_host"
/> />
<CheckBoxPreference android:key="@string/key_relay_via_http"
android:title="@string/relay_via_http"
android:summary="@string/relay_via_http_summary"
android:defaultValue="false"
/>
<org.eehouse.android.xw4.XWEditTextPreference
android:key="@string/key_relay_url"
android:title="@string/expl_relay_url"
android:defaultValue="@string/default_relay_url"
/>
<org.eehouse.android.xw4.XWEditTextPreference <org.eehouse.android.xw4.XWEditTextPreference
android:key="@string/key_relay_port" android:key="@string/key_relay_port"
android:title="@string/relay_port" android:title="@string/relay_port"
@ -432,11 +450,6 @@
android:defaultValue="10998" android:defaultValue="10998"
android:numeric="decimal" android:numeric="decimal"
/> />
<CheckBoxPreference android:key="@string/key_enable_relay_toself"
android:title="@string/enable_relay_toself_title"
android:summary="@string/enable_relay_toself_summary"
android:defaultValue="false"
/>
</PreferenceScreen> </PreferenceScreen>
<PreferenceScreen android:title="@string/pref_group_l10n_title" <PreferenceScreen android:title="@string/pref_group_l10n_title"