Commit graph

10700 commits

Author SHA1 Message Date
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
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
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
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