Commit graph

8555 commits

Author SHA1 Message Date
Eric House
a34f4e4954 don't save unset channelSeed 2015-02-09 07:28:11 -08:00
Eric House
bdc298b222 remove logging 2015-02-09 07:27:18 -08:00
Eric House
9e403ac6b2 add assert around the new bit that's -- bitten -- me once already 2015-02-09 06:46:34 -08:00
Eric House
5a28f8dedf fix recent message header hack to not break addressing of messages 2015-02-08 18:42:38 -08:00
Eric House
534bb37224 only show every 5th toast 2015-02-08 18:36:55 -08:00
Eric House
aa77413116 remove logging 2015-02-08 18:35:34 -08:00
Eric House
88dd25fb21 fix channel comparison so messages actually get deleted after they're
ack'd.
2015-02-08 13:39:35 -08:00
Eric House
acf5a01374 Fix assertion failure: comms_msgProcessed() must be called whenever
comms_checkIncomingStream() is
2015-02-08 11:29:27 -08:00
Eric House
0620bc0443 remove extra carriage return 2015-02-08 11:03:55 -08:00
Eric House
9ab0113e85 tweak debug toast strings 2015-02-08 10:48:17 -08:00
Eric House
994bd4fc5c format status time to seconds rather than minutes 2015-02-08 10:48:05 -08:00
Eric House
fb011624bb add another assertion meant to find threading problems, and fix assert
firing because flag was set too late and sometimes bypassed.
2015-02-08 10:37:54 -08:00
Eric House
b7dfc169bf add commented-out mutex protecting comms. I don't think I need it, but
this makes it easier to put back if comms->processingMsg assertions
start failing.
2015-02-08 10:37:06 -08:00
Eric House
9a0da56158 fix NPE: onActivityResult gets called before onResume, so reload game
there instead.
2015-02-08 10:35:52 -08:00
Eric House
7e634ecc64 hijack a bit from channelNo to indicate whether message sender is
server or guest so that sender can tell when it receives a message
from itself (and reject it.) This fixes a lot of confusion in testing
where both participants in a networked game are on the same device,
but might also work around e.g. relay bugs.
2015-02-08 09:58:34 -08:00
Eric House
c6b42c539c add assert to ensure there are no thread issues: mutex may be required
if the assert winds up getting hit.
2015-02-08 07:51:08 -08:00
Eric House
01c4fa620e when nbs send is to my own phone number, just put the packet in the
incoming queue. T-mobile will deliver the message, but it's much
faster this way and while I'm still sending too many messages avoids
triggering the undismissable "this app is sending too many SMS
messages" Android warning alert.
2015-02-07 22:37:06 -08:00
Eric House
fa856e1db0 don't send sms messages in queue if sms support has been turned off 2015-02-07 13:37:14 -08:00
Eric House
17307f910b fix problem with misdelivered message forever locking out future
messages: when comms thinks a message is an init but server drops it,
give comms that info so it can remove it and give the next one a
chance.
2015-02-07 13:24:09 -08:00
Eric House
f039ee8338 reject message for client that arrives for server rather than asserting 2015-02-07 13:20:47 -08:00
Eric House
2202639606 feed messages by rowid, not gameID, in case a device has more than one
participant. This is toward fixing SMS same-device games (useful for
testing only, but VERY useful for that.)
2015-02-07 13:11:52 -08:00
Eric House
b12cf55a83 remove unused variable 2015-02-07 12:56:03 -08:00
Eric House
cf3c219b69 fix non-DEBUG compile 2015-02-07 12:54:46 -08:00
Eric House
e4b0cd89c2 In invite means choice dialog, OK button is enabled until a choice is
made. Required piping prepareDialog() into DlgDelegate.
2015-02-06 08:02:04 -08:00
Eric House
1b9341bef3 change ivar name -- no code change 2015-02-06 07:58:48 -08:00
Eric House
63ef10ebb1 remove or change logging 2015-02-06 06:11:04 -08:00
Eric House
1b8389c6b1 hide Reconnect button except on debug builds; it doesn't seem to be
doing anything, and I'm not sure how to communicate that it's
relay-only.
2015-02-06 06:10:12 -08:00
Eric House
4ddf11387f make send-nfc-to-self available through a debug-only preference rather
than only on DEBUG builds.
2015-02-05 06:56:04 -08:00
Eric House
c2a87c187d as a DEBUG-only feature, enable "send" of NFC to self to better
duplicate on a single device how real devices are meant to be
inviting.
2015-02-04 22:15:20 -08:00
Eric House
019d9987c7 fix bug where email didn't get launched when the only choice 2015-02-04 21:50:23 -08:00
Eric House
2c7469f228 emphasize button by centering it rather than making it green, since
color replacing a drawable looks like crap and the ways of doing it
right are too complicated and may not look good on all devices/OS
versions.
2015-02-04 07:21:17 -08:00
Eric House
cb40600293 cleanup -- no code changes 2015-02-04 07:07:23 -08:00
Eric House
11c8c01c7b remove dead code 2015-02-04 06:59:15 -08:00
Eric House
3b41752382 show no conn options as a localizable, non-empty string rather than
empty string
2015-02-03 22:23:11 -08:00
Eric House
e0a337ff4c deal with case where user removes existing game's ability to connect:
refuse to save until something's put back
2015-02-03 22:11:13 -08:00
Eric House
c55bba5aab for game config replace onKeyDown() with onBackPressed() since only
one key was handled.
2015-02-03 21:49:33 -08:00
Eric House
5e6bb507b7 shift responsibility for deleting new game when config activity is
cancelled from games list to config activity. Fixes race condition
that on emulator, and less often on device, left a game highlighted
after config was cancelled that should have been deleted.
2015-02-03 21:43:28 -08:00
Eric House
35525d62a4 give newgame alert an icon to remind folks what's up. 2015-02-03 19:16:37 -08:00
Eric House
46c361028e move config of ConnViaViewLayout to prepareDialog() so checkboxes get
reset each time, fixing problem of checks sticking across invocations.
2015-02-03 07:45:12 -08:00
Eric House
70545eb3f2 more fixing assuming a connection-means-less game is solo 2015-02-01 22:54:15 -08:00
Eric House
e383d9c7ad show the multi-game icon for multi-games even if they have no conn
options set.
2015-02-01 22:31:03 -08:00
Eric House
8abe7720c8 don't allow saving/playing a multi-divice game that doesn't have at
least one way of connecting. Instead, give a choice between discarding
it and editing, and if the latter choice it taken open the alert for
picking ways to connect. Requires a new version of showConfirmThen()
that lets the negative button be other than "Cancel".
2015-02-01 22:15:06 -08:00
Eric House
02da56ce9c add populate() that can be called to add defaults when new type is added 2015-02-01 19:55:06 -08:00
Eric House
4bd15c072b add isFinishing() to base class 2015-02-01 19:51:32 -08:00
Eric House
46c4cc0669 warn when user disables all communication options in prefs 2015-01-31 23:17:13 -08:00
Eric House
5d58c09120 remove must-invite alert when game connects 2015-01-28 06:17:27 -08:00
Eric House
0972e07b4e give download button a green background for greater visibility 2015-01-27 21:42:42 -08:00
Eric House
a4842bdaab just hide the "hide title" pref on devices where it's a no-op --
rather than explain to a user why his action is being ignored
2015-01-27 21:40:22 -08:00
Eric House
1b6f0de8e6 inset checkbox for better visibility 2015-01-27 08:24:06 -08:00
Eric House
fb13c949e8 re-enable ActionPairs stuff now that an additional button works/fits. 2015-01-27 08:14:06 -08:00