Commit graph

10862 commits

Author SHA1 Message Date
Eric House
4ce20a49a6 cleanup via new macro 2019-06-23 10:10:49 -07:00
Eric House
1e6fdd1f70 remove logging 2019-06-23 10:10:49 -07:00
Eric House
0a50a721dd fix malformed xml string
Weblate bug?
2019-06-23 10:10:49 -07:00
Eric House
aab36efdac fix problems with RelayService
Darned thing was dropping packets, failing to connect games built in
response to invitations, and otherwise misbehaving. First was due to not
resheduling when exited with outbound packets in queue; second to not
overriding relayNoConnProc() (due to signature change.) Though it still
happens occasionally.... Also added timestamps to track how long it
takes a packet to be sent and ACK'd.
2019-06-23 10:10:00 -07:00
Eric House
0ad21783b8 add rowid to NoSuchGameException 2019-06-23 10:10:00 -07:00
Eric House
8ff23294e6 fix NPE (and tweak logging) 2019-06-23 10:10:00 -07:00
Eric House
fd122148b8 add flavor to toasted got-fcm message
So I can tell the apps apart
2019-06-23 10:10:00 -07:00
Eric House
d067b867a2 stop storing fcm keys and similar data in postgres arrays
Not sure why I was doing this, but it's not worth the
trouble (e.g. stopping updates of other data to fix an android bug
sending too many reregistration messages.) So now just use the first
element of arrays, replacing what's there instead of prepending. Ideally
those columns would not be arrays, but that's a harder change.
2019-06-23 10:10:00 -07:00
Eric House
b198091490 make script executable 2019-06-23 10:10:00 -07:00
Eric House
ac5cbea83f display latest FCM receipt as part of netstats for relay 2019-06-23 10:10:00 -07:00
Eric House
c67bda8683 use a constant jobID for enqueueWork()
That each VM instance had a different id might be why I was
crashing. We'll see.
2019-06-23 10:10:00 -07:00
Eric House
41bcaa69cb fix so success detected from new API 2019-06-23 10:10:00 -07:00
Eric House
b5ab8803c4 remove debug-only assert I'm seeing
Good to know it's happening; now don't crash!
2019-06-23 10:10:00 -07:00
Eric House
40eab8690b put back pref controlling whether FCM receives are Toasted 2019-06-23 10:10:00 -07:00
Eric House
272204223e make md5sum calculation available everywhere
I want to log sums to see when they arrive on relay. And also add some
missing @Overrides I noticed.
2019-06-23 10:10:00 -07:00
Eric House
f28c21206c put up toast when FCM message received
It's too useful to live without. So: tap into the static list of live
Delegates, and if any of them has an Activity available use it to run
Toast on UI thread. Otherwise there will be no display.
2019-06-23 10:10:00 -07:00
Your Name
fc0480376b pull and display new field 2019-06-23 10:10:00 -07:00
Eric House
940977718e don't save duplicate devIDs
There's likely a bug in Android now where I'm registering over and
over though the fcm id hasn't been changed. That's wrong, but it's
also wrong (and filling up the db) to register a duplicate as if it
were new. So stop that.
2019-06-23 10:10:00 -07:00
Eric House
6853b203a1 make https the default for prefs-alterable strings
And change the keys so all local changes get reset
2019-06-23 10:10:00 -07:00
Eric House
2c4ce83a5b use https everywhere. And rewrite URLs if necessary. 2019-06-23 10:10:00 -07:00
Eric House
5d36470e50 add some logging around RelayService lifecycle 2019-06-23 10:10:00 -07:00
Eric House
7fba555d33 fix just the warnings; VSIZE is safe 2019-06-23 10:10:00 -07:00
Eric House
bbe69f6398 Revert "toward compiling with gcc8"
This reverts commit d293517e7c.
2019-06-23 10:10:00 -07:00
Eric House
e8ab9e0b8b toward compiling with gcc8
My VSIZE is no longer legal, and apparently there's no workaround (no
way to safely figure the length of an array whose size is known at
compile time.) To avoid the risk of duplicating little constants, added
macros that define length in a way a new VSIZE can pick it up. Couldn't
make that work for struct field arrays, however, so there I'm using
constants.
2019-06-23 10:10:00 -07:00
Eric House
36b21aa7ed remove the last critical error 2019-06-23 10:10:00 -07:00
Eric House
a2aafc8b93 fix another critical warning 2019-06-23 10:10:00 -07:00
Eric House
71fb14bce1 fix gtk critical errors 2019-06-23 10:10:00 -07:00
Eric House
5f9d39ef8d communicate variant to relay, and store in new column 2019-06-23 10:10:00 -07:00
Eric House
a49c8c89ba fcm config file for xw4 variant 2019-06-23 10:09:59 -07:00
Eric House
d950ad695c remove debug toast that can't work from that class 2019-06-23 10:09:59 -07:00
Eric House
4bac49b76a rewrite of gcm_loop.py to use FCM
Works on my test VM. Untested on production.
2019-06-23 10:09:59 -07:00
Eric House
0c52d4e550 remove sms permissions from play store variant
and from a new debug variant so that can be tested. Add explanation to
be shown users who try to use the now-unavailable features.
2019-06-23 10:09:59 -07:00
Eric House
6ecfd2f20b add app-side support for firebase messaging
Works for xw4d variant only so far -- xw4 builds are broken!!!
2019-06-23 10:09:00 -07:00
Eric House
305f45dfc0 add variant option to build scripts
xw4 won't build for a while...
2019-06-23 10:09:00 -07:00
WaldiS
6aad6d259b
Translated using Weblate (Polish)
Currently translated at 89.4% (683 of 764 strings)
2019-06-20 21:00:29 +02:00
WaldiS
c612570c12
Translated using Weblate (Polish)
Currently translated at 89.1% (681 of 764 strings)
2019-06-18 21:02:46 +02:00
Julio Yagami
6bf8fcef17
Translated using Weblate (Portuguese)
Currently translated at 51.6% (394 of 764 strings)
2019-06-18 21:01:45 +02:00
AB
36927380e2
Translated using Weblate (Ukrainian)
Currently translated at 0.5% (4 of 764 strings)
2019-06-18 21:01:44 +02:00
THANOS SIOURDAKIS
800292dfee
Translated using Weblate (Greek)
Currently translated at 0.9% (7 of 764 strings)
2019-06-18 21:01:43 +02:00
WaldiS
981baed19d
Translated using Weblate (Polish)
Currently translated at 26.8% (205 of 764 strings)
2019-06-09 12:01:14 +02:00
THANOS SIOURDAKIS
d610102f26
Added translation using Weblate (Greek) 2019-06-07 19:35:25 +02:00
AB
6688ef08f7
Added translation using Weblate (Ukrainian) 2019-06-02 09:24:42 +02:00
WaldiS
0157cef8d5
Translated using Weblate (Polish)
Currently translated at 6.5% (50 of 764 strings)
2019-05-02 23:48:02 +02:00
WaldiS
e9a68ba7f3
Translated using Weblate (Polish)
Currently translated at 6.4% (49 of 764 strings)
2019-05-01 22:47:51 +02:00
WaldiS
d13d8e79cb
Translated using Weblate (Polish)
Currently translated at 2.7% (21 of 764 strings)
2019-04-12 20:03:57 +02:00
WaldiS
5e3bedc3eb
Translated using Weblate (Polish)
Currently translated at 1.8% (14 of 764 strings)
2019-03-10 18:03:01 +01:00
naofum
09affc451d
Translated using Weblate (Japanese)
Currently translated at 75.9% (580 of 764 strings)
2019-03-03 11:17:45 +01:00
Peeter Angelo
54c0443856
Translated using Weblate (Czech)
Currently translated at 14.5% (111 of 764 strings)
2019-02-19 10:10:21 +01:00
naofum
67cc88ea4e
Translated using Weblate (Japanese)
Currently translated at 74.3% (568 of 764 strings)
2019-02-11 12:09:26 +01:00
João Vitor Ferreira Cavalcante
cfc9466efd
Translated using Weblate (Portuguese)
Currently translated at 51.6% (394 of 764 strings)
2019-02-09 02:09:26 +01:00
Markus Enzenberger
7d8c013492
Translated using Weblate (German)
Currently translated at 100.0% (764 of 764 strings)
2019-02-05 10:09:17 +01:00
Mesut Akcan
8cd31b1250
Translated using Weblate (Turkish)
Currently translated at 0.8% (6 of 764 strings)
2019-01-31 14:09:09 +01:00
Mesut Akcan
c6ac53cb3f
Added translation using Weblate (Turkish) 2019-01-29 22:44:02 +01:00
ssantos
8716832999
Translated using Weblate (Portuguese)
Currently translated at 51.6% (394 of 764 strings)
2019-01-27 10:04:36 +01:00
Hosted Weblate
e20be83a58
Merge branch 'origin/android_translate' into Weblate. 2019-01-22 09:21:13 +01:00
Allan Nordhøy
fc9d1d2346
Translated using Weblate (Norwegian Bokmål)
Currently translated at 85.7% (655 of 764 strings)
2019-01-22 09:21:12 +01:00
Allan Nordhøy
4b8f39552f
Translated using Weblate (English)
Currently translated at 100.0% (764 of 764 strings)
2019-01-22 09:21:09 +01:00
Eric House
fb5fee3483 tweak string 2019-01-21 21:48:58 -08:00
Bernard Massot
6af47f9bc2 Translated using Weblate (French)
Currently translated at 97.6% (746 of 764 strings)
2019-01-21 21:48:58 -08:00
Louies
f45e001e7a Added translation using Weblate (Chinese (Traditional)) 2019-01-21 21:48:57 -08:00
Eric House
506ddc8f7a fix logic error in permissions callback
Somehow I forgot what params were and decided that array's length needed
to match another's.
2019-01-21 20:44:16 -08:00
Eric House
06fe5894b9 fix invitations creating a second activity stack
Looks like certain launches that went through DispatchNotify could
create a second "instance" of the app. Giving that Activity a launchMode
of singleTask fixes this (singleTop does not.)
2019-01-21 18:57:38 -08:00
Eric House
51c7752830 use same launch flags for all self-launches
Launching a game in response to a wordlist it needing being downloaded
went through a different Intent-creation path from the rest, and
resulted in a second instance of the app showing in the launcher. This
shoudl fix that. I don't *think* it's the only way I'm getting second
instances or stacked GamesLists, but it should get fixed.
2019-01-21 18:57:38 -08:00
Eric House
52d983e0d8 assert (on DEBUG builds) that MainActivity is never sublaunched
I think this might help catch the instance duplication I'm seeing very
rarely.
2019-01-21 18:57:38 -08:00
Bernard Massot
41f5c6afa2
Translated using Weblate (French)
Currently translated at 97.6% (746 of 764 strings)
2019-01-20 16:19:53 +01:00
Eric House
0754e0db8e remove hard-coded assumption about apk name
So can use the thing to sign-and-install local fdroid builds
2019-01-18 17:46:02 -08:00
Eric House
837ff1f8fc Give each variant a name, and include in About alert.
I modified existing translated strings, adding the new clause. Not doing
that would cause the existing strings to be stripped because they'd no
longer have the matching set of format specifiers.
2019-01-18 16:45:27 -08:00
Eric House
f072736bb8 need to call doResume() twice
Calling it only once on acquiring lock where before it'd been called
twice meant ConnStatusHandler never got initialized. Bad.
2019-01-18 07:32:58 -08:00
Eric House
4878afb185 remove misplaced assert 2019-01-18 06:51:23 -08:00
Hosted Weblate
03b9b3e499
Merge branch 'origin/android_translate' into Weblate. 2019-01-18 13:59:52 +01:00
Eric House
ae56f23f66 remove misguided Assert that's firing 2019-01-17 15:16:54 -08:00
Eric House
026d6d5c5e Change GameLock API (should be no behavior change) 2019-01-17 12:46:51 -08:00
Eric House
f436090c6f install listeners immediately after setting them
Fix a race condition introduced by making initing jnithread be
asynchronous: all the layout that was supposed to happen after listeners
were added instead happened before, so that they weren't there to be
installed as part of layout. So now, after adding them, get them hooked
up to the UI. (The complexity of this is all historical: at some point
the listeners were getting added BEFORE there were views to attach them
to, so they were cached and added later. Probably now they could simply
be installed as part of adding them. But I'm not doing that now.)
2019-01-17 12:28:01 -08:00
Eric House
95df560a40 update changes: sms will be ripped out alas. 2019-01-17 08:51:13 -08:00
Eric House
385f98f038 check for null 2019-01-16 22:17:54 -08:00
Eric House
d94217cc06 Make Board wait a bit for lock on opening
Was seeing frequent failure to open games as JNIThread.getRetained() was
unable to get a lock without waiting. Which it can't do on UI thread. So
added a method to GameLock that takes a callback to be called when the
lock's obtained, with the actual waiting done on a local thread. Then
fixed BoardDelegate a bit to not crash while waiting for the callback.
2019-01-16 21:45:39 -08:00
Eric House
a8872df5ed cleanup: I like the call-chain style better these days 2019-01-16 20:32:44 -08:00
Eric House
20359e50da log GameLock failure only when it's a result 2019-01-16 13:24:46 -08:00
Eric House
4c9ded77bf assertion says had race condition; fix it
Use a set instead of a singleton so a late clear doesn't overwrite an
early set.
2019-01-16 11:31:54 -08:00
Eric House
a93b1da6fa up client version
Will allow to distinguish on relay what clients can receive GCM.
2019-01-16 11:14:35 -08:00
Eric House
ddf12b6523 resend all when come to foreground 2019-01-15 22:13:46 -08:00
Eric House
c611919876 check for moves when come to foreground 2019-01-15 14:34:50 -08:00
Eric House
e61d7a5629 remove GCM -- crashes when invoked from server!
Once built for SDK 26 the old GCM support code crashes as it's calling
startService() from background. Duh! Will have to bring in Firebase's
replacement at some point. For now if I'm to release it has to be
without GCM.
2019-01-15 14:18:20 -08:00
Eric House
43b979ff46 cleanup: logging and method rename 2019-01-15 12:29:45 -08:00
Eric House
cf3d3bc156 cleanup from review of diffs (nothing significant) 2019-01-15 07:44:38 -08:00
Eric House
73a469a428 make logging respect force-on preference 2019-01-14 16:58:00 -08:00
Eric House
788113ee28 up versions strings for new release 2019-01-14 13:12:39 -08:00
Eric House
c976b3f595 show BT-troubleshooting hint when scan finds no devices 2019-01-14 12:20:27 -08:00
Eric House
23e58524a1 in invite dialog, confirm before deleting BT devices 2019-01-14 12:08:07 -08:00
Eric House
0da5d9dd28 improve gcm-debug toast message 2019-01-13 21:56:59 -08:00
Louies
1328f1a9a4
Added translation using Weblate (Chinese (Traditional)) 2019-01-13 14:15:27 +01:00
Eric House
e378647e36 put back explanatory progress text 2019-01-12 09:04:40 -08:00
Eric House
bfbf17252e use ProgressBar instead of Dialog for BT invite scans
I wanted to show progress, and it was just as easy to replace the
deprecated ProgressDialog as to add a timer to the thing.
2019-01-11 21:06:15 -08:00
Eric House
bdbd5bc1ee disable logging for tagged release builds 2019-01-09 20:00:20 -08:00
Eric House
1625ec9062 Merge branch 'android_branch' into android_translate 2019-01-09 19:03:21 -08:00
Eric House
48a9e830b8 remove empty string -- not legal 2019-01-09 19:02:29 -08:00
Eric House
d2cbcf1e71 tweak BT background notification icon and expl. text
The BT icon part was too thick. And the explanation was TMI.
2019-01-09 18:57:50 -08:00
Eric House
d257369639 use same invite prefix for all variants
I want to be able to invite one app to the other's games to better test
relay. Since I'm the only one using the Dbg variant should be no impact.
2019-01-09 18:25:52 -08:00
Eric House
011825e4a9 cleanup 2019-01-09 18:18:27 -08:00
Eric House
302a3a5025 accept invite even if same-gameID game open
more dev-only code, likely: if the game that's sending the invitation is
open when the invitation arrives, should still check if it's a dupe or
should be accepted.
2019-01-09 09:51:15 -08:00
Eric House
250583caea log when invite response comes back 2019-01-08 20:34:22 -08:00
Eric House
a665df7840 cleanup: test's done already 2019-01-08 20:31:27 -08:00
Eric House
f18a957ed5 kill progress when owner view goes away
BT Invite progress was sticking around when Board left because it wasn't
foreground.
2019-01-08 20:31:27 -08:00
Eric House
2c73f4ca77 don't handle duplicate invitations in DEBUG case
Was creating a second game in some cases in response to duplicated
invitations. Add a test for forceChannel: if there's already a game with
the same gameID *and* forceChannel assume the invitation is a dupe and
drop it.
2019-01-08 20:02:01 -08:00
Eric House
e0f4a028d1 remove a bunch of unused methods 2019-01-08 19:42:44 -08:00
Eric House
24fad52cd8 use second resolution in bt device display
Useful to see that a scan really did just happen
2019-01-08 11:52:31 -08:00
Eric House
7c7b80deae add net-stats dialog to log-tap games menu
So I don't have to open a game to see e.g. how it's connecting, refactor
the network status stuff so it can be called from both board and
gameslist views. Then add new context menuitem that calls it.
2019-01-08 11:37:57 -08:00
Eric House
e9e03a06a3 show toast when GameLock fails to lock (some cases) 2019-01-08 10:09:43 -08:00
Eric House
4fcc5fd99b turn off faker device (but make easy to enable) 2019-01-08 09:49:10 -08:00
Eric House
c87161307c When rematching an Archived game save in default new-game group 2019-01-08 09:41:23 -08:00
Eric House
db641c4664 log gameSeed; generate on linux too
I'm seeing a rare case where a game connectes to relay specifying a room
and somehow gets both slots, having provided different gameSeeds the two
times. This means an opponent won't connect, the room being full in that
game. I can't reproduce, so am logging seed changes better and switching
linux client to leave seed generation to comms as Android does.
2019-01-08 08:16:50 -08:00
Eric House
454e3da578 fix to compile when #define not defined 2019-01-08 07:41:22 -08:00
Eric House
7cccd1a1e6 make the fake result random 2019-01-06 17:12:11 -08:00
Eric House
59f1e1696e remove unused constant (enum) 2019-01-06 17:04:36 -08:00
Eric House
0953772673 cleanup: don't need wrapper around a List<> 2019-01-06 16:58:30 -08:00
Eric House
2a845da9b6 use List instead of array 2019-01-06 16:29:52 -08:00
Eric House
83340567b2 add and implement remove button for btinvite dialog 2019-01-06 15:20:36 -08:00
Eric House
853578eb7d don't drop known BT devices on every scan
Instead, keep them forever (for now), sorted by how long since they were
last seen. A Delete button's probably needed to prevent ex-partners from
sticking around too long. :-)
2019-01-06 14:34:43 -08:00
Eric House
c7f9fc465f persist and display most recent scan time 2019-01-06 13:40:49 -08:00
Eric House
2f508c0b5c persist BT invitee dev scan results
Only launch the scan automatically when the persisted list is empty.
2019-01-06 12:30:31 -08:00
Eric House
3a0e67c7b3 remove unreachable code 2019-01-06 12:05:30 -08:00
Eric House
d868fef0d2 revert space-only change 2019-01-06 12:04:51 -08:00
Eric House
aecce2826e revert change making userError() take an enum
The set's open-ended on the C side, meaning that an int can't be
converted to an enum reliably. Yay for asserts that caught this.
2019-01-06 11:12:59 -08:00
Eric House
5da32d93f7 fix double-launch of SMSInvite activity
Adding a second permission a while back resulted in two Actions being
received and acted on. Needed instead to group the two and receive a
single Action IFF both were granted.
2019-01-06 10:58:12 -08:00
Eric House
5a64b3b92f Fix problems inviting SMS on emulator
Likely no-ops on real devices
2019-01-06 08:59:38 -08:00
Eric House
105e8e2623 add logging
Keep some stuff added to debug problem with dict checksums on server.
2019-01-05 18:54:48 -08:00
Eric House
cace99818d remove dead code 2019-01-05 18:48:26 -08:00
Eric House
3cf8d7571b fix md5sum calc for non-utf8 wordlists
And use apache logging
2019-01-05 18:46:58 -08:00
Eric House
e77b830157 replace assert with what it was to remind me to add 2019-01-01 19:43:44 -08:00
Eric House
e30497f336 catch another exception 2018-12-29 19:56:56 -08:00
Eric House
5a7d5b80da punctuation 2018-12-29 19:52:11 -08:00
Eric House
4a90792dec If game's in Spanish, don't require 7 tiles for trade.
Put up an error message if too many tiles selected for trade
(a condition that couldn't exist when the pool was guaranteed to
have at least 7 in it.) (It's a hack: there's not even an enum
giving Spanish's code, and the lang_locale stuff in info.txt isn't
making it into the .xwd format.)
2018-12-29 18:47:48 -08:00
Eric House
e9ae36f68d fix invite via relayID (linux test app)
I broke it adding SMS invite support?
2018-12-29 07:41:03 -08:00
Eric House
e58f51a523 log, rather than toast, too-frequent debug message 2018-12-28 07:15:40 -08:00
Eric House
bdd92baf55 fix NPE when game isn't connected yet 2018-12-28 07:09:15 -08:00
Eric House
37a853c8a4 oops: use the first *remote* address 2018-12-27 22:10:24 -08:00
Eric House
320db700a9 add opponent address to net stat display
(Debug builds only)
2018-12-27 19:30:34 -08:00
Eric House
24386bd8c9 catch uncaught exception 2018-12-27 18:09:18 -08:00
Eric House
b0805b0b6a use tryLock() to avoid on-ui-thread assertions 2018-12-26 21:41:47 -08:00
Eric House
62cd90c183 remove unused interface 2018-12-26 17:45:42 -08:00
Eric House
0e2af6a836 rewrite GameLock to use wait()/notifyAll()
I've learned a bit about java since writing that class. Should be faster
now without the sleep/polling. Also making it illegal to use blocking
lock() call on UI thread. There may be some assertions to fix in the
next few days.
2018-12-26 17:41:21 -08:00
Eric House
891c73a1b7 make run() wait for gamePtr before starting loop
Was seeing race condition on slowest device where JNIThread init hadn't
finished before the event loop tried to use the gamePtr. So use
wait()/notifyAll() to fix.
2018-12-18 07:07:35 -08:00
Eric House
285f6ad34a revert diagnostic changes 2018-12-17 12:57:17 -08:00
Eric House
e10b17cec0 remove logging; diagnose git/travis problem 2018-12-17 12:35:40 -08:00
Eric House
5467941d45 start stuff when package replaced
And: Don't start the foreground service with its user-visible
notification, as that's too obtrusive and the ACL_CONNECTED stuff seems
to work well enough. Launching timers on a new install is mostly for my
own dev use, but won't hurt user experience either.
2018-12-17 08:26:39 -08:00
Eric House
d8d0065e90 remove some logging 2018-12-17 08:26:00 -08:00
Eric House
3b48ee0ed8 try a different command 2018-12-16 18:48:06 -08:00
Eric House
a2fe00368e more diagnosis 2018-12-16 18:11:09 -08:00
Eric House
b88bbcf443 diagnosing travis build problems 2018-12-16 17:53:18 -08:00
Eric House
d31c2f5513 trying another fix for travis 2018-12-16 17:43:12 -08:00