Oops. Debug build assertion showed I was leaving an infrequently used
field out of serialization, adn then required that that object be
Serializable and implement equals() to pass more tests.
Get rid of treating 0 as a legit date (1970 being illegit). Tweak
formatting. It's not perfect, but few people see it so we'll see how it
goes during development.
revert a bit, dropping use of git revision and repo to provide an
order. Instead use aapt (which is an ubuntu package now) to pull the
version code and appID from .apk files, order by versionCode, and
secondarily by file mod time.
Auto-update was based on my manually setting what the newest is. Better
to use the git revision stored in the .apk, or failing that (later) in
the file name, to determine "age". This is all based on forcing a linear
order on git commits, but at least at the granularity of releases that
should be ok.
Mistake was putting "download more languages" at the bottom of list of
wordlists in one language. Having separate strings is a bigger change,
and in context just "Download more" works in both cases. Change name of
string so translators will notice.
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.)
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.)