Commit graph

10536 commits

Author SHA1 Message Date
Eric House
89809e051d compile with latest gcc (untested on old) 2018-04-06 21:49:51 -07:00
Eric House
a221ae43f4 flip arrow when board flipped
Fixing https://sourceforge.net/p/xwords/bugs/8/, flip the arrow before
placing it on top of the tile just returned to the tray.
2018-03-22 07:20:17 -07:00
Eric House
8f86cf9a77 don't assert on debug builds either
I'm seeing several IllegalStateException crashes due to e.g. having an
alert posted when app's in the background. Need to fix them, but the
debug build crashing isn't helpful. Log.e() instead.
2018-03-22 06:55:49 -07:00
Eric House
ab0764fa5a hack around IllegalStateException with Wait alert
The pesky thing is back. When app's in the background with an
unconnected game open displaying the "resend/wait" alert and the game
connects get IllegalStateException because the fragment stack's being
modified after onSaveInstanceState() (or, because the dialog fragment,
saved as an instance variable in BoardDelegate, dates from an earlier
state. Anyway, catching and dropping the exception and elsewhere failing
silently to rebuild the alert seems to fix the problem, but the right
fix is likely different. I suspect hanging onto that iVar is wrong, and
that the dialog should go away when onStop() is called and then be
rebuilt later from saved state. But for now, not crashing is good.
2018-03-21 08:11:07 -07:00
Eric House
fef4db0ee4 make easier to comment out 2018-03-21 07:28:49 -07:00
Eric House
a8db820b68 change strings for new release 2018-03-14 20:07:05 -07:00
Eric House
36c9e8c93b Merge branch 'android_branch' into android_translate 2018-03-14 19:32:25 -07:00
Eric House
77e40619ce Merge branch 'android_translate' of git://git.weblate.org/xwords into android_translate 2018-03-14 19:29:13 -07:00
Markus Enzenberger
dc0436e80d Translated using Weblate (German)
Currently translated at 99.0% (743 of 750 strings)
2018-03-11 09:37:11 +01:00
Eric House
74406c9bba on failure, don't log what looks like success 2018-03-09 06:45:21 -08:00
Eric House
e207b1e9fa log intent contents
trying to track down why/when they wind up empty
2018-03-08 08:30:01 -08:00
Eric House
2a2558a011 add/fix utility for printing Intent contents 2018-03-08 08:17:56 -08:00
Markus Enzenberger
a47381ed53 Translated using Weblate (German)
Currently translated at 98.4% (738 of 750 strings)
2018-03-04 08:39:34 +01:00
Eric House
de01c1aadb cleanup/modernize (should be no behavior change) 2018-03-01 08:13:38 -08:00
Eric House
2c153d1b9e log pending score drawing
I'll occasionally see the pending score in tray drawn dim after hint
fails to find a move, but can't reproduce. So add logging.
2018-03-01 06:58:37 -08:00
Eric House
c7bcccf979 cleanup. Should be no behavior change. 2018-02-28 19:23:36 -08:00
Markus Enzenberger
a24977dddc Translated using Weblate (German)
Currently translated at 86.2% (647 of 750 strings)
2018-02-28 19:13:52 +01:00
Eric House
75c48ddcc5 remove excessive comments 2018-02-28 06:49:35 -08:00
Eric House
760aa3d304 juggle tiles in generated moves (debug only)
Got a report of crashes due to corrupt move records. Given I rarely see
them I wondered if it's because the hint- and robot-generated moves I
work with have tiles in order. So now on debug builds tiles in moves
from those sources are randomly rearranged (as if the user had formed
the word in random order.) The bug isn't showing up, but I figure the
test's worth keeping.
2018-02-28 06:44:44 -08:00
Joan Montané
98dd664a35 Translated using Weblate (Catalan)
Currently translated at 93.0% (698 of 750 strings)
2018-02-28 11:35:02 +01:00
Eric House
b3559915e9 replace AsyncTask with Thread
It didn't even use the runOnUiThread feature!
2018-02-26 07:57:28 -08:00
Eric House
61993fc079 add tests to the rest of the forever loops 2018-02-26 07:03:47 -08:00
Eric House
aaafe1af00 assert we aren't looping infinitely
Stuff I'm doing with invitation resends is making the relay loop
inifintely. Let's assert a small loop count instead: better to crash and
restart than loop forever unable to process requests.
2018-02-25 20:44:06 -08:00
Eric House
73c7494e30 move invitation handling into superclass
Remove a bunch of duplicated code, replacing with implementation in
XWService. Fixes duplicate invitation and game opening policies being
slightly different.
2018-02-24 07:56:57 -08:00
Eric House
aacb0486f5 fix release-only bug showing duplicate moves
The fix I made earlier for this relied on a callback that was skipped in
release builds. Now always take the path that involves making the
callback when one is provided. Also remove an optimization that was
trying to eliminate possible moves based on scores prior to doing the
more expensive full check. In 2018 I prefer simplicity, and can make the
remaining code faster if that's required.
2018-02-18 12:29:30 -08:00
Eric House
4504302b3b make "release" builds compile again
Release isn't really a thing on linux, but I'm fixing something that
only reproduces when DEBUG is undefined.
2018-02-18 11:30:54 -08:00
Eric House
0bccf565c6 cleanup: ivar becomes local variable 2018-02-07 07:35:25 -08:00
Eric House
c762b43047 up version strings and changelog 2018-02-06 07:25:07 -08:00
Eric House
5babc91b5b Merge branch 'android_translate' into android_branch 2018-02-06 07:10:59 -08:00
Eric House
102671398b truncate player name, not score
Try some funky layout shite to get, within a horizontal linear layout,
the first text field trucated if necessary so that the second (holding
the score) can be fully displayed. Tested on exactly one emulator so
far.
2018-02-03 20:11:03 -08:00
Eric House
9c9a19d445 truncate player name, not score
Try some funky layout shite to get, within a horizontal linear layout,
the first text field trucated if necessary so that the second (holding
the score) can be fully displayed. Tested on exactly one emulator so
far.
2018-02-03 20:08:55 -08:00
Joan Montané
a152b169e8 Translated using Weblate (Catalan)
Currently translated at 75.4% (566 of 750 strings)
2018-02-03 10:34:50 +01:00
Eric House
cf1f4a9114 replace one with other in Catalan <plurals> elem
I think there's a bug in Weblate because I've seen this before: where
the English provides only an <other> the translation comes back with
only a <one>. That's wrong. Try adding a <one> in the English case to
see if that makes a difference.
2018-02-02 21:32:30 -08:00
Eric House
9855ef55ae replace one with other in Catalan <plurals> elem
I think there's a bug in Weblate because I've seen this before: where
the English provides only an <other> the translation comes back with
only a <one>. That's wrong. Try adding a <one> in the English case to
see if that makes a difference.
2018-02-02 21:30:15 -08:00
Eric House
1b36e734a4 Merge branch 'android_branch' into android_translate 2018-02-02 21:20:43 -08:00
Eric House
59b82d242c return from only one place. 2018-02-02 21:17:23 -08:00
Joan Montané
71b959aef3 Translated using Weblate (Catalan)
Currently translated at 75.4% (566 of 750 strings)
2018-02-01 09:34:48 +01:00
Eric House
757c5b4ece cleanup: move db access into doInBackground() 2018-01-29 19:29:18 -08:00
Eric House
5326d42438 enable smart scrolling
Otherwise it takes too long to scroll if you have hundreds of
games. To make this work had to move scroller to left side of games
list display as otherwise the scroller steals events from the expander
thingies.
2018-01-29 05:33:48 -08:00
Eric House
875d956836 don't need the local threadinfo at all
I think the crash was just due to removing env from the global state
rather than just leaving it be.
2018-01-23 21:26:11 -08:00
Eric House
ffaa232dba fix dictname being an empty string early on
Likely because of something in the jni world unset per-player dict name
is empty string rather than null, so test for that too. Fixes dicts
popup in newly-created game have an empty first line " (in use)".
2018-01-23 21:14:27 -08:00
Eric House
fd0c5767e6 toast status for resend should include the "re" 2018-01-23 06:56:18 -08:00
Eric House
d809ff4f7c give dict iter its own threadmap
I like this better than the previous fix: rather than share a
thread->env map with the game world allocate a new one for each
iterator. This could cause problem if the iterator is used on threads
that don't currently call map_thread(), or if there are callbacks that
need to look up the env that I'm not aware of. Needs testing...
2018-01-22 22:02:57 -08:00
Eric House
7242a709cb fix crash (race condition?) downloading dict info
Stumbled on a NPE opening up the wordlist browser configuring the first
game on a new install. So now test for null there and init early if
necessary. Seems to work, and won't do anything in places were not
needed.
2018-01-22 21:46:04 -08:00
Eric House
ff92c4a627 update changelog 2018-01-22 21:37:43 -08:00
Eric House
9654241fcf remove ability to set a min > max or max < min
Remake the min and max spinners every time either value changes so they
can't be used to set nonsensical values. (Which leads to immediate
crashes.) I'm sure this wasn't always a problem, but...
2018-01-22 21:31:41 -08:00
Eric House
efad90dd64 update strings for new release 2018-01-22 08:31:17 -08:00
Eric House
cbb683fc74 fix env-mapping crash in jni due to race condition
As reported to google, dict iterator destruction was crashing due to a
race condition if it happened after a game using the same dict had been
closed since it needed a mapped env that the game closure would
remove. Fixed in two ways, one by adding the mapping prior to the code
that uses it (a common pattern: add happens many times, whenver it might
be needed, but remove only once), and second by passing env into the
code that was crashing.

The mapping stuff remains inherently racy and I'm not sure now how to
fix that. It depends on there being a place to unmap after which it's
guaranteed the mapped value won't be needed again. When two
objects (game and dict_iter in this case) map the same env/thread combo
there's a race.
2018-01-22 07:45:43 -08:00
Eric House
134bcbdfa4 cleanup
Add new method with default values, etc: no change in behavior
2018-01-21 21:53:04 -08:00
Eric House
5f0c3bf4bd fix DEBUG assertion: unexpected Actions are expected
Looks like the assertion was left in when adding support for dual-pane
mode, as all other onPosButton() implementations called super rather
than assert. Which this one does now too.
2018-01-21 21:39:14 -08:00