separate explanatory dialogs for games sending invites based on

whether they were created for a rematch. If for a rematch, don't give
user ability to change invite target; just resend (if asked) and show
a toast. Also, send rematch invites only when there aren't already
some, i.e. the first time the game's opened.
This commit is contained in:
Eric House 2016-01-16 13:52:30 -08:00
parent 3ca47cdd82
commit 6c1394a3a5
5 changed files with 217 additions and 201 deletions

View file

@ -693,7 +693,7 @@ string name="str_robot_moved">O robô fez esta jogada:\u0020</string
XLATE-ME XLATE-ME
<string name="advanced">For debugging</string> <string name="advanced">For debugging</string>
*/ */
public static final int advanced=0x7f0502ec; public static final int advanced=0x7f0502ee;
/** This button takes you to the normal Game Configure screen /** This button takes you to the normal Game Configure screen
This button takes you to the normal Game Configure screen This button takes you to the normal Game Configure screen
<string name="advanced_config">Advanced game settings</string> <string name="advanced_config">Advanced game settings</string>
@ -703,7 +703,7 @@ XLATE-ME
/** XLATE-ME /** XLATE-ME
<string name="advanced_summary">You should never need these...</string> <string name="advanced_summary">You should never need these...</string>
*/ */
public static final int advanced_summary=0x7f0502ed; public static final int advanced_summary=0x7f0502ef;
/** /**
<string name="alert_empty_dict_fmt">The wordlist %1$s contains only <string name="alert_empty_dict_fmt">The wordlist %1$s contains only
@ -855,7 +855,7 @@ XLATE-ME
/** XLATE-ME /** XLATE-ME
<string name="board_menu_game_netstats">Network stats</string> <string name="board_menu_game_netstats">Network stats</string>
*/ */
public static final int board_menu_game_netstats=0x7f0502f7; public static final int board_menu_game_netstats=0x7f0502f9;
/** Meaningful only for networked games, this menu causes all /** Meaningful only for networked games, this menu causes all
messages that have not yet been acknowledged by a remote messages that have not yet been acknowledged by a remote
device in the game to be resent. Eventually I hope to be device in the game to be resent. Eventually I hope to be
@ -877,7 +877,7 @@ XLATE-ME
/** <string name="board_menu_game_resign">Resign</string> /** <string name="board_menu_game_resign">Resign</string>
*/ */
public static final int board_menu_game_resign=0x7f050104; public static final int board_menu_game_resign=0x7f050104;
public static final int board_menu_game_showInvites=0x7f0502f8; public static final int board_menu_game_showInvites=0x7f0502fa;
/** <string name="board_menu_invite">Invite</string> /** <string name="board_menu_invite">Invite</string>
*/ */
public static final int board_menu_invite=0x7f050274; public static final int board_menu_invite=0x7f050274;
@ -1184,7 +1184,7 @@ XLATE-ME
/** XLATE-ME /** XLATE-ME
<string name="button_discard_changes">Discard changes</string> <string name="button_discard_changes">Discard changes</string>
*/ */
public static final int button_discard_changes=0x7f0502e4; public static final int button_discard_changes=0x7f0502e5;
/** /**
<string name="button_done">Done</string> <string name="button_done">Done</string>
@ -1220,8 +1220,8 @@ XLATE-ME
/** XLATE-ME /** XLATE-ME
<string name="button_edit">Edit</string> <string name="button_edit">Edit</string>
*/ */
public static final int button_edit=0x7f0502e3; public static final int button_edit=0x7f0502e4;
public static final int button_enable=0x7f050327; public static final int button_enable=0x7f050329;
/** XLATE-ME /** XLATE-ME
<string name="button_enable_bt">Enable Bluetooth</string> <string name="button_enable_bt">Enable Bluetooth</string>
*/ */
@ -1368,7 +1368,7 @@ XLATE-ME
/** <string name="button_reconnect">Reconnect</string> /** <string name="button_reconnect">Reconnect</string>
*/ */
public static final int button_reconnect=0x7f050266; public static final int button_reconnect=0x7f050266;
public static final int button_reinvite=0x7f0502de; public static final int button_reinvite=0x7f0502df;
/** /**
*/ */
public static final int button_relay_add=0x7f050211; public static final int button_relay_add=0x7f050211;
@ -1524,7 +1524,7 @@ XLATE-ME
public static final int button_trade_commit=0x7f0500df; public static final int button_trade_commit=0x7f0500df;
/** Button for alert with title above /** Button for alert with title above
*/ */
public static final int button_wait=0x7f0502dd; public static final int button_wait=0x7f0502de;
/** /**
############################################################ ############################################################
# Dialogs # Dialogs
@ -1691,17 +1691,17 @@ XLATE-ME
public static final int chat_title_fmt=0x7f050182; public static final int chat_title_fmt=0x7f050182;
/** <string name="checking_for_fmt">Checking for wordlists in %1$s</string> /** <string name="checking_for_fmt">Checking for wordlists in %1$s</string>
*/ */
public static final int checking_for_fmt=0x7f05031e; public static final int checking_for_fmt=0x7f050320;
/** <string name="checking_title">Checking</string> /** <string name="checking_title">Checking</string>
*/ */
public static final int checking_title=0x7f05031d; public static final int checking_title=0x7f05031f;
/** <string name="checkupdates_none_found">Everything is up-to-date.</string> /** <string name="checkupdates_none_found">Everything is up-to-date.</string>
*/ */
public static final int checkupdates_none_found=0x7f050242; public static final int checkupdates_none_found=0x7f050242;
/** EXPERIMENTAL: "label" for invite on clipboard. If it's shown /** EXPERIMENTAL: "label" for invite on clipboard. If it's shown
it's by some Android utility it's by some Android utility
*/ */
public static final int clip_label=0x7f050330; public static final int clip_label=0x7f050332;
/** color of the "crosshairs", lines drawn vertically and /** color of the "crosshairs", lines drawn vertically and
horizontally through the square the user is currently horizontally through the square the user is currently
touching in order to guide the fat-fingered (most of us) in touching in order to guide the fat-fingered (most of us) in
@ -1725,8 +1725,8 @@ XLATE-ME
and cannot be saved. Would you like to discard your changes, or and cannot be saved. Would you like to discard your changes, or
edit to give it a way to connect?</string> edit to give it a way to connect?</string>
*/ */
public static final int config_no_connvia=0x7f0502e2; public static final int config_no_connvia=0x7f0502e3;
public static final int confirm_clear_chat=0x7f050332; public static final int confirm_clear_chat=0x7f050334;
public static final int confirm_clear_relay=0x7f050218; public static final int confirm_clear_relay=0x7f050218;
/** Additional text appended to text confirm_delete_dictf in the /** Additional text appended to text confirm_delete_dictf in the
wordlist delete confiration dialog in the case where the wordlist delete confiration dialog in the case where the
@ -1738,14 +1738,14 @@ XLATE-ME
of the language is substituted for %1$s. of the language is substituted for %1$s.
*/ */
public static final int confirm_deleteonly_dicts_fmt=0x7f0500aa; public static final int confirm_deleteonly_dicts_fmt=0x7f0500aa;
public static final int confirm_drop_relay=0x7f050323; public static final int confirm_drop_relay=0x7f050325;
public static final int confirm_drop_relay_bt=0x7f050325; public static final int confirm_drop_relay_bt=0x7f050327;
public static final int confirm_drop_relay_sms=0x7f050326; public static final int confirm_drop_relay_sms=0x7f050328;
/** <string name="confirm_get_locdict_fmt">Your device is set up for /** <string name="confirm_get_locdict_fmt">Your device is set up for
%1$s. Would you like to download a wordlist so you can play %1$s. Would you like to download a wordlist so you can play
Crosswords in %1$s?</string> Crosswords in %1$s?</string>
*/ */
public static final int confirm_get_locdict_fmt=0x7f0502eb; public static final int confirm_get_locdict_fmt=0x7f0502ed;
/** Text of confirmation dialog for above /** Text of confirmation dialog for above
Text of confirmation dialog for above Text of confirmation dialog for above
<string name="confirm_revert_all">Are you sure you want to restore <string name="confirm_revert_all">Are you sure you want to restore
@ -2032,16 +2032,16 @@ XLATE-ME
public static final int data_gsm_only=0x7f050290; public static final int data_gsm_only=0x7f050290;
/** <string name="db_store_done">SD card write complete.</string> /** <string name="db_store_done">SD card write complete.</string>
*/ */
public static final int db_store_done=0x7f05031f; public static final int db_store_done=0x7f050321;
/** XLATE-ME /** XLATE-ME
<string name="debug_features">Enable debug features</string> <string name="debug_features">Enable debug features</string>
*/ */
public static final int debug_features=0x7f0502f3; public static final int debug_features=0x7f0502f5;
/** XLATE-ME /** XLATE-ME
<string name="debug_features_summary">Menuitems etc. (release builds <string name="debug_features_summary">Menuitems etc. (release builds
only)</string> only)</string>
*/ */
public static final int debug_features_summary=0x7f0502f4; public static final int debug_features_summary=0x7f0502f6;
/** dictionary used by default for human players when creating /** dictionary used by default for human players when creating
new game new game
clarification of above clarification of above
@ -2149,7 +2149,7 @@ XLATE-ME
/** <string name="delete_dicts">Delete wordlist[s]</string> /** <string name="delete_dicts">Delete wordlist[s]</string>
*/ */
public static final int delete_dicts=0x7f0502b2; public static final int delete_dicts=0x7f0502b2;
public static final int devid_title=0x7f0502fb; public static final int devid_title=0x7f0502fd;
/** /**
<string name="sms_disabled">Playing via SMS is currently disabled. <string name="sms_disabled">Playing via SMS is currently disabled.
You can enable it in Settings->Network game settings.</string> You can enable it in Settings->Network game settings.</string>
@ -2191,7 +2191,7 @@ XLATE-ME
/** XLATE-ME /** XLATE-ME
<string name="dict_host">Wordlist download URL</string> <string name="dict_host">Wordlist download URL</string>
*/ */
public static final int dict_host=0x7f0502f0; public static final int dict_host=0x7f0502f2;
/** <string name="dict_info_fmt">Number of words: %1$d\nDownload size: /** <string name="dict_info_fmt">Number of words: %1$d\nDownload size:
%2$dK\nNote: %3$s</string> %2$dK\nNote: %3$s</string>
*/ */
@ -2301,15 +2301,15 @@ XLATE-ME
will use is substituted in for "%s". will use is substituted in for "%s".
*/ */
public static final int dicts_list_prompt_fmt=0x7f0500dc; public static final int dicts_list_prompt_fmt=0x7f0500dc;
public static final int disable_nag_solo_title=0x7f0502ea; public static final int disable_nag_solo_title=0x7f0502ec;
/** <string name="disable_nag_summary">Do not notify me no matter /** <string name="disable_nag_summary">Do not notify me no matter
how long it\'s been my turn</string> how long it\'s been my turn</string>
*/ */
public static final int disable_nag_summary=0x7f0502e9; public static final int disable_nag_summary=0x7f0502eb;
/** <string name="disable_nag_title">Disable turn reminders</string> /** <string name="disable_nag_title">Disable turn reminders</string>
*/ */
public static final int disable_nag_title=0x7f0502e8; public static final int disable_nag_title=0x7f0502ea;
public static final int disable_nags_title=0x7f0502e7; public static final int disable_nags_title=0x7f0502e9;
/** text of item at bottom of dicts choice spinner. It /** text of item at bottom of dicts choice spinner. It
launches the browser pointed at the site where additional launches the browser pointed at the site where additional
wordlists can be found. wordlists can be found.
@ -2339,7 +2339,7 @@ XLATE-ME
/** <string name="downloading_dict_fmt">Downloading %1$s</string> /** <string name="downloading_dict_fmt">Downloading %1$s</string>
*/ */
public static final int downloading_dict_fmt=0x7f050196; public static final int downloading_dict_fmt=0x7f050196;
public static final int drop_relay_warning_fmt=0x7f050322; public static final int drop_relay_warning_fmt=0x7f050324;
/** <string name="summary_thumb_enabled">Display snapshots of games</string> /** <string name="summary_thumb_enabled">Display snapshots of games</string>
<string name="summary_thumb_enabled">Display snapshots of games</string> <string name="summary_thumb_enabled">Display snapshots of games</string>
<string name="dropped_dupe">Invitation received but ignored: it <string name="dropped_dupe">Invitation received but ignored: it
@ -2413,11 +2413,11 @@ XLATE-ME
/** XLATE-ME /** XLATE-ME
<string name="enable_dupes_summary">Accept invitations more than once</string> <string name="enable_dupes_summary">Accept invitations more than once</string>
*/ */
public static final int enable_dupes_summary=0x7f050303; public static final int enable_dupes_summary=0x7f050305;
/** XLATE-ME /** XLATE-ME
<string name="enable_dupes_title">Accept duplicate invites</string> <string name="enable_dupes_title">Accept duplicate invites</string>
*/ */
public static final int enable_dupes_title=0x7f050301; public static final int enable_dupes_title=0x7f050303;
/** <string name="enable_nfc">NFC is turned off on this device. You /** <string name="enable_nfc">NFC is turned off on this device. You
can use the Android Settings app to turn it on .</string> can use the Android Settings app to turn it on .</string>
*/ */
@ -2425,11 +2425,11 @@ XLATE-ME
/** XLATE-ME /** XLATE-ME
<string name="enable_nfc_toself_summary">Fake invitation to aid debugging</string> <string name="enable_nfc_toself_summary">Fake invitation to aid debugging</string>
*/ */
public static final int enable_nfc_toself_summary=0x7f050306; public static final int enable_nfc_toself_summary=0x7f050308;
/** XLATE-ME /** XLATE-ME
<string name="enable_nfc_toself_title">Enable NFC to self</string> <string name="enable_nfc_toself_title">Enable NFC to self</string>
*/ */
public static final int enable_nfc_toself_title=0x7f050305; public static final int enable_nfc_toself_title=0x7f050307;
/** XLATE-ME /** XLATE-ME
<string name="enable_pubroom_summary">Rooms others can see and join</string> <string name="enable_pubroom_summary">Rooms others can see and join</string>
*/ */
@ -2438,8 +2438,8 @@ XLATE-ME
<string name="enable_pubroom_title">Enable public rooms</string> <string name="enable_pubroom_title">Enable public rooms</string>
*/ */
public static final int enable_pubroom_title=0x7f0502d6; public static final int enable_pubroom_title=0x7f0502d6;
public static final int enable_relay_toself_summary=0x7f05032e; public static final int enable_relay_toself_summary=0x7f050330;
public static final int enable_relay_toself_title=0x7f05032d; public static final int enable_relay_toself_title=0x7f05032f;
/** /**
<string name="enable_sms">Allow games via SMS</string> <string name="enable_sms">Allow games via SMS</string>
@ -2456,11 +2456,11 @@ XLATE-ME
/** XLATE-ME /** XLATE-ME
<string name="enable_sms_toself_summary">Skip radio when phone numbers same</string> <string name="enable_sms_toself_summary">Skip radio when phone numbers same</string>
*/ */
public static final int enable_sms_toself_summary=0x7f050308; public static final int enable_sms_toself_summary=0x7f05030a;
/** XLATE-ME /** XLATE-ME
<string name="enable_sms_toself_title">Short-circuit SMS to self</string> <string name="enable_sms_toself_title">Short-circuit SMS to self</string>
*/ */
public static final int enable_sms_toself_title=0x7f050307; public static final int enable_sms_toself_title=0x7f050309;
/** <string name="entering_trade">Tap tiles to select</string> /** <string name="entering_trade">Tap tiles to select</string>
*/ */
public static final int entering_trade=0x7f0500e1; public static final int entering_trade=0x7f0500e1;
@ -2473,7 +2473,7 @@ XLATE-ME
/** XLATE-ME /** XLATE-ME
<string name="expl_update_url">Update checks URL</string> <string name="expl_update_url">Update checks URL</string>
*/ */
public static final int expl_update_url=0x7f050312; public static final int expl_update_url=0x7f050314;
/** if this preference is checked, a dialog will be posted every /** if this preference is checked, a dialog will be posted every
time a robot makes a move or a move is received from a remote time a robot makes a move or a move is received from a remote
player. player.
@ -2498,7 +2498,7 @@ XLATE-ME
explanation of the above explanation of the above
*/ */
public static final int explain_robot_summary=0x7f050154; public static final int explain_robot_summary=0x7f050154;
public static final int fetching_from_relay=0x7f050334; public static final int fetching_from_relay=0x7f050336;
/** title of dialog brought up in response to the /** title of dialog brought up in response to the
board_menu_game_final menu. The dialog displays the final board_menu_game_final menu. The dialog displays the final
score and an accounting of it (including subtractions for score and an accounting of it (including subtractions for
@ -2528,7 +2528,7 @@ XLATE-ME
/** XLATE-ME /** XLATE-ME
<string name="force_radio_title">Pretend to have radio</string> <string name="force_radio_title">Pretend to have radio</string>
*/ */
public static final int force_radio_title=0x7f050309; public static final int force_radio_title=0x7f05030b;
/** <string name="force_tablet_summary">Even if my screen is too small</string> /** <string name="force_tablet_summary">Even if my screen is too small</string>
*/ */
public static final int force_tablet_summary=0x7f0502bd; public static final int force_tablet_summary=0x7f0502bd;
@ -2684,7 +2684,7 @@ XLATE-ME
/** XLATE-ME /** XLATE-ME
<string name="game_summary_field_gameid">gameid</string> <string name="game_summary_field_gameid">gameid</string>
*/ */
public static final int game_summary_field_gameid=0x7f050310; public static final int game_summary_field_gameid=0x7f050312;
/** Put the language there, so it reads "Game 2 (English)" /** Put the language there, so it reads "Game 2 (English)"
Put the language there, so it reads "Game 2 (English)" Put the language there, so it reads "Game 2 (English)"
<string name="game_summary_field_language">Game language\u200C</string> <string name="game_summary_field_language">Game language\u200C</string>
@ -2694,7 +2694,7 @@ XLATE-ME
/** XLATE-ME /** XLATE-ME
<string name="game_summary_field_npackets">Pending packet count</string> <string name="game_summary_field_npackets">Pending packet count</string>
*/ */
public static final int game_summary_field_npackets=0x7f050311; public static final int game_summary_field_npackets=0x7f050313;
/** List names of opponents (summarized), e.g. "Game 2 (vs Kati)" /** List names of opponents (summarized), e.g. "Game 2 (vs Kati)"
List names of opponents (summarized), e.g. "Game 2 (vs Kati)" List names of opponents (summarized), e.g. "Game 2 (vs Kati)"
<string name="game_summary_field_opponents">Opponent name[s]</string> <string name="game_summary_field_opponents">Opponent name[s]</string>
@ -2704,7 +2704,7 @@ XLATE-ME
/** XLATE-ME /** XLATE-ME
<string name="game_summary_field_rowid">rowid</string> <string name="game_summary_field_rowid">rowid</string>
*/ */
public static final int game_summary_field_rowid=0x7f05030f; public static final int game_summary_field_rowid=0x7f050311;
/** List the state of the game, "Game over" or "10 moves made" /** List the state of the game, "Game over" or "10 moves made"
etc. etc.
List the state of the game, "Game over" or "10 moves made" List the state of the game, "Game over" or "10 moves made"
@ -2776,13 +2776,13 @@ XLATE-ME
/** XLATE-ME /** XLATE-ME
<string name="gamel_menu_loaddb">Load DB from SD card</string> <string name="gamel_menu_loaddb">Load DB from SD card</string>
*/ */
public static final int gamel_menu_loaddb=0x7f050300; public static final int gamel_menu_loaddb=0x7f050302;
/** XLATE-ME /** XLATE-ME
<string name="name_dict_fmt">%1$s/%2$s</string> <string name="name_dict_fmt">%1$s/%2$s</string>
XLATE-ME XLATE-ME
<string name="gamel_menu_storedb">Write DB to SD card</string> <string name="gamel_menu_storedb">Write DB to SD card</string>
*/ */
public static final int gamel_menu_storedb=0x7f0502ff; public static final int gamel_menu_storedb=0x7f050301;
/** <string name="gamel_menu_study">Studylist</string> /** <string name="gamel_menu_study">Studylist</string>
*/ */
public static final int gamel_menu_study=0x7f05027e; public static final int gamel_menu_study=0x7f05027e;
@ -2800,13 +2800,13 @@ XLATE-ME
/** XLATE-ME /** XLATE-ME
<string name="git_rev_title">Source version id</string> <string name="git_rev_title">Source version id</string>
*/ */
public static final int git_rev_title=0x7f0502fa; public static final int git_rev_title=0x7f0502fc;
/** <string name="got_langdict_summary">Don\'t try a second time</string> /** <string name="got_langdict_summary">Don\'t try a second time</string>
*/ */
public static final int got_langdict_summary=0x7f050314; public static final int got_langdict_summary=0x7f050316;
/** <string name="got_langdict_title">Fetch default wordlist for language</string> /** <string name="got_langdict_title">Fetch default wordlist for language</string>
*/ */
public static final int got_langdict_title=0x7f050313; public static final int got_langdict_title=0x7f050315;
/** <string name="green">Green</string> /** <string name="green">Green</string>
*/ */
public static final int green=0x7f05014f; public static final int green=0x7f05014f;
@ -3097,7 +3097,7 @@ XLATE-ME
/** EXPERIMENTAL: Shown as toast when user chooses "My choice" for /** EXPERIMENTAL: Shown as toast when user chooses "My choice" for
invitation invitation
*/ */
public static final int invite_copied=0x7f05032f; public static final int invite_copied=0x7f050331;
/** <string name="invite_dict_missing_body_fmt">%1$s has invited you to /** <string name="invite_dict_missing_body_fmt">%1$s has invited you to
play Crosswords using the wordlist %2$s (for play in %3$s), but it play Crosswords using the wordlist %2$s (for play in %3$s), but it
is not installed. Would you like to download the wordlist or is not installed. Would you like to download the wordlist or
@ -3194,7 +3194,7 @@ XLATE-ME
expect it to take a while. They will still be able to expect it to take a while. They will still be able to
connect.)</string> connect.)</string>
*/ */
public static final int invite_stays=0x7f0502df; public static final int invite_stays=0x7f0502e0;
/** <string name="sms_or_email">Send invitation using SMS (texting) or /** <string name="sms_or_email">Send invitation using SMS (texting) or
via email?</string> via email?</string>
<string name="nfc_or_email">Send invitation using NFC (Android <string name="nfc_or_email">Send invitation using NFC (Android
@ -3500,7 +3500,7 @@ XLATE-ME
pulls up dialog to delete the selected game pulls up dialog to delete the selected game
*/ */
public static final int list_item_delete=0x7f05009c; public static final int list_item_delete=0x7f05009c;
public static final int list_item_deselect=0x7f050337; public static final int list_item_deselect=0x7f050339;
/** pulls up dialog to change the group of the selected game /** pulls up dialog to change the group of the selected game
pulls up dialog to change the group of the selected game pulls up dialog to change the group of the selected game
pulls up dialog to change the group of the selected game pulls up dialog to change the group of the selected game
@ -3539,7 +3539,7 @@ XLATE-ME
except for any configuration. except for any configuration.
*/ */
public static final int list_item_reset=0x7f05009d; public static final int list_item_reset=0x7f05009d;
public static final int list_item_select=0x7f050336; public static final int list_item_select=0x7f050338;
/** formatting for last move summary in notifications /** formatting for last move summary in notifications
formatting for last move summary in notifications formatting for last move summary in notifications
<string name="lmi_pass_fmt">%1$s passed (0 points)</string> <string name="lmi_pass_fmt">%1$s passed (0 points)</string>
@ -3691,11 +3691,11 @@ XLATE-ME
/** XLATE-ME /** XLATE-ME
<string name="logging_on">Enable logging</string> <string name="logging_on">Enable logging</string>
*/ */
public static final int logging_on=0x7f0502f1; public static final int logging_on=0x7f0502f3;
/** XLATE-ME /** XLATE-ME
<string name="logging_on_summary">(release builds only)</string> <string name="logging_on_summary">(release builds only)</string>
*/ */
public static final int logging_on_summary=0x7f0502f2; public static final int logging_on_summary=0x7f0502f4;
/** <string name="lookup_title">Word lookup</string> /** <string name="lookup_title">Word lookup</string>
*/ */
public static final int lookup_title=0x7f050287; public static final int lookup_title=0x7f050287;
@ -3941,7 +3941,7 @@ XLATE-ME
/** XLATE-ME /** XLATE-ME
<string name="nag_intervals">Reminder intervals (minutes1,minutes2,...)</string> <string name="nag_intervals">Reminder intervals (minutes1,minutes2,...)</string>
*/ */
public static final int nag_intervals=0x7f050304; public static final int nag_intervals=0x7f050306;
/** Nagging: title of notification reminder message /** Nagging: title of notification reminder message
Nagging: title of notification reminder message Nagging: title of notification reminder message
<string name="nag_title">Reminder: It\'s your turn</string> <string name="nag_title">Reminder: It\'s your turn</string>
@ -3956,7 +3956,7 @@ XLATE-ME
<string name="name_copy_fmt">%1$s copy</string> <string name="name_copy_fmt">%1$s copy</string>
*/ */
public static final int name_copy_fmt=0x7f05020c; public static final int name_copy_fmt=0x7f05020c;
public static final int name_dict_fmt=0x7f0502fe; public static final int name_dict_fmt=0x7f050300;
public static final int nbs_port=0x7f050083; public static final int nbs_port=0x7f050083;
/** text of checkbox. If this checkbox is checked, games created /** text of checkbox. If this checkbox is checked, games created
for network play will by default have the hint feature for network play will by default have the hint feature
@ -3985,7 +3985,7 @@ XLATE-ME
/** XLATE-ME /** XLATE-ME
<string name="netstats_title">Game network stats</string> <string name="netstats_title">Game network stats</string>
*/ */
public static final int netstats_title=0x7f0502f9; public static final int netstats_title=0x7f0502fb;
/** XLATE-ME /** XLATE-ME
<string name="network_advanced_summary">For experienced players</string> <string name="network_advanced_summary">For experienced players</string>
*/ */
@ -4266,7 +4266,7 @@ XLATE-ME
of this device against the one you want to inviteany time the of this device against the one you want to inviteany time the
game is open.</string> game is open.</string>
*/ */
public static final int nfc_just_tap=0x7f0502e0; public static final int nfc_just_tap=0x7f0502e1;
/** XLATE-ME /** XLATE-ME
<string name="radio_name_gsm">GSM</string> <string name="radio_name_gsm">GSM</string>
XLATE-ME XLATE-ME
@ -4274,7 +4274,7 @@ XLATE-ME
XLATE-ME XLATE-ME
<string name="nfc_to_self">Send via NFC to self?</string> <string name="nfc_to_self">Send via NFC to self?</string>
*/ */
public static final int nfc_to_self=0x7f05030e; public static final int nfc_to_self=0x7f050310;
/** Title of dialog for renaming game (triggered by selecting /** Title of dialog for renaming game (triggered by selecting
list_item_rename) list_item_rename)
If you try to copy a networked game you get this error If you try to copy a networked game you get this error
@ -4542,7 +4542,7 @@ XLATE-ME
substituted. substituted.
*/ */
public static final int no_name_found_fmt=0x7f0500c2; public static final int no_name_found_fmt=0x7f0500c2;
public static final int no_relay_conn=0x7f050321; public static final int no_relay_conn=0x7f050323;
/** This is not currently shown /** This is not currently shown
<string name="not_again_dicts">Crosswords wordlists, which are <string name="not_again_dicts">Crosswords wordlists, which are
just compressed lists of words plus tile information, determine just compressed lists of words plus tile information, determine
@ -4617,10 +4617,10 @@ XLATE-ME
/** EXPERIMENTAL: Newbie hint next when invite_choice_clip shown /** EXPERIMENTAL: Newbie hint next when invite_choice_clip shown
when chosen when chosen
*/ */
public static final int not_again_clip_expl_fmt=0x7f050331; public static final int not_again_clip_expl_fmt=0x7f050333;
public static final int not_again_comms_bt=0x7f05032a; public static final int not_again_comms_bt=0x7f05032c;
public static final int not_again_comms_relay=0x7f050328; public static final int not_again_comms_relay=0x7f05032a;
public static final int not_again_comms_sms=0x7f050329; public static final int not_again_comms_sms=0x7f05032b;
/** This is shown in the Board screen when you successfully /** This is shown in the Board screen when you successfully
connecting a game to the relay and are the last device in the connecting a game to the relay and are the last device in the
game to do so, i.e. the game is now complete and you should game to do so, i.e. the game is now complete and you should
@ -4671,7 +4671,7 @@ XLATE-ME
for games with more than two devices, which are rare. for games with more than two devices, which are rare.
*/ */
public static final int not_again_conndmid=0x7f0501c5; public static final int not_again_conndmid=0x7f0501c5;
public static final int not_again_dfltname_fmt=0x7f050338; public static final int not_again_dfltname_fmt=0x7f05033a;
/** <string name="not_again_dicts">This screen lets you install new /** <string name="not_again_dicts">This screen lets you install new
wordslists and view the ones you already have.\n\nWhat wordlists wordslists and view the ones you already have.\n\nWhat wordlists
you have installed determines:\n What languages you can play you have installed determines:\n What languages you can play
@ -4700,7 +4700,7 @@ XLATE-ME
and want them back, enable them now. You can turn them off again and want them back, enable them now. You can turn them off again
in Settings.</string> in Settings.</string>
*/ */
public static final int not_again_enablepublic=0x7f0502e6; public static final int not_again_enablepublic=0x7f0502e8;
/** Shown when you tap the flip button on the toolbar of the main /** Shown when you tap the flip button on the toolbar of the main
Board screen Board screen
Shown when you tap the flip button on the toolbar of the main Shown when you tap the flip button on the toolbar of the main
@ -4794,7 +4794,7 @@ XLATE-ME
\"Actionbar.\"</string> \"Actionbar.\"</string>
*/ */
public static final int not_again_newselect=0x7f05026c; public static final int not_again_newselect=0x7f05026c;
public static final int not_again_rematch_two_only=0x7f05032c; public static final int not_again_rematch_two_only=0x7f05032e;
/** <string name="not_again_studycopy">The selected words will be /** <string name="not_again_studycopy">The selected words will be
copied to the system clipboard. You can then paste them into any copied to the system clipboard. You can then paste them into any
app that supports pasting text, e.g. an email app.</string> app that supports pasting text, e.g. an email app.</string>
@ -5377,22 +5377,22 @@ XLATE-ME
public static final int players_label_standalone=0x7f0500b6; public static final int players_label_standalone=0x7f0500b6;
/** <string name="pref_group_l10n_summary">Prefs related to in-app localization</string> /** <string name="pref_group_l10n_summary">Prefs related to in-app localization</string>
*/ */
public static final int pref_group_l10n_summary=0x7f05031a; public static final int pref_group_l10n_summary=0x7f05031c;
/** <string name="pref_group_l10n_title">Localization Stuff</string> /** <string name="pref_group_l10n_title">Localization Stuff</string>
*/ */
public static final int pref_group_l10n_title=0x7f050319; public static final int pref_group_l10n_title=0x7f05031b;
/** <string name="pref_group_relay_summary">Prefs related to play via internet/relay</string> /** <string name="pref_group_relay_summary">Prefs related to play via internet/relay</string>
*/ */
public static final int pref_group_relay_summary=0x7f050318; public static final int pref_group_relay_summary=0x7f05031a;
/** <string name="pref_group_relay_title">Relay Stuff</string> /** <string name="pref_group_relay_title">Relay Stuff</string>
*/ */
public static final int pref_group_relay_title=0x7f050317; public static final int pref_group_relay_title=0x7f050319;
/** <string name="pref_group_sms_summary">Prefs related to play-via-sms</string> /** <string name="pref_group_sms_summary">Prefs related to play-via-sms</string>
*/ */
public static final int pref_group_sms_summary=0x7f050316; public static final int pref_group_sms_summary=0x7f050318;
/** <string name="pref_group_sms_title">SMS Stuff</string> /** <string name="pref_group_sms_title">SMS Stuff</string>
*/ */
public static final int pref_group_sms_title=0x7f050315; public static final int pref_group_sms_title=0x7f050317;
/** Label for the first "human player" name preference /** Label for the first "human player" name preference
Label for the first "human player" name preference Label for the first "human player" name preference
<string name="pref_human_name">Human player</string> <string name="pref_human_name">Human player</string>
@ -5400,10 +5400,10 @@ XLATE-ME
public static final int pref_human_name=0x7f050127; public static final int pref_human_name=0x7f050127;
/** <string name="pref_item_update_summary">Get intermediate builds</string> /** <string name="pref_item_update_summary">Get intermediate builds</string>
*/ */
public static final int pref_item_update_summary=0x7f05031c; public static final int pref_item_update_summary=0x7f05031e;
/** <string name="pref_item_update_title">Update between releases</string> /** <string name="pref_item_update_title">Update between releases</string>
*/ */
public static final int pref_item_update_title=0x7f05031b; public static final int pref_item_update_title=0x7f05031d;
/** Label for the first player color preference /** Label for the first player color preference
Label for the first player color preference Label for the first player color preference
<string name="pref_player1_name">First player</string> <string name="pref_player1_name">First player</string>
@ -5608,7 +5608,7 @@ XLATE-ME
<string name="prev_player">Your opponent</string> <string name="prev_player">Your opponent</string>
*/ */
public static final int prev_player=0x7f0502c1; public static final int prev_player=0x7f0502c1;
public static final int processing_games=0x7f050335; public static final int processing_games=0x7f050337;
/** <string name="progress_title">Downloading</string> /** <string name="progress_title">Downloading</string>
*/ */
public static final int progress_title=0x7f0502b5; public static final int progress_title=0x7f0502b5;
@ -5627,7 +5627,7 @@ XLATE-ME
/** XLATE-ME /** XLATE-ME
<string name="proxy_port">Relay device port</string> <string name="proxy_port">Relay device port</string>
*/ */
public static final int proxy_port=0x7f0502fd; public static final int proxy_port=0x7f0502ff;
/** Short for "points", this is shown at the right end of the /** Short for "points", this is shown at the right end of the
tray in place of the first tile placed along with the points tray in place of the first tile placed along with the points
the current move would earn if committed. the current move would earn if committed.
@ -5661,16 +5661,16 @@ XLATE-ME
middle of a game, like "do you want to commit this move?" middle of a game, like "do you want to commit this move?"
*/ */
public static final int query_title=0x7f0501b3; public static final int query_title=0x7f0501b3;
public static final int radio_name_cdma=0x7f05030d; public static final int radio_name_cdma=0x7f05030f;
public static final int radio_name_gsm=0x7f05030c; public static final int radio_name_gsm=0x7f05030e;
/** XLATE-ME /** XLATE-ME
<string name="radio_name_real">Don\'t pretend</string> <string name="radio_name_real">Don\'t pretend</string>
*/ */
public static final int radio_name_real=0x7f05030a; public static final int radio_name_real=0x7f05030c;
/** XLATE-ME /** XLATE-ME
<string name="radio_name_tablet">Tablet/no radio</string> <string name="radio_name_tablet">Tablet/no radio</string>
*/ */
public static final int radio_name_tablet=0x7f05030b; public static final int radio_name_tablet=0x7f05030d;
/** /**
############################################################ ############################################################
# :Dialogs: # :Dialogs:
@ -5710,8 +5710,8 @@ XLATE-ME
/** XLATE-ME /** XLATE-ME
<string name="redir_host">Invite redirect host</string> <string name="redir_host">Invite redirect host</string>
*/ */
public static final int redir_host=0x7f0502ef; public static final int redir_host=0x7f0502f1;
public static final int rel_invite_title=0x7f050333; public static final int rel_invite_title=0x7f050335;
/** Title of dialog used to alert players to relay-related /** Title of dialog used to alert players to relay-related
problems with the current game. problems with the current game.
the color of text, e.g. "2L", shown on a bonus square on the the color of text, e.g. "2L", shown on a bonus square on the
@ -5731,12 +5731,12 @@ XLATE-ME
/** XLATE-ME /** XLATE-ME
<string name="relay_host">Relay host</string> <string name="relay_host">Relay host</string>
*/ */
public static final int relay_host=0x7f0502ee; public static final int relay_host=0x7f0502f0;
public static final int relay_invite_title=0x7f050208; public static final int relay_invite_title=0x7f050208;
/** XLATE-ME /** XLATE-ME
<string name="relay_port">Relay game port</string> <string name="relay_port">Relay game port</string>
*/ */
public static final int relay_port=0x7f0502fc; public static final int relay_port=0x7f0502fe;
/** Shown in toast when relaunching after switching dicts /** Shown in toast when relaunching after switching dicts
Shown in toast when relaunching after switching dicts Shown in toast when relaunching after switching dicts
<string name="reload_new_dict_fmt">Reloading game with %1$s</string> <string name="reload_new_dict_fmt">Reloading game with %1$s</string>
@ -5749,8 +5749,9 @@ XLATE-ME
keep this game open while waiting. You will be notified when the keep this game open while waiting. You will be notified when the
game is ready to play.</string> game is ready to play.</string>
*/ */
public static final int rematch_msg=0x7f0502e5; public static final int rematch_msg=0x7f0502e7;
public static final int rematch_name_fmt=0x7f0502cb; public static final int rematch_name_fmt=0x7f0502cb;
public static final int rematch_sent_toast=0x7f0502e6;
/** <string name="remote_digesting">Processing wordlist information</string> /** <string name="remote_digesting">Processing wordlist information</string>
*/ */
public static final int remote_digesting=0x7f0502af; public static final int remote_digesting=0x7f0502af;
@ -5871,7 +5872,7 @@ XLATE-ME
title for popup of public rooms found on server title for popup of public rooms found on server
*/ */
public static final int room_public_prompt=0x7f0500c0; public static final int room_public_prompt=0x7f0500c0;
public static final int seeking_relay=0x7f050320; public static final int seeking_relay=0x7f050322;
/** <string name="sel_games_fmt">Games: %1$d</string> /** <string name="sel_games_fmt">Games: %1$d</string>
*/ */
public static final int sel_games_fmt=0x7f05026e; public static final int sel_games_fmt=0x7f05026e;
@ -6108,7 +6109,7 @@ XLATE-ME
placed, i.e. they do not form a single word. placed, i.e. they do not form a single word.
*/ */
public static final int str_no_empties_in_turn=0x7f05018b; public static final int str_no_empties_in_turn=0x7f05018b;
public static final int str_no_hint_found=0x7f05032b; public static final int str_no_hint_found=0x7f05032d;
/** Same as above, but used when you try to show tiles belonging /** Same as above, but used when you try to show tiles belonging
to a player on another device (a remote player.) to a player on another device (a remote player.)
Same as above, but used when you try to show tiles belonging Same as above, but used when you try to show tiles belonging
@ -6535,7 +6536,7 @@ string name="str_robot_moved">Robot provedl tento tah:</string
/** XLATE-ME /** XLATE-ME
<string name="summary_send_data_sms">(GSM phones only)</string> <string name="summary_send_data_sms">(GSM phones only)</string>
*/ */
public static final int summary_send_data_sms=0x7f0502f6; public static final int summary_send_data_sms=0x7f0502f8;
/** explanation of the above /** explanation of the above
explanation of the above explanation of the above
<string name="summary_sort_tiles">Sort racks whenever new tiles <string name="summary_sort_tiles">Sort racks whenever new tiles
@ -6741,7 +6742,7 @@ string name="str_robot_moved">Robot provedl tento tah:</string
/** XLATE-ME /** XLATE-ME
<string name="title_send_data_sms">Send SMS as data</string> <string name="title_send_data_sms">Send SMS as data</string>
*/ */
public static final int title_send_data_sms=0x7f0502f5; public static final int title_send_data_sms=0x7f0502f7;
/** If this preference is checked, tiles in the rack will be /** If this preference is checked, tiles in the rack will be
re-ordered alphabetically whenever tiles are added, re-ordered alphabetically whenever tiles are added,
i.e. after ever move. i.e. after ever move.
@ -6889,6 +6890,7 @@ string name="str_robot_moved">Robot provedl tento tah:</string
/** Button for alert with title above /** Button for alert with title above
*/ */
public static final int waiting_invite_title=0x7f0502dc; public static final int waiting_invite_title=0x7f0502dc;
public static final int waiting_rematch_title=0x7f0502dd;
/** XLATE-ME /** XLATE-ME
<string name="waiting_title">Waiting for players</string> <string name="waiting_title">Waiting for players</string>
*/ */
@ -6906,7 +6908,7 @@ string name="str_robot_moved">Robot provedl tento tah:</string
options every new networked game will have to be configured options every new networked game will have to be configured
manually.</string> manually.</string>
*/ */
public static final int warn_no_comms=0x7f0502e1; public static final int warn_no_comms=0x7f0502e2;
/** /**
<string name="warn_nomobile_fmt">The number %1$s for %2$s is not <string name="warn_nomobile_fmt">The number %1$s for %2$s is not
@ -6934,7 +6936,7 @@ réseau.)</string>
*/ */
public static final int warn_unlimited=0x7f05021c; public static final int warn_unlimited=0x7f05021c;
public static final int wifi_warning=0x7f050324; public static final int wifi_warning=0x7f050326;
/** /**
<string name="word_search_hint">First letters</string> <string name="word_search_hint">First letters</string>
@ -6950,7 +6952,7 @@ réseau.)</string>
/** XLATE-ME /** XLATE-ME
<string name="xlations_locale">Fake locale for translation</string> <string name="xlations_locale">Fake locale for translation</string>
*/ */
public static final int xlations_locale=0x7f050302; public static final int xlations_locale=0x7f050304;
/** Empty in English, this should contain the name of the /** Empty in English, this should contain the name of the
translator/creator of the strings.xml file for this translator/creator of the strings.xml file for this
language language

View file

@ -2470,6 +2470,7 @@
<string name="waiting_title">Waiting for players</string> <string name="waiting_title">Waiting for players</string>
<!-- Button for alert with title above --> <!-- Button for alert with title above -->
<string name="waiting_invite_title">Waiting for response</string> <string name="waiting_invite_title">Waiting for response</string>
<string name="waiting_rematch_title">Rematch in progress</string>
<!-- Button for alert with title above --> <!-- Button for alert with title above -->
<string name="button_wait">Wait</string> <string name="button_wait">Wait</string>
<string name="button_reinvite">Re-invite</string> <string name="button_reinvite">Re-invite</string>
@ -2494,10 +2495,10 @@
<string name="button_edit">Edit</string> <string name="button_edit">Edit</string>
<string name="button_discard_changes">Discard changes</string> <string name="button_discard_changes">Discard changes</string>
<string name="rematch_msg">Issuing rematch invitation. You will <string name="rematch_sent_toast">Rematch invitations sent</string>
see this message until it has been accepted.\n\nYou do not need to <string name="rematch_msg">This game is hosting a rematch, and has
keep this game open while waiting. You will be notified when the sent an invitation. You will see this message until it has been
game is ready to play.</string> accepted.</string>
<string name="not_again_enablepublic">Public rooms have been made <string name="not_again_enablepublic">Public rooms have been made
an \"advanced\" feature in this release. If you were using them an \"advanced\" feature in this release. If you were using them

View file

@ -2120,6 +2120,7 @@
<string name="waiting_title">Gnitiaw rof sreyalp</string> <string name="waiting_title">Gnitiaw rof sreyalp</string>
<!-- Button for alert with title above --> <!-- Button for alert with title above -->
<string name="waiting_invite_title">Gnitiaw rof esnopser</string> <string name="waiting_invite_title">Gnitiaw rof esnopser</string>
<string name="waiting_rematch_title">Hctamer ni ssergorp</string>
<!-- Button for alert with title above --> <!-- Button for alert with title above -->
<string name="button_wait">Tiaw</string> <string name="button_wait">Tiaw</string>
<string name="button_reinvite">Etivni-er</string> <string name="button_reinvite">Etivni-er</string>
@ -2139,10 +2140,10 @@
tide ot evig ti a yaw ot ?tcennoc</string> tide ot evig ti a yaw ot ?tcennoc</string>
<string name="button_edit">Tide</string> <string name="button_edit">Tide</string>
<string name="button_discard_changes">Dracsid segnahc</string> <string name="button_discard_changes">Dracsid segnahc</string>
<string name="rematch_msg">Gniussi hctamer noitativni. Uoy lliw <string name="rematch_sent_toast">Hctamer snoitativni tnes</string>
ees siht egassem litnu ti sah neeb detpecca.\n\nUoy od ton deen ot <string name="rematch_msg">Siht emag si gnitsoh a ,hctamer dna sah
peek siht emag nepo elihw gnitiaw. Uoy lliw eb deifiton nehw eht tnes na noitativni. Uoy lliw ees siht egassem litnu ti sah neeb
emag si ydaer ot yalp.</string> detpecca.</string>
<string name="not_again_enablepublic">Cilbup smoor evah neeb edam <string name="not_again_enablepublic">Cilbup smoor evah neeb edam
na \"decnavda\" erutaef ni siht esaeler. Fi uoy erew gnisu meht na \"decnavda\" erutaef ni siht esaeler. Fi uoy erew gnisu meht
dna tnaw meht ,kcab elbane meht won. Uoy nac nrut meht ffo niaga dna tnaw meht ,kcab elbane meht won. Uoy nac nrut meht ffo niaga

View file

@ -2120,6 +2120,7 @@
<string name="waiting_title">WAITING FOR PLAYERS</string> <string name="waiting_title">WAITING FOR PLAYERS</string>
<!-- Button for alert with title above --> <!-- Button for alert with title above -->
<string name="waiting_invite_title">WAITING FOR RESPONSE</string> <string name="waiting_invite_title">WAITING FOR RESPONSE</string>
<string name="waiting_rematch_title">REMATCH IN PROGRESS</string>
<!-- Button for alert with title above --> <!-- Button for alert with title above -->
<string name="button_wait">WAIT</string> <string name="button_wait">WAIT</string>
<string name="button_reinvite">RE-INVITE</string> <string name="button_reinvite">RE-INVITE</string>
@ -2139,10 +2140,10 @@
EDIT TO GIVE IT A WAY TO CONNECT?</string> EDIT TO GIVE IT A WAY TO CONNECT?</string>
<string name="button_edit">EDIT</string> <string name="button_edit">EDIT</string>
<string name="button_discard_changes">DISCARD CHANGES</string> <string name="button_discard_changes">DISCARD CHANGES</string>
<string name="rematch_msg">ISSUING REMATCH INVITATION. YOU WILL <string name="rematch_sent_toast">REMATCH INVITATIONS SENT</string>
SEE THIS MESSAGE UNTIL IT HAS BEEN ACCEPTED.\n\nYOU DO NOT NEED TO <string name="rematch_msg">THIS GAME IS HOSTING A REMATCH, AND HAS
KEEP THIS GAME OPEN WHILE WAITING. YOU WILL BE NOTIFIED WHEN THE SENT AN INVITATION. YOU WILL SEE THIS MESSAGE UNTIL IT HAS BEEN
GAME IS READY TO PLAY.</string> ACCEPTED.</string>
<string name="not_again_enablepublic">PUBLIC ROOMS HAVE BEEN MADE <string name="not_again_enablepublic">PUBLIC ROOMS HAVE BEEN MADE
AN \"ADVANCED\" FEATURE IN THIS RELEASE. IF YOU WERE USING THEM AN \"ADVANCED\" FEATURE IN THIS RELEASE. IF YOU WERE USING THEM
AND WANT THEM BACK, ENABLE THEM NOW. YOU CAN TURN THEM OFF AGAIN AND WANT THEM BACK, ENABLE THEM NOW. YOU CAN TURN THEM OFF AGAIN

View file

@ -1,6 +1,6 @@
/* -*- compile-command: "find-and-ant.sh debug install"; -*- */ /* -*- compile-command: "find-and-ant.sh debug install"; -*- */
/* /*
* Copyright 2009 - 2014 by Eric House (xwords@eehouse.org). All * Copyright 2009 - 2016 by Eric House (xwords@eehouse.org). All
* rights reserved. * rights reserved.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
@ -87,7 +87,7 @@ public class BoardDelegate extends DelegateBase
private GameLock m_gameLock; private GameLock m_gameLock;
private CurGameInfo m_gi; private CurGameInfo m_gi;
private GameSummary m_summary; private GameSummary m_summary;
private boolean m_relayConnected; private boolean m_relayMissing;
private CommsTransport m_xport; private CommsTransport m_xport;
private Handler m_handler = null; private Handler m_handler = null;
private TimerRunnable[] m_timers; private TimerRunnable[] m_timers;
@ -140,7 +140,6 @@ public class BoardDelegate extends DelegateBase
private int m_nGuestDevs = -1; private int m_nGuestDevs = -1;
private boolean m_haveInvited = false; private boolean m_haveInvited = false;
private boolean m_overNotShown; private boolean m_overNotShown;
private boolean m_rematchInvitesSent = false;
private static Set<BoardDelegate> s_this = new HashSet<BoardDelegate>(); private static Set<BoardDelegate> s_this = new HashSet<BoardDelegate>();
@ -433,9 +432,14 @@ public class BoardDelegate extends DelegateBase
lstnr = new OnClickListener() { lstnr = new OnClickListener() {
public void onClick( DialogInterface dialog, public void onClick( DialogInterface dialog,
int item ) { int item ) {
if ( m_relayConnected || if ( !m_relayMissing ||
! m_connTypes.contains(CommsConnType.COMMS_CONN_RELAY) ) { ! m_connTypes.contains(CommsConnType.COMMS_CONN_RELAY) ) {
Assert.assertTrue( 0 < m_nMissing );
if ( m_summary.hasRematchInfo() ) {
tryRematchInvites( true );
} else {
showInviteChoicesThen( Action.LAUNCH_INVITE_ACTION ); showInviteChoicesThen( Action.LAUNCH_INVITE_ACTION );
}
} else { } else {
askDropRelay(); askDropRelay();
} }
@ -490,12 +494,7 @@ public class BoardDelegate extends DelegateBase
boolean nukeInviteButton = false; boolean nukeInviteButton = false;
boolean nukeNeutButton = true; boolean nukeNeutButton = true;
int buttonTxt = R.string.newgame_invite; int buttonTxt = R.string.newgame_invite;
if ( m_summary.hasRematchInfo() ) { if ( m_relayMissing ) {
titleID = R.string.info_title;;
message = getString( R.string.rematch_msg );
nukeInviteButton = true;
} else {
if ( !m_relayConnected ) {
titleID = R.string.seeking_relay; titleID = R.string.seeking_relay;
// If relay is only means, don't allow at all // If relay is only means, don't allow at all
boolean relayOnly = 1 >= m_connTypes.size(); boolean relayOnly = 1 >= m_connTypes.size();
@ -517,14 +516,20 @@ public class BoardDelegate extends DelegateBase
} else { } else {
m_sentInfo = DBUtils.getInvitesFor( m_activity, m_rowid ); m_sentInfo = DBUtils.getInvitesFor( m_activity, m_rowid );
int nSent = m_sentInfo.getMinPlayerCount(); int nSent = m_sentInfo.getMinPlayerCount();
boolean haveSent = nSent >= m_nMissing; boolean invitesSent = nSent >= m_nMissing;
if ( haveSent ) { if ( invitesSent ) {
if ( m_summary.hasRematchInfo() ) {
titleID = R.string.waiting_rematch_title;
message = getString( R.string.rematch_msg );
} else {
titleID = R.string.waiting_invite_title; titleID = R.string.waiting_invite_title;
message = getQuantityString( R.plurals.invite_sent_fmt, message = getQuantityString( R.plurals.invite_sent_fmt,
nSent, nSent, m_nMissing ); nSent, nSent, m_nMissing );
}
buttonTxt = R.string.button_reinvite; buttonTxt = R.string.button_reinvite;
nukeNeutButton = false; nukeNeutButton = false;
} else if ( DeviceRole.SERVER_ISCLIENT == m_gi.serverRole ) { } else if ( DeviceRole.SERVER_ISCLIENT == m_gi.serverRole ) {
Assert.assertFalse( m_summary.hasRematchInfo() );
message = getString( R.string.invited_msg ); message = getString( R.string.invited_msg );
titleID = R.string.waiting_title; titleID = R.string.waiting_title;
nukeInviteButton = true; nukeInviteButton = true;
@ -534,7 +539,7 @@ public class BoardDelegate extends DelegateBase
m_nMissing, m_nMissing ); m_nMissing, m_nMissing );
} }
if ( ! haveSent && ! nukeInviteButton ) { if ( ! invitesSent && ! nukeInviteButton ) {
String ps = null; String ps = null;
if ( m_nMissing > 1 ) { if ( m_nMissing > 1 ) {
ps = getString( R.string.invite_multiple ); ps = getString( R.string.invite_multiple );
@ -551,7 +556,6 @@ public class BoardDelegate extends DelegateBase
message += "\n\n" + getString( R.string.invite_stays ); message += "\n\n" + getString( R.string.invite_stays );
} }
}
ad.setMessage( message ); ad.setMessage( message );
ad.setTitle( titleID ); ad.setTitle( titleID );
@ -719,7 +723,7 @@ public class BoardDelegate extends DelegateBase
setBackgroundColor(); setBackgroundColor();
setKeepScreenOn(); setKeepScreenOn();
} else if ( ! isFinishing() ) { } else if ( ! isFinishing() ) {
if ( !m_relayConnected || 0 < m_nMissing ) { if ( m_relayMissing || 0 < m_nMissing ) {
showDialog( DlgID.DLG_INVITE ); showDialog( DlgID.DLG_INVITE );
} }
} }
@ -1105,7 +1109,7 @@ public class BoardDelegate extends DelegateBase
case CLIPBOARD: case CLIPBOARD:
NetLaunchInfo nli = new NetLaunchInfo( m_summary, m_gi, 1, NetLaunchInfo nli = new NetLaunchInfo( m_summary, m_gi, 1,
1 + m_nGuestDevs ); 1 + m_nGuestDevs );
if ( !m_relayConnected ) { if ( m_relayMissing ) {
nli.removeAddress( CommsConnType.COMMS_CONN_RELAY ); nli.removeAddress( CommsConnType.COMMS_CONN_RELAY );
} }
if ( InviteMeans.EMAIL == means ) { if ( InviteMeans.EMAIL == means ) {
@ -1516,7 +1520,7 @@ public class BoardDelegate extends DelegateBase
} }
} else if ( nMissing > 0 ) { } else if ( nMissing > 0 ) {
if ( m_summary.hasRematchInfo() ) { if ( m_summary.hasRematchInfo() ) {
tryRematchInvites(); tryRematchInvites( false );
} else { } else {
if ( !m_haveInvited ) { if ( !m_haveInvited ) {
m_haveInvited = true; m_haveInvited = true;
@ -1859,7 +1863,7 @@ public class BoardDelegate extends DelegateBase
m_nGuestDevs = nDevs; m_nGuestDevs = nDevs;
// If we might have put up an alert earlier, take it down // If we might have put up an alert earlier, take it down
dismissInviteAlert( nMissing, m_relayConnected ); dismissInviteAlert( nMissing, !m_relayMissing );
m_nMissing = nMissing; // will be 0 unless isServer is true m_nMissing = nMissing; // will be 0 unless isServer is true
@ -2018,7 +2022,7 @@ public class BoardDelegate extends DelegateBase
String langName = m_gi.langName(); String langName = m_gi.langName();
m_summary = DBUtils.getSummary( m_activity, m_gameLock ); m_summary = DBUtils.getSummary( m_activity, m_gameLock );
m_relayConnected = !m_summary.relayConnectPending(); m_relayMissing = m_summary.relayConnectPending();
setThis( this ); setThis( this );
@ -2180,10 +2184,10 @@ public class BoardDelegate extends DelegateBase
{ {
runOnUiThread( new Runnable() { runOnUiThread( new Runnable() {
public void run() { public void run() {
if ( !m_relayConnected && connected ) { if ( m_relayMissing && connected ) {
m_relayConnected = true; m_relayMissing = false;
} }
if ( 0 == nMissing || m_relayConnected ) { if ( 0 == nMissing || !m_relayMissing ) {
dismissDialog( DlgID.DLG_INVITE ); dismissDialog( DlgID.DLG_INVITE );
} }
} }
@ -2411,7 +2415,7 @@ public class BoardDelegate extends DelegateBase
private void tryInvites() private void tryInvites()
{ {
if ( 0 < m_nMissing && m_summary.hasRematchInfo() ) { if ( 0 < m_nMissing && m_summary.hasRematchInfo() ) {
tryRematchInvites(); tryRematchInvites( false );
} else if ( null != m_missingDevs ) { } else if ( null != m_missingDevs ) {
Assert.assertNotNull( m_missingMeans ); Assert.assertNotNull( m_missingMeans );
String gameName = GameUtils.getName( m_activity, m_rowid ); String gameName = GameUtils.getName( m_activity, m_rowid );
@ -2424,7 +2428,7 @@ public class BoardDelegate extends DelegateBase
int forceChannel = ii + m_nGuestDevs + 1; int forceChannel = ii + m_nGuestDevs + 1;
NetLaunchInfo nli = new NetLaunchInfo( m_summary, m_gi, NetLaunchInfo nli = new NetLaunchInfo( m_summary, m_gi,
nPlayers, forceChannel ); nPlayers, forceChannel );
if ( !m_relayConnected ) { if ( m_relayMissing ) {
nli.removeAddress( CommsConnType.COMMS_CONN_RELAY ); nli.removeAddress( CommsConnType.COMMS_CONN_RELAY );
} }
@ -2688,11 +2692,15 @@ public class BoardDelegate extends DelegateBase
} }
} }
private void tryRematchInvites() private void tryRematchInvites( boolean force )
{ {
if ( XWApp.REMATCH_SUPPORTED && !m_rematchInvitesSent ) { if ( XWApp.REMATCH_SUPPORTED ) {
m_rematchInvitesSent = true; if ( !force ) {
SentInvitesInfo info = DBUtils.getInvitesFor( m_activity, m_rowid );
force = 0 == info.getMinPlayerCount();
}
if ( force ) {
Assert.assertNotNull( m_summary ); Assert.assertNotNull( m_summary );
Assert.assertNotNull( m_gi ); Assert.assertNotNull( m_gi );
// only supports a single invite for now! // only supports a single invite for now!
@ -2717,6 +2725,9 @@ public class BoardDelegate extends DelegateBase
RelayService.inviteRemote( m_activity, 0, value, nli ); RelayService.inviteRemote( m_activity, 0, value, nli );
recordInviteSent( InviteMeans.RELAY, value ); recordInviteSent( InviteMeans.RELAY, value );
} }
showToast( R.string.rematch_sent_toast );
}
} }
} }