Commit graph

5784 commits

Author SHA1 Message Date
Eric House
95ac66370c fix off-by-one preventing delayed messages from sending 2018-07-10 07:08:57 -07:00
Eric House
9c2a722cc5 change two method names 2018-07-10 07:07:30 -07:00
Eric House
8c14ccc0d2 add new dutil to store by ptr; use for smsproto msgID 2018-07-10 06:36:34 -07:00
Eric House
08c41ddd3e add debug preference controlling new smsproto format
Don't use the message-combining feature for sends unless this is
set. After a release the default value will switch to true.
2018-07-10 06:19:16 -07:00
Eric House
a9769efe1c implement load/store on android 2018-07-09 07:11:54 -07:00
Eric House
1941642607 add load and store to dutils, and implement with stubs 2018-07-06 06:56:54 -07:00
Eric House
3437ae2ebc use smsproto in Android 2018-07-06 06:48:56 -07:00
Eric House
ed90c9c16d implement util->dutil split for Android
So now all jni code uses a single dutil context, but also a single
mempool and jniutil instance instead of new instances of the latter two
per game and dict-iteration.
2018-07-05 08:32:19 -07:00
Eric House
9cdd5a7b72 share mpool and vtable in jni calls
A number of jni calls were "stateless", which meant they allocated their
own vtmgr and mpool instances each time invoked. Instead invoke them
with the global jni closure and add to it vtmgr (already has mpool) and
use these instead of allocating/freeing each time. To make sure no race
conditions are introduced (mpool, though debug-only, is probably not
thread-safe), guard these new uses with an in-use flag. If that fires
I'll need a mutex or something.
2018-06-27 21:17:44 -07:00
Eric House
39a5ce92ee refactor a bit (no behavior change) 2018-05-23 22:03:16 -07:00
Eric House
7fa0cb1b93 rewrite as Thread instead of AsyncTask
I want to be able to use it in contexts where AsyncTask doesn't make
sense, e.g. from timer in background.
2018-05-11 10:23:49 -07:00
Eric House
091299c030 upgrade AS and gradle and with luck travis will work 2018-05-06 14:33:10 -07:00
Eric House
32df1777d3 Merge branch 'android_branch' into android_translate 2018-05-03 06:46:44 -07:00
Eric House
82e6c5495b fix to delete dict even when loc is wrong
Somehow I got a wordlist into a location different from what was
recorded in the DB table and since the delete command matched on
location as well as name it was never deleted (which meant the checksum
was never updated and so upgrading never seemed to succeed.) Removing
the match on location fixed that problem, and since I don't see any harm
in cacheing only one version of a wordlist will simply leave it that
way.

Did a bunch of cleanup as well.
2018-05-01 07:22:59 -07:00
Eric House
a27e8c4c04 move static method into enum 2018-05-01 07:00:14 -07:00
Eric House
1e766ee52d show usage when no args provided 2018-04-29 20:12:22 -07:00
Eric House
681e2cd8a0 up version code and strings 2018-04-18 21:49:04 -07:00
Joan Montané
08e74b5dc7 Translated using Weblate (Catalan)
Currently translated at 93.3% (698 of 748 strings)
2018-04-07 09:34:52 +02: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
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
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
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
Markus Enzenberger
a24977dddc Translated using Weblate (German)
Currently translated at 86.2% (647 of 750 strings)
2018-02-28 19:13:52 +01: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
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
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
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
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