Commit graph

8577 commits

Author SHA1 Message Date
Eric House
1592ac3ede cleanup -- no meaningful code change 2015-02-17 19:49:32 -08:00
Eric House
db71c4e4e2 force resend_all() when opening game. This unsticks some new games
that for some reason connected to having several ways of sending some
of which aren't working wind up running a backoff timer by the time
they want to connect. This fixes the cases I'm seeing. I don't know if
it's at the price of generating too much traffic, but at least it's
limited to when the user actually opens the game.
2015-02-17 19:46:54 -08:00
Eric House
1a87812f2b don't check for updates on DEBUG builds as the server doesn't handle
that case (yet)
2015-02-17 06:59:40 -08:00
Eric House
749b9a5c19 changes in generated IDs: apparently different dev machines generate
different IDs, perhaps because they're running different SDK versions.
2015-02-17 06:52:36 -08:00
Eric House
d97dd6aff1 if fake-radio pref has changed to make something (SMS) unsupported,
try to recover from that (otherwise impossible) change in phone
capability by checking when fetching pref if it's all still possible.
2015-02-17 06:52:00 -08:00
Eric House
4d9465a3e2 fix crash on initial install, when pref won't be set yet 2015-02-17 06:49:34 -08:00
Eric House
eb1ad5cdc3 use fake radio preference in setting phone info, and rely on that for
isgsm test
2015-02-17 06:15:34 -08:00
Eric House
55714d81bf remove unused method 2015-02-14 22:42:26 -08:00
Eric House
385220cf92 add debug preference, unused so far, for faking the type of radio I
have. Goal's to debug non-GSM devices correctly hiding all references
to play-via-SMS.
2015-02-13 18:52:13 -08:00
Eric House
98fe7eb343 if BT's off, offer to turn it on programatically rather than telling
user to do it himself
2015-02-13 18:38:24 -08:00
Eric House
49024ae070 offer to turn SMS on when setting the global pref too 2015-02-13 18:16:30 -08:00
Eric House
9399ddd0ab add a bit of space to the custom view 2015-02-12 21:12:28 -08:00
Eric House
6cfedf7fb5 fix button being missing at the wrong time 2015-02-12 19:24:32 -08:00
Eric House
270f2922b1 include game name in invitation 2015-02-12 07:48:15 -08:00
Eric House
f4a691da6b add name, mostly as a way of passing it around in the java world since
the C version doesn't know about it.
2015-02-12 07:44:37 -08:00
Eric House
1a94bab9e8 add naming of game to game creation, including adding custom view to alert 2015-02-12 07:41:28 -08:00
Eric House
e5957866b4 cleanup by adding an import -- no code change 2015-02-12 07:38:17 -08:00
Eric House
2142c752bf factor confirm-unlimited-SMS stuff out into utility dialog so I can
turn on SMS from outside preferences -- which is a much better
experience than sending somebody into the prefs labyrinth
2015-02-11 07:51:19 -08:00
Eric House
615ec72ea7 fix channelNo equality test so it doesn't break relay games, which
connect a bit differently.
2015-02-10 07:26:23 -08:00
Eric House
72a1d8b7d4 clear any server bits that happen to have been set in older games. 2015-02-10 07:05:34 -08:00
Eric House
cf4431402b additional check for misdelivered messages that fixes
three-participant SMS games on a single device: if message arrived on
a different channel from what its header says it was meant for, drop
it.
2015-02-10 06:55:08 -08:00
Eric House
ad6be1bb7e add debug-only "tag" to open games so logging can more easily track
what's going on when multiple participants in a single game are on the
same device. But for a couple of strings passed into the jni the
changes are only in DEBUG code.
2015-02-09 19:15:43 -08:00
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