deleted. To do that: added interface to TransportProcs that a caller
can implement and to which it delegates the UI (error code reports).
BoardActivity implements that interface. To avoid a race condition
where the JNIThread would save the game after I'd deleted it I kill
the thread and wait for it to die before deleting the game and calling
finish().
from networked games since as currently implemented it can quickly get
them permanently out-of-sync (and cause the jni code to assert.) Need
to debug this....
Previously did so only when in background, but that leaves a problem:
if device A sends messages to B and B ACKs them so that they're
deleted but exits without saving (for any reason) the game is
permanently horked. It's safer to save immediately.
arrived in the background. When notification that game's over arrives,
add it to the flags, then on game open show the game over dialog (in
addition to raising chat activity and possibly showing recent move.)
dismissed so that they now all go through onCreateDialog() every time.
This allows to shrink or eliminate onPrepareDialog(). The hope is
that it will fix the occasional crash where restoreManagedDialogs
invokes onPrepareDialog() and some ivar I need isn't set because the
class was just reloaded.
GamesList implements that interface and invalidates the list item
corresponding so it'll get redrawn with updated info. Should allow to
replace m_invalPath but doesn't...
work of pinging relay on timer. That work, which can cause receiver
to exceed its timeout if there are e.g. problems resolving hostnames,
must be done in a thread and Receivers aren't supposed to have
threads. Seems to work as well as it did before and also fixes
force-restart bugs when the network is slow/unavailable.
history, and store it in the game record in the DB (new column). This
will allow to not drop chat messages that arrive in the background,
though that's not implemented yet.
workaround to fix a bug where the UI isn't updating often enough and
sometimes delete or other position-based long-tap menu actions on the
list act on the wrong game. This gives an order that won't change.
Revisit later if a more dynamic order is desired.
game they were passed to. This prevents duplicate messages from
generating notifications over and over -- and dupes are common when
messages stay on relay until the receiving game ACKs them.