Andy2
92a726aff3
call removeDialog() when dismissing blocking dialogs. Fixes reporting
...
the same robot move every time.
2011-03-05 10:05:31 -08:00
Andy2
166bee6c82
always show game name (for now)
2011-03-04 21:33:26 -08:00
Andy2
b0b747f642
remove logging around GameLock
2011-03-04 18:53:47 -08:00
Andy2
997365bc20
new printStack() required for prev commit
2011-03-04 18:36:53 -08:00
Andy2
4cdafbd510
reduce the length of the sleep when waiting for lock; add code to
...
capture stack trace at lock time that'll be printed out along with the
current thread's trace when I can't get a lock in one second. I'll
comment that out shortly but want it for debugging -- though it's
untested: can't repro any failure to lock now.
2011-03-04 18:36:33 -08:00
Andy2
2b28a4d27c
unlock GameLock before launching BoardActivity -- to fix a deadlock.
...
Also do lock/unlock in onPause/onResume rather than onStart/Stop to
hold the lock for a shorter time.
2011-03-04 18:22:17 -08:00
Andy2
1b6d8ebed2
don't show game name if it's hidden in BoardActivity -- that is, use
...
the same preference to govern both. Still to do: need to inval all
game list items when that preference changes.
2011-03-04 07:40:56 -08:00
Andy2
2fdda2bae1
move game_name to its own row at top so it serves as title.
2011-03-04 07:39:54 -08:00
Andy2
754d7b06ef
add boolean 'wait' to getSummary() allowing it to return null if it
...
can't get a read lock. Fix GameListAdapter to handle that null.
2011-03-04 07:22:08 -08:00
Andy2
abdabd9c3c
don't pass timeout value to join() when stopping jni thread. If the
...
timeout fires there's nothing I can do anyway. So it it take as long
as required to exit run(), and if that's too long fix it.
2011-03-04 07:19:06 -08:00
Andy2
b085540ee3
make the jni thread a daemon per recommendation from google dev suppt.
2011-03-04 07:14:17 -08:00
Andy2
f21ddedc59
go back to singleTop for GamesList to see if it fixes the occasional
...
Activity duplication I'm seeing on-device.
2011-03-04 07:13:00 -08:00
Andy2
a5ba0ac5fe
remove pending messages after sending them.
2011-03-04 06:38:25 -08:00
Andy2
a1d1251c0e
remove logging
2011-03-04 05:46:20 -08:00
Andy2
6acf7fda68
fix crash: rather than pass chat message to jnithread that will be
...
null when the board activity has lost focus, save it to be sent once
the thread's been recreated.
2011-03-04 05:45:29 -08:00
Andy2
eb3b83ec48
fix rare crash by tracking whether showDialog has been called and
...
testing that before dismissing it.
2011-03-03 19:00:50 -08:00
Andy2
ecfe1d110e
Make getSummary able to fail since it can be called when somebody has
...
a write lock that will be held for a long time. One place it'll fail
is when game list item's been invalidated and wants to update. Deal
with null summary coming back there.
2011-03-03 06:52:20 -08:00
Andy2
c6fc912d89
reimplement GameLock without ReadWriteLock which isn't quite what I
...
wanted (which is more like a checkout mechanism). Lots of logging
remains to be removed.
2011-03-03 06:50:48 -08:00
Andy2
1ca8ce9192
make saveDict return false if aborts the download. (Not used yet.)
2011-03-03 05:38:45 -08:00
Andy2
ce61427bba
generate md5 sum file optionally. Later I'll want to download these
...
to check that the file arrived safely.
2011-03-02 19:00:25 -08:00
Andy2
0348867326
add printStack()
2011-03-02 18:59:35 -08:00
Andy2
a0bf3405b8
get rid of columns I don't plan to use yet -- can always add later.
2011-03-02 18:58:20 -08:00
Andy2
693310bdc7
don't call super() twice!!
2011-03-02 18:57:56 -08:00
Andy2
b32f65574d
now that game name's in the display, sort by that.
2011-03-02 07:10:43 -08:00
Andy2
9e56e4f40c
call dbchange listeners after deleting game. And with the dbchange
...
listeners working a lot of inval/onContentChanged stuff can be
removed.
2011-03-02 07:02:24 -08:00
Andy2
61a9f708a2
add game name to list item. I really want to swap the columns now but
...
can't make player name/score line up correctly on right.
2011-03-02 06:49:04 -08:00
Andy2
467e999509
set and clear dbchange listener in onCreate and onDestroy rather than
...
onStart and onPause so it'll get called when not in front too. Not
sure why this worked before the GameLock change....
2011-03-02 06:48:14 -08:00
Andy2
c144503630
move GameLock class from DBUtils to GameUtils
2011-03-01 21:59:15 -08:00
Andy2
ce6eca3fe5
add class that maintains read and write locks per-game record to
...
prevent writes to a game while it's open. Seems to work, but needs
more testing.
2011-03-01 21:44:59 -08:00
Andy2
4eb77809fb
remove redundant logging
2011-03-01 06:51:20 -08:00
Andy2
a344f26d1b
add static boolean that controls whether logging is on (for java).
...
Add an Application subclass that fetches the value from a preference,
a checkbox setting in advanced prefs, and modify the static when
that's changed at runtime.
2011-02-28 20:07:07 -08:00
Andy2
54ef8f73c9
get rid of some logging
2011-02-28 18:43:47 -08:00
Andy2
69638d8aa9
fix string so we get called on boot
2011-02-28 18:36:47 -08:00
Andy2
bfc82242d7
add new column to be used to track whether a game is in use -- not
...
used yet but anticipated and I'm added a lot this release anyway....
2011-02-28 06:45:52 -08:00
Andy2
20ad465b96
from GamesList.onNewIntent, launch the first changed game rather than
...
just invalidating all changed list items.
2011-02-28 06:37:29 -08:00
Andy2
ed8707fb4b
replace array[1] with HashSet to support more than one db change
...
listener (part 2)
2011-02-28 05:42:09 -08:00
Andy2
b57b6b1b31
replace array[1] with HashSet to support more than one db change listener
2011-02-28 05:41:02 -08:00
Andy2
c31e964ce4
remove class and interface no longer used
2011-02-27 22:45:51 -08:00
Andy2
fe9932b57d
remove hint menu. Add sync-with-server item to board and factor code
...
implementing same in GamesList up into DlgDelegate where it can be
called from both. Also, make syncing fire off the service just as the
timer does so that results generate Notifications. Makes it better
for testing if nothing else.
2011-02-27 22:43:09 -08:00
Andy2
d2e663fa99
remove logging
2011-02-27 22:40:26 -08:00
Eric House
4d5aad61b4
Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch
...
Conflicts:
xwords4/android/XWords4/src/org/eehouse/android/xw4/RelayService.java
2011-02-26 20:02:29 -08:00
Andy2
6df2abecb6
don't use special launchModes for GamesList *but* do invoke it from
...
DispatchNotify so that an existing instance will be reused rather than
a new on created on top of the stack.
2011-02-26 19:47:33 -08:00
Andy2
9cc7cd0dc8
add logging of activity lifecycle methods -- and override a couple just
...
to do the logging before calling super(). These should go once I've
got the lifecycle stuff working.
2011-02-26 19:46:29 -08:00
Andy2
ef074f2944
don't bother passing flags to DispatchNotify class.
2011-02-26 19:45:05 -08:00
Andy2
a0f5ef4e18
remove logging
2011-02-26 19:44:02 -08:00
Eric House
a68170de51
remove PendingIntent.FLAG_UPDATE_CURRENT; it's breaking things.
2011-02-26 12:10:24 -08:00
Andy2
5ba6579180
Add Discard button to dialog explaining that remote game's been
...
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().
2011-02-25 19:57:43 -08:00
Andy2
86274785dd
add newbie-info on turn-changed
2011-02-25 07:13:54 -08:00
Andy2
5e0f12e49d
add a confirmation dialog to "undo last", and remove it altogether
...
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....
2011-02-25 06:54:38 -08:00
Andy2
0be59d1ba7
add showConfirmThen (which XWListActivity already has)
2011-02-25 06:53:36 -08:00