Commit graph

5553 commits

Author SHA1 Message Date
Eric House
6cee0c5bca check that all params are serializable
DEBUG builds only.
2017-08-02 07:20:48 -07:00
Eric House
455b6e79f0 use TextUtils.equals in new equals() overrides 2017-08-02 07:09:38 -07:00
Eric House
4ec930d53c fix array out-of-bounds exception 2017-08-01 22:22:44 -07:00
Eric House
bb367acab3 don't pass unserializable in params[]
Was, in rarely seen case, passing an object that couldn't be
serialized. Instead pass a few of its constituents than can, and
reconstitute using them.
2017-08-01 22:21:47 -07:00
Eric House
62dd6c12f7 remove unnecessary parameter 2017-08-01 22:03:47 -07:00
Eric House
c927dbef54 fix equals() implementation 2017-08-01 21:37:02 -07:00
Eric House
9a394b2541 comment out code with RELAYINVITE_SUPPORTED
Relay-invite code may never be released, so wrap it in compile-time test
that'll get it stripped.
2017-08-01 07:33:37 -07:00
Eric House
101c2ff8f2 fix problems with params[] serialization
Was passing through DlgState params a number of classes that weren't
serializable or that didn't have equals() methods required for DEBUG
assertions to pass. Added versions of equals() that just call super in
non-DEBUG case since it's a lot of code and isn't required except for
testing. (Serialization of course is.)
2017-08-01 07:28:17 -07:00
Eric House
d55d9573e4 fix some bundling/serialization problems
Now that params[] are being bundled all objects passed that way must be
serializeable. And as long as I'm asserting bundle success using
equals() the objects being serialized must implement it.
2017-07-29 20:59:00 -07:00
Eric House
80cc12fc79 up version strings and change list for new release 2017-07-29 20:21:23 -07:00
Eric House
e2c46963d8 fix crash (by inspection) with complete parcel save
I wasn't saving/restoring params[] Object array with DlgState, and under
circumstances I can't reproduce that could cause a null object
dereference I was via the Play store. So added a test case that failed
for DlgState instances that have non-null params arrays, and fixed that.
2017-07-28 07:37:57 -07:00
Eric House
ca93f808f3 change invite alert track/dismiss logic
Attempt to fix invite alert sticking around after game connection
finishes, which resulted from the variable pointing to the alert having
been set to null. So stop setting it in onDismiss listener. I think
trying to track it via an iVar is a mistake, that dismiss by tag or
somesuch is the right way to go. But my dialog fragment code isn't up to
that yet.
2017-07-26 07:21:27 -07:00
Eric House
c6a72b63ee make relay invite record editable 2017-07-25 07:48:54 -07:00
Eric House
32c6a5e114 don't enable remove button when nothing's checked
Copy from SMS inviter code. Really should be moving that into the
superclass.
2017-07-23 17:50:47 -07:00
Eric House
a71d60db63 implement deletion; save with new serialization util
Add new Utils methods that turn Serializable objects into B64-encoded
Strings, and vice versa. Use in place of existing code, and use anew to
store the array of DeviceID records. Implement the "Delete checked" button.
2017-07-23 17:31:59 -07:00
Eric House
7eb9458a78 get invite-by-relayid working again
In Dbg version only (with enabling boolean moved to BuildConfig.)
Currently crashes when first used, and recipient can't always connect to
relay until app rebooted. And of course there are still open questions
like how to populate the list -- how user learns the deviceID of an
opponent.
2017-07-23 16:45:14 -07:00
Eric House
41529a584c add recent changes to changelog 2017-07-19 06:35:26 -07:00
Eric House
d057de0fd3 add comment reminder of proguard problem 2017-07-19 06:27:56 -07:00
Eric House
72c624b251 track resends for each comms type
Was previously a "global" so that a resend over SMS might delay a resend
for relay games. Since communication problems tend to be
comms-type-specific that's dumb.
2017-07-19 06:26:11 -07:00
Eric House
52a1ccd4dc tweak comments 2017-07-19 06:16:22 -07:00
Eric House
64014944f3 finish: using java's base64 en/decoder from java
Added a wrapper function since for compatibility with the jni's encoding
the flags matter and need to be the same everywhere. Or at least there
should be no chance of their getting changed.
2017-07-13 07:40:28 -07:00
Eric House
94dca807ef use a singlton rather than one Time per object
De-serializing a Time formatter wasn't going well post-proguard, but it
was a dumb way to do it anyway when only one object is needed.
2017-07-13 07:20:24 -07:00
Eric House
fb91ba8608 fix (by inspection) store-reported NPE 2017-07-12 08:14:42 -07:00
Eric House
4f989c7a3e start using built-in base64 stuff
As a first step, use mine and android's and assert results are the
same. Note using built-in Base64 class requires moving the min android
version from 7 to 8.
2017-07-12 08:02:52 -07:00
Eric House
589929b3b2 enable proguard for debug builds
Copy config file into the right place, turn it on for debug builds, and
fix compile-time complaints by adding -keep clauses. Resulting builds
seem to work (after a few minutes in emulator only) except that net
status icon taps crash at first (eventually recovering somehow) likely
because of problems with base64 en/decoding which goes through jni.
2017-07-12 07:16:57 -07:00
Eric House
75488aefc0 use same SMS resend backoff for debug as release 2017-07-10 06:51:45 -07:00
Eric House
c8beefaafe tweak network status icon
Get rid of black background of center icon, instead running the green or
red all the way to the middle. For better contrast make the green and
red darker and the non-active arrows white.
2017-07-10 06:49:02 -07:00
Eric House
924dc1b37f remove assert
Looks like my theory was right. Logging is more than enough.
2017-07-05 07:53:41 -07:00
Eric House
15f50dc82a fix game config for rotation and connvia changes
The debug-only settings for disabling individual conn types weren't
kept in sync with which types were enabled, and that set of types was
lost on rotation. Fixed (including keeping the disableds across rotations.)
2017-06-30 06:34:24 -07:00
Eric House
b9d6b05d87 tweak logging 2017-06-29 07:28:15 -07:00
Eric House
d6bbccb773 let caller deal with result of message resend
Use a new interface to let caller of resendAllIf() know how many
messages were resent. If none, a new timer might not be called for.
2017-06-28 08:24:33 -07:00
Eric House
33838e6a14 don't crash when crashlytics didn't get built in correctly 2017-06-27 07:34:04 -07:00
Eric House
d454ffb3e8 up changelog/strings for release 2017-06-22 07:12:51 -07:00
Eric House
4e101862a6 get rid of old standin for missing contact name
Since it's now possible to add a name for an SMS contact added manually,
don't assuming a missing name means it was added manually. Just leave
blank if not provided.
2017-06-21 07:59:22 -07:00
Eric House
e3e7add5a9 fix (I hope) script for harvesting jni sigs
I made these changes a while ago then stashed them. They worked when I
needed them then, and seem to work now, but I haven't verified now so
don't trust 'em too far. :-)
2017-06-20 22:05:39 -07:00
Eric House
a16cc8e648 replace Crittercism with Crashlytics, suckily
Crittercism is dropping free support of FOSS apps, so I'm dropping
it. Unfortunatly integration isn't as clean: so far at least I haven't
figured out how to make it possible for others to build the 'd' variant,
which includes Crashlytics, without their having a Fabric API key.
2017-06-20 21:48:40 -07:00
Eric House
6de5d307b3 add name field to manual sms contacts entry 2017-06-20 19:35:38 -07:00
Eric House
b33df6b222 reset SMSResend timer on new data only
Resetting it on every ACK etc meant it happened forever at the most
frequent interval, at least on devices that have both sides of a game,
which is my usual test setup.
2017-06-20 19:19:03 -07:00
Eric House
e6454070a6 remove an oft-firing assert
It's definitely happening, and disruptive though debug-only. So remove
to be tracked down eventually.
2017-06-20 19:17:23 -07:00
Eric House
e3a8bef3cb add new param
It's not the case that forcing send and showing UI go together.
2017-06-20 07:49:01 -07:00
Eric House
0b2920102b tweak chat layout; use better timestamp format 2017-06-20 07:47:32 -07:00
Eric House
3aefa3a566 don't make sound/notify on standalone game moves
I'm finding the robot move beeps annoying. If others aren't maybe a
preference would be better. We'll see.
2017-06-16 19:24:04 -07:00
Eric House
7f48267397 save non-destructive changes on "Play game" button
In game config, when the play game button's hit and the changes pending don't
"matter" (require reset), apply them. The motiviation is to allow
setting the "disableds" and immediately launching a game via the button,
but I think it's the right thing to do anyway. Needs testing.
2017-06-16 19:18:30 -07:00
Eric House
7bae112077 add timer to resend sms data messages
Deal with occasional droppage of SMS data messages by running a
timer (via AlarmManager) with backoff that resends any pending moves for
games connected via SMS. Successful receipt of SMS data resets the backoff.
2017-06-16 18:56:22 -07:00
Eric House
0b0a50bd5c add timestamp to chat messages, db and display
On send, add current seconds to message. Store and display in android
code. Display layout needs work.
2017-06-10 11:36:45 -07:00
Eric House
59285aa9f4 cleanup 2017-06-06 05:46:27 -07:00
Eric House
f85f7c41be add cmdline options to generate single-abi .so
Part of getting split builds going. I think.
2017-06-06 05:45:31 -07:00
Eric House
41683f95a7 improve activity lifecycle logging 2017-06-05 07:36:47 -07:00
Eric House
5c893127de remove constants from build.gradle
cleanup, iterating over built-in data rather than my hard-coded VARIANTS
and BUILDS arrays, which now go away. Renamed obj- and libs- directories
to better fit the variables the system provides.
2017-06-01 07:41:51 -07:00
Eric House
f49aac71cf get rid of <a> -- sucks in webview 2017-05-31 20:22:13 -07:00