generalized for multiple events and map them to multiple notification
callbacks), and use it from DictsActivity to redraw the list when the
SD card comes back online. While the default android behavior works
for the unmount case (relaunches DictsActivity which correctly draws
only those dicts still available) it needs this change to redraw after
the available set grows.
so: change loadMakeGame() to return gamePtr rather than take one in,
and to return 0 when any dict no available. Move dict-gone-missing
dialog into DlgDelegate. Remove DlgDelegate always adding onDismiss
listener that removes the dialog, and instead add one to the
dict-gone-missing dialog that, like the onClick handler, calls
finish() on the activity.
figure out how to get that so I ignore it and am killed then
relaunched if I have a dict file open on the SD. On relauch, don't
crash. Instead, check if any dicts used by the game is unreachable
and put up an alert with only one choice: Close game. Thought about
using the missing-dicts stuff from GamesList, but this is a special
case that should be seen only when user umounts while a BoardActivity
instance is frontmost.
arrays into the jni, pass the full file paths in in addition to the
byte arrays. This isn't possible with the built-in dicts, but does
work for the downloaded ones (which are usually larger). This checkin
does the mmap and uses memcmp to verify that the bytes are the same as
passed in. Next step is to not pass the bytes when the path will do
and to actually use the mmap'd ptr.
dialog is up. I'm making two fixes, either of which is enough: saving
the rowid across teardown of the activity; and changing the manifest
to not tear down the activity. The reason for the latter is that the
teardown is unnecessary and wasteful. The former's just safer coding.
allow any control over whether the initial state is expanded.)
Getting click to work is a bit of a hack, requiring a callback from
the adapter back to the activity, but it works well on emulator. Need
to test on device then try to shrink the ImageButton.
with calls using formatting -- for consistency and effeciency in the
case where logging is disabled. There should be no discernable
change, though if I got and percent-format specifiers wrong I'll get
runtime exceptions.
Bad. So test if we can post (if the handler's still available) and
drop the request, freeing the thread, if not. (Access to m_handler
should probably be synchronized now that it's getting cleared, but
that's another bug.)